[C++-sig] Re: boost.build: How to set runtime library paths in a Jamfile (wrapping 3rd party libs)

Holger Joukl Holger.Joukl at LBBW.de
Fri Mar 12 09:18:27 CET 2004


Rene wrote:
>feature of ELF for adding searchs paths relative to the loading module.. So
now
>I can get the effect I have on Windows of adding the location of my
executable
>(or any other relative subdir) to the library search path...

> <gcc><*><linkflags>-Wl,-rpath,'${ORIGIN}'

If I understand correctly, this translate to an equivalent to "gcc
-R<$ORIGIN>" with $ORIGIN being a
relative path -- that is, simply using -R option with relative paths.
While being fine for executables, I suspect that this is not really
appropriate for boost.python wrapped
libraries, where
- libboost_python.so would probably reside in
$PYTHON_ROOT/lib/python2.x/site-packages
- the wrapper library shared object would probably reside in
$PYTHON_ROOT/lib/python2.x/site-packages
- the wrapped library resides anywhere on your system

Running python and using this extension is now dependant from where you
invoke the interpreter;
it will only work if the wrapped lib can be found in the relative path
$ORIGIN.
So it is either LD_LIBRARY_PATH again (not good) or adding some search
paths with -R in
the link step, the search paths being s.th. like site-dependant standard
library installation directories.
E.g. a shared filesystem named /apps/prod where I would install central
components (like python :-)

Anyway, thanks a lot for all the hints!

Der Inhalt dieser E-Mail ist vertraulich. Falls Sie nicht der angegebene
Empfänger sind oder falls diese E-Mail irrtümlich an Sie adressiert wurde,
verständigen Sie bitte den Absender sofort und löschen Sie die E-Mail
sodann. Das unerlaubte Kopieren sowie die unbefugte Übermittlung sind nicht
gestattet. Die Sicherheit von Übermittlungen per E-Mail kann nicht
garantiert werden. Falls Sie eine Bestätigung wünschen, fordern Sie bitte
den Inhalt der E-Mail als Hardcopy an.

The contents of this  e-mail are confidential. If you are not the named
addressee or if this transmission has been addressed to you in error,
please notify the sender immediately and then delete this e-mail.  Any
unauthorized copying and transmission is forbidden. E-Mail transmission
cannot be guaranteed to be secure. If verification is required, please
request a hard copy version.







More information about the Cplusplus-sig mailing list