Boost logo

Boost-Build :

From: Philipp Frauenfelder (pfrauenf_at_[hidden])
Date: 2004-07-22 08:35:04

Dear Volodya

On Thu, Jul 22, 2004 at 05:08:34PM +0400, Vladimir Prus wrote:
> > I changed the way I include the dynamic link path of PETSc (an
> > external library from -Wl,-R -Wl,... to -R... and did apply the
> > attached patch to gcc.jam. I am not too much in the internals of
> > linker-compiler issues that I could guess what side-effects this
> > patch is going to have. However, on Linux/gcc it still works and
> > it works on Solaris/gcc.
> So, you've changed -rpath-link to -R. Hmm... I think that's not really right
> thing. The rpath-link says: when looking for dynamic libraries at link-time,
> look at this directory. The -R option says: when looking for dynamic library
> at link-time and *run-time*, look at this directory.

This is the desired behaviour. I have some dynamic libraries
whith which I do not want to spoil LD_LIBRARY_PATH. Therefore, I
use -R. And also for the dynamic libs generated by the Boost
controlled build, I want to have the correct libs at runtime. I
see that Boost is manipulating LD_LIBRARY_PATH before a test run
(with unit-test), but as a user of an application, I do not want
to do this.

> The reason why the patch is problematic is this. You build an application
> which uses a library, and install both to /usr/. However, because of the -R
> option, the application the use the library which is installed in your build
> tree, not the one in /usr/lib, which is clearly not desirable.

Correct. For something to be installed, -R is not allowed.

> The strange thing is that there are some V2 users on Solaris, and they did not
> report any problems. Also, you say that copy-pasting the linker command that
> g++ issues with "-v" works, which is extra strange --- Aha... somehow, when
> you invoke it manually, GNU ld is used, not solaris one.


> Maybe, the problem is that your's Solaris ld is outdated or something, and you
> should be using GNU one. I wonder how to force using GNU ld, though.

IIRC, this is a compile time option of gcc. Additionally, IIRC,
gcc people advokate the use of the Solaris linker instead of GNU
Aha, this only holds for older GNU ld. We have exactly GNU ld
2.11.2 on our Solaris platform. Maybe we should switch to the
newer release. I will look into this.


Philipp | work: pfrauenf_at_[hidden] +41 44 632 60 38
Frauenfelder | home: pfrauenf_at_[hidden] +41 44 862 73 14
[PGP] |
Proudly running Debian GNU/Linux. See

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at