Boost logo

Boost :

Subject: Re: [boost] how to build boost version 1_34_1 with gcc in non-standard location?
From: Oliver Kullmann (O.Kullmann_at_[hidden])
Date: 2009-05-01 14:19:33

Thanks a lot!
All problems solved now! (i.e., for the moment ;-)).


Oliver Kullmann wrote:
> Hello,
> I'm wrestling here for a long time with the following problem,
> and I would be very glad if somebody could help me here (seems
> to be straight-forward, but I can't find anything anywhere on
> the subject):
> I have to build some C++ code which doesn't compile with the
> system gcc version 4.3.1. So I have installed gcc version 4.1.2 locally.
> Now that C++ code uses Boost version 1_34_1, and doesn't compile
> with higher versions. Alright, so I install 1_34_1; very unfortunately,
> linking is necessary, and here is the problem: Obviously I have
> to build Boost 1_34_1 with the locally build gcc 4.1.2, and now
> how can I tell the Boost-build where to find gcc???
> What I found is to use
> PACKAGEPATH/bjam/bjam
> --toolset=gcc-4.1.2
> --toolset-root=PATH_TO_GCC_DIR
> --build-dir=BUILD_DIR
> install --without-python
> However, as I had to found out after some time, this doesn't have
> any effect --- Boost just builds with the system compiler, and
> ignores all these specifications of PATH_TO_GCC_DIR.
> Now what is the right way to do it??
> I would be really glad for help.
I think this is an approved way to do it. Put the path to your special
g++ in a user-config file. For example:


using gcc : 3.4.4 : /opt/gcc344/bin/g++344 : <compileflags>-fPIC <linkflags>-fPIC ;
using python : 2.3 : /usr ;

Then run bjam with the user-config option:

bjam --user-config=user-config.xyzzy ...

Dick Hadsell                    203-992-6320  Fax: 203-992-6001
Reply-to:                       hadsell <at>
Blue Sky Studios      
1 American Lane, Greenwich, CT 06831-2560

Boost list run by bdawes at, gregod at, cpdaniel at, john at