|
Boost-Build : |
Subject: Re: [Boost-build] Option to turn off rpath?
From: Steve M. Robbins (steve_at_[hidden])
Date: 2010-09-08 00:09:23
On Tue, Sep 07, 2010 at 03:23:08PM +0400, Vladimir Prus wrote:
> On Tuesday 07 September 2010 09:54:29 Steve M. Robbins wrote:
>
> > Hi,
> >
> > Sometime between 1.42 and 1.44, boost started building shared libs
> > using -rpath. (I'm a little behind ... just packaging 1.44 for Debian
> > now).
> >
> > So the first problem is that the default rpath is /usr/bin, which is
> > wrong. The unix convention is to separate binaries and libraries.
> > The libraries are in /usr/lib, so that's what I'd expect for the
> > search path.
> >
> > The second problem is that rpath is not appropriate for everyone.
> > Debian, for example (http://wiki.debian.org/RpathIssue), strongly
> > discourages its use. So I patched Debian packages to not use rpath.
> > Could this be turned into a bjam option?
>
> Could you please provide more details? In particular, what command line
> results in what libraries having rpath? Default behaviour of Boost.Build
> is to include rpath for in-tree builds and not include rpath when installing,
> where both 'stage' and 'install' targets of Boost's Jamroot count as
> installing.
My experience is something of the opposite, actually. I build in two
steps, roughly: "bjam" then "bjam install". Here is the result of
steps close to what I do using an unmodified 1.44.
sh bootstrap.sh
./bjam --layout=system --ignore-site-config debug-symbols=on --without-python
find bin.v2/ -name '*.so*' | xargs -n 1 chrpath -l
bin.v2/libs/date_time/build/gcc-4.4.5/release/debug-symbols-on/threading-multi/libboost_date_time.so.1.44.0: no rpath or runpath tag found.
bin.v2/libs/graph/build/gcc-4.4.5/release/debug-symbols-on/threading-multi/libboost_graph.so.1.44.0: RPATH=/usr/bin
bin.v2/libs/filesystem/build/gcc-4.4.5/release/debug-symbols-on/threading-multi/libboost_filesystem.so.1.44.0: no rpath or runpath tag found.
bin.v2/libs/serialization/build/gcc-4.4.5/release/debug-symbols-on/threading-multi/libboost_serialization.so.1.44.0: no rpath or runpath tag found.
bin.v2/libs/thread/build/gcc-4.4.5/release/debug-symbols-on/threading-multi/libboost_thread.so.1.44.0: no rpath or runpath tag found.
bin.v2/libs/system/build/gcc-4.4.5/release/debug-symbols-on/threading-multi/libboost_system.so.1.44.0: no rpath or runpath tag found.
bin.v2/libs/regex/build/gcc-4.4.5/release/debug-symbols-on/threading-multi/libboost_regex.so.1.44.0: RPATH=/usr/bin
Note that some libs do NOT have an RPATH.
./bjam --layout=system --ignore-site-config debug-symbols=on --without-python --prefix=`pwd`/debian/tmp/usr install
find debian/tmp/usr/ -name '*.so*' | xargs -n 1 chrpath -ldebian/tmp/usr/lib/libboost_math_tr1f.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_graph.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_serialization.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_random.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_unit_test_framework.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_c99.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_filesystem.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_c99f.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_tr1l.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_tr1l.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_program_options.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_signals.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_prg_exec_monitor.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_regex.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_tr1.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_c99l.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_iostreams.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_prg_exec_monitor.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_system.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_serialization.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_unit_test_framework.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_date_time.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_thread.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_wave.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_thread.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_regex.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_wserialization.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_wserialization.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_c99f.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_graph.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_signals.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_filesystem.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_c99.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_tr1.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_random.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_c99l.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_math_tr1f.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_date_time.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_iostreams.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_system.so: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_program_options.so.1.44.0: RPATH=/usr/bin
debian/tmp/usr/lib/libboost_wave.so.1.44.0: RPATH=/usr/bin
Here they all have RPATH=/usr/bin.
-Steve
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk