Boost logo

Boost-Build :

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
>> [...]
>> execute-test
>> ../../../bin/boost/libs/bind/test/bind_visit_test.test/gcc-4.0.2-osf1/debug
>> /
>> LD_LIBRARY_PATH=/opt/gcc-4.0.2/lib
> 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,
> why?
> 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.

For example:

> ldd bind_visit_test

Main => bind_visit_test => /opt/gcc-4.0.2/lib/ (*) => /usr/shlib/ => /opt/gcc-4.0.2/lib/ (*) => /usr/shlib/

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, david.abrahams at, gregod at, cpdaniel at, john at