Boost logo

Boost Users :

From: Richard Hadsell (hadsell_at_[hidden])
Date: 2007-04-30 14:56:09


Richard Hadsell wrote:

>I built the 1.33.x libraries this way:
>
>setenv PYTHON_VERSION 2.3
>bjam -sTOOLS=gcc -sGCC_ROOT_DIRECTORY=/opt/gcc344 -sGXX="g++344 -m64" -sGCC="gcc344 -m64" --with-python-root=/usr --stagedir=stageFC3 -sBUILD="debug release <threading>multi <shared-linkable>true <instruction-set>opteron" stage
>
I have made several attempts to persuade bjam to use
/opt/gcc344/bin/g++344, and I finally discovered a solution for this
part of the problem. I followed the Boost.Config doc the describes
setting environment variables and running the configure script:

setenv CXX /opt/gcc344/bin/g++344
setenv CXXFLAGS "-m64 -fPIC"
setenv LDFLAGS "-m64 -fPIC"
configure

Then I looked at the resulting Makefile and user-config.jam.

First, the environment variables seemed to have no effect on the
user-config.jam. When I ran bjam afterward, it still used the default
installed g++ on my system. So in user-config.jam I changed 'using gcc
;' to 'using gcc : 3.4.4 : /opt/gcc344/bin/g++344 ;'. (This was similar
to a 'using' statement that I saw in a comment in
tools/build/v2/user-config.jam.)

Then I saw the '--user-config=user-config.jam' magic option in
Makefile. I don't see this option documented in 'bjam --help' or
anywhere else, but it worked. The bjam build messages are using 3.4.4
for the version part of the names, and the files are compiling.

However, I doubt very much that the other options, especially '-fPIC',
were picked up anywhere.

I wouldn't want anyone to hold up the 1.34.0 release for these issues
that are probably just documentation problems, but someone should note
that it is difficult to figure out how to build with a g++ compiler
other than the installed default one. And if I want to compile with
other options (e.g., -m32 for 32-bit code), I don't think I can do it.

I could still use help or, at least, reassurance.

-- 
Dick Hadsell			914-259-6320  Fax: 914-259-6499
Reply-to:			hadsell_at_[hidden]
Blue Sky Studios                http://www.blueskystudios.com
44 South Broadway, White Plains, NY 10601

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net