On Jan 14, 2008 5:39 PM, Anders F Björklund <[EMAIL PROTECTED]> wrote: > Francesco Montorsi wrote: > > > But I'm unsure this is really necessary and instead I think it's nice > > to > > have the rpath stuff also under Mac (so that you can run binaries when > > you compile wxLua before installing system-wide)... > > There is a "rpath" of sorts in older Mac OS X too, and it can be tweaked > by using install_name_tool on the binaries after building for instance*. > If you look at the wxLua "distrib/macbundle/copydylibs.command" script, > it changes the location of the libs when installing the .dylib (=.so) > > It changes the default linker path of /usr/local/lib/libfoo.dylib > into a local path like @executable_path/../../../libfoo.dylib > (where the "@executable_path" string is automagically replaced > with the location of the current program, on application start) > > The extra two .. levels is for "wxFoo.app/Contents/MacOS/wxFoo", > i.e. to break out of the directory structure of the app bundle
Anders, what do you think needs to change to make compiling on OSX run smoothly? My preferred method of compiling both wxWidgets and wxLua is to create a dir "wxLua/config_osxud" (unicode, debug) and then running $../configure --prefix=/Users/john/.../wxLua/config_osxud $make so everything is nicely within the config_osxud dir and I can quickly delete that to start over. I create a link ~/bin/wx-config -> to my preferred wx-config, where ~/bin in first in my bash path. Ok, so this is not "standard" as opposed to installing to a "system" dir like /usr/local , but I do not want to have to dig out and delete the installed files when drastic changes are necessary. So... anyway 1) I see that after running the above that wxLua.app (all the apps) are installed into apps/. Should we change the target, for example, wxLua.app/Contents/PkgInfo in the generated apps/Makefile to create wxLua.app in bin/ ? 2) What is the deleting and moving part of distrib/macbundle/copydylibs.command supposed to do? I think it assumes that you've run $./configure in the root dir of wxLua. $cd distrib/macbundle $copy ../lib/*.dylib . <--- ? should be ../../lib/*.dylib ? $rm libwxlua_macud_wxlua_2.8.0.dylib <- the symbolic link What about the other symbolic link libwxlua_macud_wxlua_2.8.dylib? $mv real lib to *0.dylib I get what the install_name_tool parts are doing. If I understand correctly we want the real dylibs renamed to reallibname.0.dylib, which was originally a link. Finally where does all these libs go? When the script ends it looks like they'll still be in distrib/macbundle. 3) After compiling with the above method, wxLua.app segfaults because it's confused about what dynamic libs to use. When I run $otool -L wxLua.app/Contents/MacOS/wxLua I see that it's linked to all my wx-config libs except for /usr/lib/libwx_macud_stc_2.8.0.dylib and same for the gl lib. Ugh. I see that the Osx replacement for LD_LIBRARY_PATH is dyld, but is there a simpler way? Do you not have this problem? Thanks, John ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users