Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-08-22 13:42:00


   Hi William.

> I'm a newbie and still trying to get a handle on the Boost Build
> system, so bear with me. I'm trying to build the Boost Python
> library using the Portland Group Compiler v7.2-3 and Boost v1_36_0.
> It looks like there may be some support for pgi now, as it appears
> as one of the available toolsets when using the ./configure option.
> It seems to build the bjam application correctly, but when it tries
> to build the Boost Python module (or any other boost library), it
> dies with many errors of this sort:
>
> -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -fPIC -pthread -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG -I"." -I"/home/wdt/Python2.5/include/python2.5" -c -o "bin.v2/libs/python/build/gcc/release/threading-multi/numeric.o" "libs/python/src/numeric.cpp"
>
> ...failed gcc.compile.c++ bin.v2/libs/python/build/gcc/release/threading-multi/n
> umeric.o...
> gcc.compile.c++ bin.v2/libs/python/build/gcc/release/threading-multi/list.o
> /bin/sh: line 1: -ftemplate-depth-128: command not found
>
> (Many more errors like this)
>
> It seems like it can't find the pgi compiler, or is trying to use
> gcc or something weird. When I did some searching, I found the
> pgi.jam file in /home/wdt/boost_1_36_0/tools/build/v2/tools, which
> seems like it's setup ok. How do I get the boost builder to use
> this file?

   It seems you are using the gcc toolset but have not configured it
correctly.

   I do not know about the ./configure script you use, but could you try
building Boost directly using bjam?

   Make sure you prepare your user-config.jam file (place it in your
home folder or possibly the current folder will work just as well) and
then you can specify the toolset on the command line, possibly something
like this:

> bjam toolset=pgi --with-python

   This should build just the Python library and its requirements and
not copy the built libraries or their headers anywhere. Later on you can
add 'stage --stagedir=/home/wdt/boost' or 'install
--prefix=/home/wdt/boost' to make it also copy (install) additional
files. Run 'bjam --help' in your boost folder for more information on these.

   Running bjam with the --debug-configuration might help you debug your
exact Boost Build configuration (which configuration files are being
used, what toolset versions are being configured, etc.)

   The error seems to indicate that your toolset is executing some
actions without specifying the executable to run so its first parameter
(-ftemplate-depth-128) gets interpreted by the shell as the command
line. I guess this could happen if you never initialized the gcc toolset
and Boost Build was not able to autodetect it correctly.

   If you want to use gcc then try adding

   using gcc ;

   to your user-config.jam file with possibly some options like:

   using gcc : /usr/bin/gcc ;

   to specify the exact gcc compiler executable to use, or:

   using gcc : 3.4 : /usr/bin/gcc ;

   to also specify the exact toolset version (which will otherwise be
auto-detected from the compiler executable used).

   Looking at tools/pgi.jam, that toolset's init rule seems to take the
same parameters as the one in gcc so you specify the same sort of
parameters for it in your user-config file.

   Hope this helps.

   Best regards,
     Jurko Gospodnetić


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