Author Topic: Some scripts to build C::B on Mac OSX Snow Leopard  (Read 15023 times)

Offline PaulNavin

  • Single posting newcomer
  • *
  • Posts: 2
Some scripts to build C::B on Mac OSX Snow Leopard
« on: August 08, 2011, 03:42:57 pm »
Hi guys!

This is my first ever post, so I apologise for anything I mess up!  But here are some scripts I've created to help me build and package C::B under Mac OSX Snow Leopard.  They pull together a whole bunch of stuff from various bits of the Wiki and forums.

(1) Builds WxWidgets.
(2) Checks out/updates C::B and builds it.
(3) Bundles C::B into a proper Snow Leopard application.

The scripts make a few assumptions:
   - You want to build C::B for 32 bit Mac OSX Snow Leopard with WxWidgets 2.8.12, for Unicode, with all plugins.
   - You run all the scripts from the same directory.
      - Script (1) creates a subdirectory "Dependencies" and builds WxWidgets there.
      - Script (2) creates a subdirectory "Source" and checks out/updates and builds C::B there.
      - Script (3) creates a subdirectory "Output" and bundles the app there.
   - You download the file wxMac-2.8.12.tar.gz and put it in the same directory as the scripts before you start.
   - You know the password for root (sudo is used for make install).

The scripts aren't perfect, there are a couple of hacks:
   - There is a pause in the building of C::B to add a line to the configure.in file for m4_include[wxwin.m4].
      - Maybe this should be checked into Subversion?
   - All the plugins are built and not all of them always compile properly.
      - FileManager, NassiShneiderman and Hunspell all seem to be broken on mine, so you might have to comment some stuff out.

If you have any comments/suggestions for improvement, please let me know!  I'm hoping to do a bit of development on Mac in the coming few months, so any advice is very welcome.  :-)

Cheers,
   - Paul.



Script 1 (1_BuildAndInstallWxWidgets.sh):

Code
#!/bin/sh

if [ ! -d ./Dependencies ]
then
   mkdir Dependencies
   mv wxMac-2.8.12.tar.gz ./Dependencies
fi

cd Dependencies
tar xvf wxMac-2.8.12.tar.gz
cd wxMac-2.8.12

# For Mac OS X 10.5 or older or with a 32-bit processor, build Carbon like this:
mkdir build-carbon-debug
cd build-carbon-debug
arch_flags="-arch i386"
../configure --enable-shared --enable-monolithic --enable-unicode --with-mac --with-opengl --with-png=builtin --with-jpeg=builtin --with-tiff=builtin --with-expat=builtin CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags"
make;
sudo make install

Script 2 (2_GetAndBuildCodeBlocks.sh):

Code
#!/bin/sh

if [ ! -d ./Source ]
then
   mkdir Source
fi

cd Source

if [ ! -d ./trunk ]
then
   # Checkout SVN
   svn checkout svn://svn.berlios.de/codeblocks/trunk
   cd trunk
else
   # Update SVN
   cd trunk
   svn update
fi

cp ../../Dependencies/wxMac-2.8.12/wxwin.m4 .

echo -----------------------------------------------------------
echo "Please add the following to your trunk/configure.in file:"
echo
echo "  - After the line m4_include([revision.m4]), add:"
echo "       m4_include([wxwin.m4])"
echo
echo "Once you have added this, press any key to continue..."
read

# Add m4_include[wxwin.m4] to configure.in.

ACLOCAL_FLAGS="-I /usr/share/aclocal"
./bootstrap

arch_flags="-arch i386"
./configure --with-contrib-plugins=all --enable-shared --enable-monolithic --enable-unicode --with-mac --with-opengl --with-png=builtin --with-jpeg=builtin --with-tiff=builtin --with-expat=builtin CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags"
make

sudo make install

Script 3 (3_BundleCodeBlocks.sh):

Code
#!/bin/sh

echo ===== Making Bundle Directories =====

mkdir ./Output
cd Output
mkdir ./CodeBlocksSVN.app
mkdir ./CodeBlocksSVN.app/Contents
mkdir ./CodeBlocksSVN.app/Contents/MacOS

mkdir ./CodeBlocksSVN.app/Contents/Resources
mkdir ./CodeBlocksSVN.app/Contents/Resources/share
mkdir ./CodeBlocksSVN.app/Contents/Resources/share/codeblocks
mkdir ./CodeBlocksSVN.app/Contents/Resources/lib
mkdir ./CodeBlocksSVN.app/Contents/Resources/lib/codeblocks
mkdir ./CodeBlocksSVN.app/Contents/Resources/English.lproj

echo ===== Copying Built Files =====

cp /usr/local/bin/codeblocks ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks
cp /usr/local/bin/cb_share_config ./CodeBlocksSVN.app/Contents/MacOS
cp /usr/local/bin/cb_console_runner ./CodeBlocksSVN.app/Contents/MacOS
cp /usr/local/bin/codesnippets ./CodeBlocksSVN.app/Contents/MacOS
cp /usr/local/lib/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS
cp /usr/local/lib/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS
cp /usr/local/lib/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS

echo ===== Copying Resources From Source =====

# Most of this section has been copied from the Wiki:http://wiki.wxwidgets.org/WxMac_Issues#Building_a_MacOSX_application_bundle
# I don't know how much of it is necessary though.

#cp /Applications/CodeBlocks.app/Contents/Info.plist ./CodeBlocksSVN.app/Contents/
cp ../Source/trunk/codeblocks.plist ./CodeBlocksSVN.app/Contents/Info.plist

#   cp version.plist YourApp.app/Contents/
#   cp InfoPlist.strings YourApp.app/Contents/Resources/English.lproj/
#   echo -n 'APPL????' > YourApp.app/Contents/PkgInfo
#   cp YourApp YourApp.app/Contents/MacOS/YourApp
cp ../Source/trunk/src/src/resources/icons/* ./CodeBlocksSVN.app/Contents/Resources/

echo ===== Doing install_name_tool stuff =====

install_name_tool -id @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libcodeblocks.0.dylib
install_name_tool -id @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwx_macu-2.8.0.dylib
install_name_tool -id @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks

install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/codesnippets
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/codesnippets
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/codesnippets

install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_share_config
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_share_config
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_share_config

install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_console_runner
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_console_runner
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_console_runner

install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libcodeblocks.0.dylib
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libcodeblocks.0.dylib

install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib

echo ===== Finished install_name_tool stuff =====

cp -R /usr/local/share/codeblocks/ ./CodeBlocksSVN.app/Contents/Resources/share/codeblocks
cp -R /usr/local/lib/codeblocks/ ./CodeBlocksSVN.app/Contents/Resources/share/codeblocks

for dotso in ./CodeBlocksSVN.app/Contents/Resources/share/codeblocks/plugins/*.so
do
#echo $dotso
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib $dotso
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib $dotso
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib $dotso
done

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #1 on: August 08, 2011, 06:23:47 pm »
If you have any comments/suggestions for improvement, please let me know!  I'm hoping to do a bit of development on Mac in the coming few months, so any advice is very welcome.  :-)
Well, I don't have a Mac and I cannot try, but thanks a bunch, that is definitely a good source for Mac'ers. :D

If you want to, you could also create an article in the WiKi with the same content, so that this doesn't get lost.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #2 on: August 09, 2011, 05:01:17 pm »
Nice contribution, but it fails compiling wxWidgets in Lion :(

Quote
../include/wx/mac/carbon/private.h: In function ‘Rect* wxMacGetPictureBounds(Picture**, Rect*)’:
../include/wx/mac/carbon/private.h:1375: error: ‘QDGetPictureBounds’ was not declared in this scope
../include/wx/mac/carbon/private.h: At global scope:
../include/wx/mac/carbon/private.h:1459: error: ‘Cursor’ does not name a type
../include/wx/mac/carbon/private.h:1488: error: ‘ClassicCursor’ does not name a type
make: *** [monodll_dynlib.o] Error 1

Looks like an issue to be solved by the wxWidgets guys.

Offline PaulNavin

  • Single posting newcomer
  • *
  • Posts: 2
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #3 on: August 10, 2011, 02:07:36 pm »
Thanks guys!  :-)

Sorry, I've only tried it in Snow Leopard, I don't have Lion yet.

I'll add a Wiki entry soon with the scripts and try and explain what they do.  I'm just going through at the moment and working out how to build it for debug as well.  Then hopefully I can start sorting out some of the crashes.  :-)  I'd like to keep contributing on the Mac side, but it depends on how much time I have here at work.  ;-)  I've been programming on Windows for the last 10 years and have only just started on Mac, so everything's taking me a while, but I'll get there...  :-)

Cheers,

   -Paul.

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #4 on: August 18, 2011, 03:36:44 pm »
Didn't work for me. Codeblocks can't find any plugins and complains about the compiler plugin not being available. No plugins listed in the "Manage plugins" dialog so I guess none were built or cb cant find them. Haven't had time to investigate, yet, but I'm running 10.6.8 if thats any help. I don't think I did anything stupid, followed the descriptions in the first post.
« Last Edit: August 18, 2011, 04:19:42 pm by Calexus »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #5 on: August 24, 2011, 09:11:38 am »
If you want to, you could also create an article in the WiKi with the same content, so that this doesn't get lost.

You mean like wiki:Installing_Code::Blocks_from_source_on_Mac_OS_X ? Needs updating for Leopard+.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #6 on: August 24, 2011, 09:22:23 am »
Nice contribution, but it fails compiling wxWidgets in Lion :(

There are no Quickdraw API headers in 10.7/Lion...

So you need to use the 10.6 (or 10.4) SDK instead:

--with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6

Or update wxWidgets to 2.9 and Cocoa, eventually.
« Last Edit: August 24, 2011, 10:14:52 am by afb »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #7 on: August 24, 2011, 03:32:10 pm »
The scripts aren't perfect, there are a couple of hacks:
   - There is a pause in the building of C::B to add a line to the configure.in file for m4_include[wxwin.m4].
      - Maybe this should be checked into Subversion?
   - All the plugins are built and not all of them always compile properly.
      - FileManager, NassiShneiderman and Hunspell all seem to be broken on mine, so you might have to comment some stuff out.

If you have any comments/suggestions for improvement, please let me know!  I'm hoping to do a bit of development on Mac in the coming few months, so any advice is very welcome.  :-)

If you have wxWidgets installed in /usr/local, you'll also have wxwin.m4 in /usr/local/share/aclocal.

You can configure it like so: --with-contrib-plugins=all,-NassiShneiderman,-FileManager,-spellchecker

Otherwise it seems to match the existing Mac binaries, only that they're using 10.4u SDK and 10.4 MDT.

I've uploaded a new "nightly": http://prdownload.berlios.de/codeblocks/CB_20110815_rev7385_mac2812.zip

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #9 on: August 25, 2011, 10:24:37 am »
Quote
I've uploaded a new "nightly": -
Awesome, unfortunately it doesn't seem to run very well on my system. I don't really know much of codeblocks internals so I should probably not try to make a diagnosis. But the symptoms are pretty obvious codeblocks hangs shortly after loading a project. No cpu load and a bunch of threads with almost no cpu time, I think its some parsing related problem but thats just a guess. Must threads appears to be stuck on semaphore_wait_signal_trap semaphore_timedwait_trap.

I'll just go ahead and post a call graph. It has been like this for around 15 minutes so I'm pretty sure it's stuck.

Edit >> Just noticed there is a discussion in the nightly section about cb hanging. So this might be a known problem.

Code
Call graph:
    2624 Thread_3628   DispatchQueue_1: com.apple.main-thread  (serial)
      2624 start
        2624 _start
          2624 main
            2624 wxEntry(int&, wchar_t**)
              2624 CodeBlocksApp::OnRun()
                2624 wxAppBase::MainLoop()
                  2624 wxEventLoopManual::Run()
                    2624 wxEventLoop::Dispatch()
                      2624 wxApp::MacDoOneEvent()
                        2624 wxApp::MacHandleOneEvent(void*)
                          2624 SendEventToEventTarget
                            2624 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)
                              2624 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)
                                2624 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)
                                  2624 SendEventToEventTarget
                                    2624 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)
                                      2624 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)
                                        2624 wxMacTopLevelEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)
                                          2624 wxMacTopLevelMouseEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)
                                            2624 HandleControlClick
                                              2624 HIView::ClickInternal(CGPoint const&, unsigned long, void (*)(OpaqueControlRef*, short), OpaqueEventRef*, bool)
                                                2624 HIView::NotifyControlHit(OpaqueEventRef*, short, unsigned long)
                                                  2624 SendControlHit(HIView*, OpaqueEventRef*, short, unsigned long)
                                                    2624 SendEventToEventTarget
                                                      2624 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)
                                                        2624 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)
                                                          2624 wxMacToolBarToolEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)
                                                            2624 wxToolBarBase::OnLeftClick(int, bool)
                                                              2624 wxEvtHandler::ProcessEvent(wxEvent&)
                                                                2624 wxWindowBase::TryParent(wxEvent&)
                                                                  2624 wxEvtHandler::ProcessEvent(wxEvent&)
                                                                    [i]--- lots of ProcessEvent calls ---[/i]
                                                                     2624 wxEvtHandler::ProcessEvent(wxEvent&)
                                                                       2624 wxEvtHandler::ProcessEvent(wxEvent&)
                                                                         2624 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
                                                                           2624 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
                                                                             2624 MainFrame::DoOnFileOpen(bool)
                                                                               2624 MainFrame::OnDropFiles(int, int, wxArrayString const&)
                                                                                 2624 MainFrame::OpenGeneric(wxString const&, bool)
                                                                                   2624 MainFrame::DoOpenProject(wxString const&, bool)
                                                                                     2624 ProjectManager::LoadProject(wxString const&, bool)
                                                                                       2624 ProjectManager::SetProject(cbProject*, bool)
                                                                                         2624 Manager::ProcessEvent(CodeBlocksEvent&)
                                                                                           2624 CodeCompletion::OnProjectActivated(CodeBlocksEvent&)
                                                                                             2624 NativeParser::CreateParser(cbProject*)
                                                                                              2624 ClassBrowser::UpdateView(bool)
                                                                                                2624 ClassBrowser::BuildTree()
                                                                                                  2624 ClassBrowserBuilderThread::Init(NativeParser*, CBTreeCtrl*, CBTreeCtrl*, wxString const&, void*, BrowserOptions const&, TokensTree*, bool)
                                                                                                    2624 wxMutexInternal::Lock()
                                                                                                      2624 pthread_mutex_lock
                                                                                                        2624 semaphore_wait_signal_trap
    2624 Thread_3640   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
      2624 start_wqthread
        2624 _pthread_wqthread
          2624 _dispatch_worker_thread2
            2624 _dispatch_queue_invoke
              2624 _dispatch_mgr_invoke
                2624 kevent
    2624 Thread_3643: com.apple.CFSocket.private
      2624 thread_start
        2624 _pthread_start
          2624 __CFSocketManager
            2624 select$DARWIN_EXTSN
    2624 Thread_3650
      2624 thread_start
        2624 _pthread_start
          2624 PrivateMPEntryPoint
            2624 wxThreadInternal::MacThreadStart(void*)
              2624 BackgroundThread::Entry()
                2624 wxSemaphore::Wait()
                  2624 wxSemaphoreInternal::WaitTimeout(unsigned long)
                    2624 MPWaitOnSemaphore
                      2624 semaphore_timedwait_trap
    2624 Thread_3651
      2624 thread_start
        2624 _pthread_start
          2624 PrivateMPEntryPoint
            2624 wxThreadInternal::MacThreadStart(void*)
              2624 BackgroundThread::Entry()
                2624 wxSemaphore::Wait()
                  2624 wxSemaphoreInternal::WaitTimeout(unsigned long)
                    2624 MPWaitOnSemaphore
                      2624 semaphore_timedwait_trap
    2624 Thread_3652
      2624 thread_start
        2624 _pthread_start
          2624 PrivateMPEntryPoint
            2624 wxThreadInternal::MacThreadStart(void*)
              2624 BackgroundThread::Entry()
                2624 wxSemaphore::Wait()
                  2624 wxSemaphoreInternal::WaitTimeout(unsigned long)
                    2624 MPWaitOnSemaphore
                      2624 semaphore_timedwait_trap
    2624 Thread_3653
      2624 thread_start
        2624 _pthread_start
          2624 PrivateMPEntryPoint
            2624 wxThreadInternal::MacThreadStart(void*)
              2624 BackgroundThread::Entry()
                2624 wxSemaphore::Wait()
                  2624 wxSemaphoreInternal::WaitTimeout(unsigned long)
                    2624 MPWaitOnSemaphore
                      2624 semaphore_timedwait_trap
    2624 Thread_3674
      2624 thread_start
        2624 _pthread_start
          2624 PrivateMPEntryPoint
            2624 wxThreadInternal::MacThreadStart(void*)
              2624 ClassBrowserBuilderThread::Entry()
                2624 ClassBrowserBuilderThread::BuildTree()
                  2624 ClassBrowserBuilderThread::CollapseItem(wxTreeItemId)
                    2624 wxGenericTreeCtrl::CollapseAndReset(wxTreeItemId const&)
                      2624 wxGenericTreeCtrl::Collapse(wxTreeItemId const&)
                        2624 wxEvtHandler::ProcessEvent(wxEvent&)
                          2624 wxWindowBase::TryParent(wxEvent&)
                            2624 wxEvtHandler::ProcessEvent(wxEvent&)
                              2624 wxWindowBase::TryParent(wxEvent&)
                                2624 wxEvtHandler::ProcessEvent(wxEvent&)
                                  2624 wxWindowBase::TryParent(wxEvent&)
                                    2624 wxEvtHandler::ProcessEvent(wxEvent&)
                                      2624 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
                                        2624 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
                                          2624 ClassBrowser::OnTreeItemCollapsing(wxTreeEvent&)
                                            2624 ClassBrowserBuilderThread::CollapseItem(wxTreeItemId)
                                              2624 wxMutexInternal::Lock()
                                                2624 pthread_mutex_lock
                                                  2624 semaphore_wait_signal_trap
    2624 Thread_3824
      2624 thread_start
        2624 _pthread_start
          2624 PrivateMPEntryPoint
            2624 wxThreadInternal::MacThreadStart(void*)
              2624 cbThreadPool::cbWorkerThread::Entry()
                2624 wxSemaphore::Wait()
                  2624 wxSemaphoreInternal::WaitTimeout(unsigned long)
                    2624 MPWaitOnSemaphore
                      2624 semaphore_timedwait_trap

Total number in stack (recursive counted multiple, when >=5):
        58       wxEvtHandler::ProcessEvent(wxEvent&)
        7       _pthread_start
        7       thread_start
        6       PrivateMPEntryPoint
        6       wxThreadInternal::MacThreadStart(void*)
        5       MPWaitOnSemaphore
        5       semaphore_timedwait_trap
        5       wxSemaphore::Wait()
        5       wxSemaphoreInternal::WaitTimeout(unsigned long)

Sort by top of stack, same collapsed (when >= 5):
        semaphore_timedwait_trap        13120
        semaphore_wait_signal_trap        5248
        kevent        2624
        select$DARWIN_EXTSN        2624
« Last Edit: August 25, 2011, 10:42:33 am by Calexus »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #10 on: August 25, 2011, 10:41:58 am »
Calexus: can you try to disable the CodeCompletion plugin? (Manage -> Plugins -> Disable)

There many known and unknown deadlocks in the CC at the moment, because it is in a heavy development...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #11 on: August 25, 2011, 10:47:09 am »
Ok, I'll test disabling CodeCompletion.

And the result is that it doesn't hang. Guess it's the same problem on windows then, I'll just keep my last "stable" build for a little while longer.
« Last Edit: August 25, 2011, 10:50:33 am by Calexus »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Some scripts to build C::B on Mac OSX Snow Leopard
« Reply #12 on: August 26, 2011, 12:19:52 am »
I've uploaded a new "nightly": http://prdownload.berlios.de/codeblocks/CB_20110815_rev7385_mac2812.zip
That's great to hear!

It's more like "yearly" now, but whatever. It used to be "monthly" or so...