Boost logo

Boost-Build :

From: David P. Riedel (driedel_at_[hidden])
Date: 2004-05-04 08:12:53


Rene Rivera wrote:
> David P. Riedel wrote:
>
>
>>everything ?builds ok and the 3.4 compiler is called in the build. but
>>when i use ldd on the .so libraries, i see that the libraries reference
>>the default gcc libraries in /usr/lib instead of the libraries in
>>/usr/local/gcc_3.4/lib
>
>
> Then there is something broken with your build/install of gcc-3.4. GCC
> adds the required references to it's internal libraries. If the
> libraries are close relatives of the default system ones then you might
> need to set your LD_LIBRARY_PATH to point it elsewhere.
>
>
>>what i need to do is to be able to pass the rpath option to the linker.
>>? if i were calling gcc myself to do the linking i would do something like:
>>
>>/usr/local/gcc_3.4/bin/g++ <bunch of link options> -Xlinker -rpath
>>-Xlinker /usr/local/gcc_3.4/lib
>>
>>this will accomplish what i need to do.
>>
>>is there a way to direct bjam to do this when i invoke it to build the
>>boost libraries?
>
>
> You can by specifying the BUILD request as such:
> "-sBUILD=<linkflags>-Wl,-rppath,/usr/local/gcc_3.4/lib"...
>
> But I would recomend against it. It ties the executable to that
> location. It's better to set up the LD_LIBRARY_PATH correctly.
>
> HTH.
>
>

thanks! this is exactly what i need. the problem i have is that i need
to support execution of code from several close versions of the compiler
so i can't use any kind of user or system environment setting to do
that. setting rpath in the link allows me to control which runtime
libraries are used on an individual executable level. this enables me
to gradually migrate production programs to new compilers without having
to rebuild and retest everything.

thanks again.

dave riedel

 


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