|
Boost : |
From: Mike Jackson (imikejackson_at_[hidden])
Date: 2008-02-01 10:33:21
I just checked out and built boost on OS X 10.4 and there is a
problem with the "install_name" or "rpath" on the dynamic libraries
that are built. The "install_name" that is embedded in the libraries
are basically useless as they do not contain a correct path to the
libraries. Example for the filesystem is:
532:[mjackson_at_Thor:boost]$ otool -L /Users/Shared/Sandbox/boost-
install/lib/libboost_filesystem-1_35.dylib
/Users/Shared/Sandbox/boost-install/lib/libboost_filesystem-1_35.dylib:
bin.v2/libs/filesystem/build/darwin/release/
libboost_filesystem-1_35.dylib (compatibility version 0.0.0, current
version 0.0.0)
bin.v2/libs/system/build/darwin/release/
libboost_system-1_35.dylib (compatibility version 0.0.0, current
version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.9)
There are a couple of choices for the "Correct" value. The best
(IMHO) would be to put in the absolute path to the installed library,
so on my system that would be:
/Users/Shared/Sandbox/boost-install/lib/libboost_filesystem-1_35.dylib
We could also put _no_ path on the install_name, but that requires
the user to additionally set the DYLD_LIBRARY_PARH which Apple
discourages.
The fix would be to add the following to the "actions link.dll bind
LIBRARIES" section of the boost/tools/build/v2/tools/darwin.jam file:
-headerpad_max_install_names -install_name
"{Install_prefix_lib_location}$(<[1]:D=:S=.dylib)" .....
I do not know anything about bjam so I have no idea how to get the
"Install_prefix_lib_location". Could some one tell me how to get at
that value somehow and I will create a patch.
-- Mike Jackson OS X Build Specialist
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk