From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-07-22 08:08:34
> 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.
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.
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.
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