[C++-sig] boost 1.34.1 & python 2.5.2 on centos 5

ZiZi Zhao zzhao at laika.com
Tue Mar 11 23:30:18 CET 2008


I have to use 'configure' to set all options about python first, 

-- with-python ='/somewhere/ python2 .5.2/bin/ python' -- with-python -root='/somewhere/ python2 .5. 2' -- with-python -version= '2 . 5' -- with-libraries = '-L /somewhere/ python2 .5.2/lib/ python2 .5/ config -L / usr /lib -lpython2 . 5' -- with-toolset = 'gcc' 

then, run bjam . The errors seems gone. But, there is a PYthon-2 .5.1 in the file system, how could I know which python 2.5.* the 'bjam' picked up, since it even could make up something like 

-I "/local/prod/python/ python_2 .5/include/ python2 .4" 

I have no clue about where the "/local/prod/python/ python_2 .5/include/ python2 .4" is from. 
I edit the bjam option with -sPYTHON_ROOT =/ swdevl /local/ python_2 .5.2. 

bjam builds everything implicitly. I really don't like this way. Why is there no bjam _build.log for us to check what was going on in the building? 

ZIZI 
LAIKA 


----- Original Message ----- 
From: "Michael Wieher " < michael . wieher @ gmail .com> 
To: "Development of Python/C++ integration" <c++ -sig @python.org> 
Sent: Tuesday, March 11, 2008 12:02:58 PM ( GMT-0800 ) America/ Los_Angeles 
Subject: Re: [C++ -sig ] boost 1.34.1 & python 2.5.2 on centos 5 

#include <Python.h> 

That defines PyObject ... after that, see what errors go away =) 


2008/3/11, ZiZi Zhao < zzhao @ laika .com >: 

Hi All, 

I just built python 2.5.2 on my centos 5 system, and now building boost 1.34.1 on python 2.5.2, both are compiled with gcc 4.0.2. 

But, I got tons of messages such as: 

./boost/python/converter/ arg_from_python . hpp :239: error: 'PyObject' was not declared in this scope 
./boost/python/converter/ arg_from_python . hpp :239: error: 'p' was not declared in this scope 
./boost/python/converter/ arg_from_python . hpp :240: error: expected `;' before '{' token 
./boost/python/converter/ arg_from_python . hpp : In member function 'T boost::python::converter:: pointer_cref_arg_from_python <T>::operator()() const' : 
./boost/python/converter/ arg_from_python . hpp :258: error: 'Py_None' was not declared in this scope 
./boost/python/converter/ arg_from_python . hpp : At global scope: 
./boost/python/converter/ arg_from_python . hpp :267: error: ISO C++ forbids declaration of 'pointer_arg_from_python' with no type 
./boost/python/converter/ arg_from_python . hpp :267: error: 'boost ::python::converter:: pointer_arg_from_python <T>:: pointer_arg_from_python' declared as an 'inline' variable 
./boost/python/converter/ arg_from_python . hpp :267: error: 'int boost::python::converter:: pointer_arg_from_python <T>:: pointer_arg_from_python' is not a static member of 'struct boost::python::converter:: pointer_arg_from_python <T>' 
... 

./boost/python/call. hpp :53: error: template declaration of 'typename boost::python::detail::returnable<T>::type boost::python:: call' 
./boost/python/call. hpp :53: error: 'PyObject' was not declared in this scope 
./boost/python/call. hpp :53: error: 'callable' was not declared in this scope 
./boost/python/call. hpp :54: error: expected primary-expression before 'const' 
./boost/python/call. hpp :54: error: expected primary-expression before 'const' 
./boost/python/call. hpp :54: error: expected primary-expression before 'const' 
./boost/python/call. hpp :54: error: expected primary-expression before 'const' 
... 

The error messages go on forever. I stopped the compiling and saw: 

"g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC -pthread -DBOOST_ALL_NO_LIB =1 -DBOOST_PYTHON_SOURCE -I "." -I "/local/prod/python/ python_2 .5/include/ python2 .4" -c -o "bin. v2 /libs/python/build/ gcc -4.0.2/debug/ threading-multi /class.o" "libs/python/ src /object/class. cpp " 

I have no clue about where the "/local/prod/python/ python_2 .5/include/ python2 .4" is from. My PYTHON_ROOT in bjam configure is completely different, / swdevl /local/ python_2 .5.2. and there is simply no 'python2 . 4' in 
/local/prod/python/ python_2 .5/include/. 

Any one knows whats happening? 

I built boost 1.34.1 on python 2.5.1 on centos 4, which was just done fine, and using the same gcc 4.0.2. 

Thanks, 

ZIZI 
LAIKA 


_ _______________________________________________ _____________________ 
The information contained in this message and its attachments is 
confidential and proprietary to LAIKA , Inc. By opening this email 
or any of its attachments, you agree to keep all such information 
confidential and not to use, distribute, disclose or copy any part 
of such information without the prior written consent of LAIKA , 
Inc. If you are not the intended recipient of this message, any use, 
distribution, disclosure or copying of such information is prohibited. 
If received in error, please contact the sender. 

_______________________________________________ 
C++ -sig mailing list 
C++ -sig @python.org 
http ://mail.python.org/mailman/ listinfo /c++ -sig 



_____________________________________________________________________
The information contained in this message and its attachments is
confidential and proprietary to LAIKA, Inc.  By opening this email
or any of its attachments, you agree to keep all such information
confidential and not to use, distribute, disclose or copy any part
of such information without the prior written consent of LAIKA,
Inc.  If you are not the intended recipient of this message, any use,
distribution, disclosure or copying of such information is prohibited.
If received in error, please contact the sender. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20080311/cd65c8fb/attachment.htm>


More information about the Cplusplus-sig mailing list