|
Boost Users : |
Subject: Re: [Boost-users] Building Boost on Mac Snow Leopard
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2010-09-01 02:39:46
Andrew Maclean wrote:
> Hi All,
> If I build boost using bjam (no problems there) and set in .bashrc:
> export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:${BOOST_ROOT}/stage/lib"
> Things seem to work OK when when calling applications from the command
> line in a terminal. However if I invoke the application e.g. x.app
> from the Finder the boost dynamic libraries are not found.
>
> If I run for example,
> otool -D
> /Users/andrewmaclean/Code/GeneralLibraries/boost_1_44_0/stage/lib/libboost_date_time.dylib
> /Users/andrewmaclean/Code/GeneralLibraries/boost_1_44_0/stage/lib/libboost_date_time.dylib:
> libboost_date_time.dylib
>
> Clearly no absolute path is set.
>
> It seems to me that Finder is ignoring the DYLD_LIBRARY_PATH variable,
> I even changed it to DYLD_FALLBACK_LIBRARY_PATH to see if it would
> make any difference. So the only solution I have is to install boost
> into the default system libraries, where it works perfectly.
>
> Now comes the interesting question. If I build VTK then the absolute
> paths are put into the dynamic libraries. So something in CMake/gcc
> actually adds these paths into the dynamic libraries.
>
> Why doesn't bjam do this? Is there a parameter I am missing?
Could you clarify why absolute 'install name' would be a right thing to do?
In particular, does XCode, in its default settings, use absolute install name
in the libraries it produces?
Also, what should be done when installing? Should the install name be modified
to the absolute path of the installed library, and if so, what is the command
to do so? And if absolute name should be used, will this prevent moving an
application to a different location.
The actual change inside Boost.Build will be trivial, but I am not sure I
understand the generally desired behaviour.
- Volodya
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net