Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-02-01 11:17:08


Mike Jackson wrote:

> 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.

You might want to raise boost.build questions on the boost-build_at_[hidden]
mailing list, not here.

> 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)

Oh, cool. Now we actually have one boost library depending on another?

And why does OSX embed the path? Standard GNU tools will only
embed "soname" -- which is a name embedded in a shared library
that tells by what name other libraries should refer to it.
Is something like that present on OSX?

> 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.

On what grounds? Is there anythink like Linux rpath -- where a library
includes a list of paths where dependent libraries should be searched?

>
> 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.

You can't. It's quite possible to build Boost, and then install it to
3 different places -- on Linux that involves plain file copy.
What does -install_name actually does?

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk