Boost C++ Libraries: Ticket #2579: Linking libboost_filesystem may need an rpath https://svn.boost.org/trac10/ticket/2579 <p> This is on FreeBSD 6.1, where the rpath of an executable is separate from the rpaths of the shared libraries it links with. </p> <p> 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. </p> <p> I found that although some boost libraries could be found, one was not found (libboost_system-gcc42-mt-1_37.so.1.37.0). </p> <p> 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. </p> <p> 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) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2579 Trac 1.4.3 Vladimir Prus Sat, 21 Mar 2009 18:59:18 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2579#comment:1 https://svn.boost.org/trac10/ticket/2579#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> This is not a bug. If you wish rpath to be added to libraries, add "dll-path=xxx" to bjam command line. This is not done by default, because opinions differ as to whether hardcoding rpaths like this is good idea. </p> Ticket