User forums > Help

Big trouble running Codeblocks in MacOS X Leopard

(1/2) > >>

Baluarte:
Greetings!

First:

Here a very very very happy Codeblocks 'old' user.  Keep the good work! It is amazing!!

Second:

For first time, I try to build/run Codeblocks (from SVN repository) in Mac OS X Leopard (MacBoock Pro/Intel CPU)

I use the Leopard default GCC (i686-apple-darwin9-gcc-401)

I have previously built/installed under "/usr/local" directory the wxWidgets 2,8,9.

I follow the same Linux/Unix system steps. Perhaps do not be the right approach ( ?)

The main steps:

1.  svn checkout svn://svn.berlios.de/codeblocks/trunk
2. ./bootstrap
3. mkdir builds; cd builds
4. ../configure --with-wxdir=/usr/local/
5. make
6. sudo make install

SUCCESS!!

However:

When I launch the Codeblocks from terminal. It seems work normally. The classical main Codeblocks window is showed without problems. But, Is it unable to respond any event! Click a button. Open menu. Nothing. The MAC OS X interface window title ( Maximize Window, Minimize Window, Close Window) works.

When I attempt to launch from the Finder, It denies me. It determine that 'Codeblocks'  is a Classical Application (and so NO compatible with the new MAC OSX Leopard )

Any Idea? Any flag? Any updated guide? Thanks in advance!

P.S: Sorry for my terrible English!

Baluarte

afb:
Not responding to events is "normal" for wxWidgets on Mac.

Adding the resfork is enough to make it work in earlier versions of Mac OS X, however it is not a Classic application as Finder mistakenly deduces (it uses Carbon). For newer versions it seems you must make an application bundle, so running from the regular /usr/local doesn't work anymore.

See wiki:Installing_Code::Blocks_from_source_on_Mac_OS_X#Way_Two:_NeXT_.28bundle.29  and http://wiki.wxwidgets.org/WxMac_Issues#Building_a_MacOSX_application_bundle. The included wxWidgets template has the same issue, so all of it needs updating for Leopard.

You're 90% there though, just need the directory structure...

Baluarte:
Thank you for your very fast answer!

In a few days, I will try the suggested approach.
I must admit I am a newbie in MacOS X environment.

Baluarte

Baluarte:
Ok! Unsuccessful Greetings!

Reminder:

I attempt running Codeblocks (from SVN) in a Macbook Pro with Leopard 1,5,6 installed.

Until now, I have managed to compile/building/installing under usr/local/ the CodeblocksSVN (see previous posts in this forum thread)

Codeblocks works but he is unable to respond to any event.

Today:

Now I try to create a MACOSX application bundle.

Obeying indications from:

http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Mac_OS_X#Way_Two:_NeXT_.28bundle.29

I built the tree folder:

CodeBlocksSVN.app
CodeBlocksSVN.app/Contents
CodeBlocksSVN.app/Contents/MacOS
CodeBlocksSVN.app/Contents/Resources
CodeBlocksSVN.app/Contents/MacOS/CodeBlocks
CodeBlocksSVN.app/Contents/Resources/share
CodeBlocksSVN.app/Contents/Resources/share/codeblocks

After that:

 I copy the file Info.plist from SVN trunk to CodeBlocksSVN.app/Contents
 I copy the file app.icns from SVN trunk to CodeBlocksSVN.app/Contents/Resources

In the next step I use the script suggested in

 http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Mac_OS_X#Way_Two:_NeXT_.28bundle.29


--- Code: ---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

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

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

for dotso in ./CodeBlocksSVN.app/Contents/Resources/share/codeblocks/plugins/*.so
do
#echo $dotso
# install_name_tool -id $dotso ./libcodeblocks.0.dylib CodeBlocks
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

--- End code ---

I suspect that the script is not updated. That way I got the following errors:


--- Code: ---cp: /usr/local/bin/codesnippets: No such file or directory
cp: /usr/local/lib/libwxsmithlib.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_macu-2.8.0.dylib: No such file or directory
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/libwx_macu-2.8.0.dylib (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib (No such file or directory)
install_name_tool: can't map file: ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks (Invalid argument)
install_name_tool: can't map file: ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks (Invalid argument)
install_name_tool: can't map file: ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks (Invalid argument)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/codesnippets (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/codesnippets (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/codesnippets (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib (No such file or directory)

--- End code ---

The "can't map file" erros can be circumvented with the change:

install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks/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/codeblocks
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks/codeblocks

In this case, When I run the script I get:


--- Code: ---cp: /usr/local/bin/codesnippets: No such file or directory
cp: /usr/local/lib/libwxsmithlib.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_macu-2.8.0.dylib: No such file or directory
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/libwx_macu-2.8.0.dylib (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/codesnippets (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/codesnippets (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/codesnippets (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib (No such file or directory)
install_name_tool: can't open file: ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib (No such file or directory)

--- End code ---

I think the script is too old. The libwx_macu-2.8.0.dylib, libwxsmithlib.0, codesnippets files must be "anachronic" references. True? I have searched similar files but I have not found good candidates.

Which should new files be? (Especifically for libwx_macu-2.8.0.dylib)


At last, I executed application from Finder.
The Codeblocks icon jumped four or five times in the dashboard before vanishing.
Next nothing happened.

The Consola.app says:


--- Code: ---[0x0-0x20020].org.codeblocks.app[489] /System/Library/Frameworks/Carbon.Framework/Versions/A/Support/LaunchCFMApp [489] Launch Failed with Error Code -2857
(cfragCFragRsrcErr) for application /Users/baluarte/CodeBlocksSVN.app/Contents/MacOS/CodeBlocks

com.apple.launchd[261] ([0x0-0x20020].org.codeblocks.app[489]) Exited with exit code:215

--- End code ---

What must I do now?

Thanks in advance!

Baluarte

P.S: Sorry for my horrible English

afb:

--- Quote from: Baluarte on December 21, 2008, 02:36:19 pm ---I suspect that the script is not updated.
--- End quote ---

--- Quote --- I think the script is too old.
--- End quote ---

They are out of sync (outdated), but the general principle should still hold...

I'll try to update it with the latest script and take down the most ancient files.


--- Quote ---The libwx_macu-2.8.0.dylib, libwxsmithlib.0, codesnippets files must be "anachronic" references. True? I have searched similar files but I have not found good candidates.

Which should new files be? (Especifically for libwx_macu-2.8.0.dylib)
--- End quote ---

libwx_macu-2.8.0.dylib is the name of the shared library, even for wxWidgets 2.8.9

It's normally a symbolic link to the actual version (like libwx_macu-2.8.0.5.0.dylib)


--- Quote ---What must I do now?
--- End quote ---

Most likely a library dependency looked in the wrong place, or something...

Look with /Applications/Utilities/Console.app for the actual error in the log ?

Navigation

[0] Message Index

[#] Next page

Go to full version