From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2006-03-10 05:32:26
Vladimir Prus wrote:
> On Wednesday 08 March 2006 12:32, Markus Schöpflin wrote:
>> V1 used to adjust LD_LIBRARY_PATH when running tests with the GCC toolset:
>> bjam -sTOOLS=gcc-4.0.2-osf1 -d+2 bind_visit_test
> So, it's adding path to gcc library directories? Why exactly this is
> needed? Can you add this directory to global LD_LIBRARY_PATH, and if no,
> Say, if I build an application with gcc-4.0.2 and it won't run right
> away because gcc libraries are not in LD_LIBRARY_PATH, then the compiler
> is not fully usable. Boost.Build can work around this, but is it better
> than putting extra directory to LD_LIBRARY_PATH?
Because if you have multiple gcc versions installed side-by-side, you have
to make sure that the dynamic libs matching the compiler version are loaded.
> ldd bind_visit_test
Main => bind_visit_test
libstdc++.so.6 => /opt/gcc-4.0.2/lib/libstdc++.so.6 (*)
libm.so => /usr/shlib/libm.so
libgcc_s.so.1 => /opt/gcc-4.0.2/lib/libgcc_s.so.1 (*)
libc.so => /usr/shlib/libc.so
The libs marked by (*) are dependent on the compiler version, hence the
library loader path must be adjusted depending on the compiler version.
> BTW, can you also tell how you configure gcc-4.0.2 with V1? That is, what's
> the content of the toolset file?
local GCC_ROOT_DIRECTORY = "/opt/gcc-4.0.2" ;
extends-toolset gcc ;
flags gcc CFLAGS : -mieee -g0 ;
flags gcc LINKFLAGS : -mieee -s ;
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