how to build boost version 1_34_1 with gcc in non-standard location?

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 --prefix=INSTALLATION_DIR --build-dir=BUILD_DIR "-sGCC_ROOT_DIRECTORY=PATH_TO_GCC_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. Oliver

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 --prefix=INSTALLATION_DIR --build-dir=BUILD_DIR "-sGCC_ROOT_DIRECTORY=PATH_TO_GCC_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: user-config.xyzzy: 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@blueskystudios.com Blue Sky Studios http://www.blueskystudios.com 1 American Lane, Greenwich, CT 06831-2560

Thanks a lot! All problems solved now! (i.e., for the moment ;-)). Oliver ---------------------------------------------------------------------------- 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 --prefix=INSTALLATION_DIR --build-dir=BUILD_DIR "-sGCC_ROOT_DIRECTORY=PATH_TO_GCC_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: user-config.xyzzy: 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> blueskystudios.com Blue Sky Studios http://www.blueskystudios.com 1 American Lane, Greenwich, CT 06831-2560
participants (2)
-
Oliver Kullmann
-
Richard Hadsell