Subject: [Boost-bugs] [Boost C++ Libraries] #2579: Linking libboost_filesystem may need an rpath
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-12-09 15:56:57
#2579: Linking libboost_filesystem may need an rpath
-------------------------------------------+--------------------------------
Reporter: Olaf Seibert <olafs_at_[hidden]> | Owner:
Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: Building Boost
Version: Boost 1.37.0 | Severity: Problem
Keywords: |
-------------------------------------------+--------------------------------
This is on FreeBSD 6.1, where the rpath of an executable is separate from
the rpaths of the shared libraries it links with.
I have built boost 1.37.0 and installed it in a private directory, for use
with another project. After linking the other project, I examined it with
ldd to check if I had got the library search paths correct.
I found that although some boost libraries could be found, one was not
found (libboost_system-gcc42-mt-1_37.so.1.37.0).
It turned out that libboost_system-* was required by
libboost_filesystem-*, but since there was no RPATH option specified when
linking, it was not found.
I worked around it by re-linking libboost_filesystem-* while the
environment variable LD_RUN_PATH was set to the private library directory.
A proper solution would pass --rpath (or equivalent) to the linker.
(Unfortunately how to pass this option varies somewhat between systems:
-R, -Wl,-R, -Wl,--rpath, -wL,-rpath, etc etc)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2579> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC