Problems compiling boost.python with Boost 1.31.0
I'm trying to compile boost.python from Boost 1.31.0 on Tru64 5.1 with Compaq C++ V6.5-033. Python has been built like this: ./configure --with-cxx=cxx --prefix=/opt --exec-prefix=/opt/exec/OSF1-V5.1-a lpha --without-gcc The command line used to build boost.python looks like this: bjam -sTOOLS=tru64cxx65 -sPYTHON_ROOT="/opt" -sPYTHON_VERSION="2.3" stage When build boost.python I get the following error message: tru64cxx65-C++-action bin/boost/libs/python/build/libboost_python.so/tru64cxx65/debug/numeric.o cxx: Error: /net/camos/opt/include/python2.3/Python.h, line 8: #5 could not open source file "pyconfig.h" #include "pyconfig.h" ---------------------^ It looks like the exec prefix is not taken into account because the file is located here: /opt/exec/OSF1-V5.1-alpha/include/python2.3/pyconfig.h Is this not supported by the current boost build process or is there any option I missed? Or is there anything else I'm doing wrong? Thanks, Markus
"Markus Schöpflin"
I'm trying to compile boost.python from Boost 1.31.0 on Tru64 5.1 with Compaq C++ V6.5-033.
Python has been built like this:
./configure --with-cxx=cxx --prefix=/opt --exec-prefix=/opt/exec/OSF1-V5.1-a lpha --without-gcc
The command line used to build boost.python looks like this:
bjam -sTOOLS=tru64cxx65 -sPYTHON_ROOT="/opt" -sPYTHON_VERSION="2.3" stage
When build boost.python I get the following error message:
tru64cxx65-C++-action bin/boost/libs/python/build/libboost_python.so/tru64cxx65/debug/numeric.o cxx: Error: /net/camos/opt/include/python2.3/Python.h, line 8: #5 could not open source file "pyconfig.h" #include "pyconfig.h" ---------------------^
It looks like the exec prefix is not taken into account because the file is located here:
/opt/exec/OSF1-V5.1-alpha/include/python2.3/pyconfig.h
Is this not supported by the current boost build process or is there any option I missed? Or is there anything else I'm doing wrong?
I don't know. After bjam encounters an error it dumps the command-line it used to invoke the compiler. Do you see anything suspicious in that? -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
David Abrahams wrote:
"Markus Schöpflin"
writes: It looks like the exec prefix is not taken into account because the file is located here:
/opt/exec/OSF1-V5.1-alpha/include/python2.3/pyconfig.h
Is this not supported by the current boost build process or is there any option I missed? Or is there anything else I'm doing wrong?
I don't know. After bjam encounters an error it dumps the command-line it used to invoke the compiler. Do you see anything suspicious in that?
Ok, I have been digging a little deeper and I discovered several issues.
After resolving all of them I was able to successfully compile
boost.python. (Actually the build is still running but
"libboost_python_debug.so" was built successfully.)
1. boost.python doesn't take into account the exec root. According to
"http://www.python.org/doc/2.3.3/api/includes.html" it needs to be
included as well when if differs from the python root. I hacked
"python.jam" to work around that, it's attached as patch 1. It has the
problems that the python root ends up two times in the include path.
Don't know how to fix this...
2. In the file "tru64cxx65-tools.jam" the option "-nopure_cname" is
passed to the compiler. This leads to problems when compiling io headers
when "-std strict_ansi" is in effect, patch 2 fixes this.
3. boost.python doesn't include "Python.h" before including system
headers. This leads to many warnings concerning the redefinitions of
certain macros, like for example "_XOPEN_SOURCE" or "_POSIX_C_SOURCE". I
fixed that by simply adding "#include
2. In the file "tru64cxx65-tools.jam" the option "-nopure_cname" is passed to the compiler. This leads to problems when compiling io headers when "-std strict_ansi" is in effect, patch 2 fixes this.
... and removing -nopure_cname leads to problems when boost.filesystem is beeing compiled... :-( I think I'll need to look for another fix. Markus
participants (3)
-
David Abrahams
-
Markus Schöpflin
-
Markus Sch�pflin