Cannot compile boost

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
rooy
Insys Pilot
Insys Pilot
Posts: 2
Joined: Sun Mar 11, 2007 8:31 pm

Cannot compile boost

Post by rooy »

Hi, I'm on Ubuntu feisty x64, amd64. I don't have libboost-dev from the repo installed. Python 2.5 comes with Feisty. Thanks for vegastrike!

My configure command is
./configure --prefix=$MYP --with-data-dir=../data4.x
I got this error when make vegastrike:

$> make
make all-am
make[1]: Đang vào thư mục « /home/r64y/e1/code/vegastrike/vegastrike »
depbase=`echo boost/1_33/src/object_protocol.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I./boost/1_33 -DHAVE_SDL=1 -DSDL_WINDOWING=1 -DHAVE_AL=1 -DHAVE_OGG -DDATA_DIR=\"../data4.x/\" -I/usr/include/python2.5 -DHAVE_PYTHON=1 -I./src -g -O2 -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pthread -pipe -MT boost/1_33/src/object_protocol.o -MD -MP -MF "$depbase.Tpo" -c -o boost/1_33/src/object_protocol.o boost/1_33/src/object_protocol.cpp; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
boost/1_33/src/object_protocol.cpp: In function ‘PyObject* boost::python::api::<unnamed>::apply_slice(PyObject*, PyObject*, PyObject*)’:
boost/1_33/src/object_protocol.cpp:110: error: cannot convert ‘int*’ to ‘Py_ssize_t*’ for argument ‘2’ to ‘int _PyEval_SliceIndex(PyObject*, Py_ssize_t*)’
boost/1_33/src/object_protocol.cpp:112: error: cannot convert ‘int*’ to ‘Py_ssize_t*’ for argument ‘2’ to ‘int _PyEval_SliceIndex(PyObject*, Py_ssize_t*)’
boost/1_33/src/object_protocol.cpp: In function ‘int boost::python::api::<unnamed>::assign_slice(PyObject*, PyObject*, PyObject*, PyObject*)’:
boost/1_33/src/object_protocol.cpp:137: error: cannot convert ‘int*’ to ‘Py_ssize_t*’ for argument ‘2’ to ‘int _PyEval_SliceIndex(PyObject*, Py_ssize_t*)’
boost/1_33/src/object_protocol.cpp:139: error: cannot convert ‘int*’ to ‘Py_ssize_t*’ for argument ‘2’ to ‘int _PyEval_SliceIndex(PyObject*, Py_ssize_t*)’
make[1]: *** [boost/1_33/src/object_protocol.o] Lỗi 1
make[1]: Đang rời khỏi thư mục « /home/r64y/e1/code/vegastrike/vegastrike »
make: *** [all] Lỗi 2
You do not have the required permissions to view the files attached to this post.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

That looks like some sort of 64-bit-related error. I have a feeling that python decided to change their ABI in their latest version to use 64-bit lengths rather than 32-bit.

Could you open up vegastrike/boost/1_33/src/object_protocol.cpp and go to line 109?
Try changing the "int" to a "Py_ssize_t"
Do the same modification on line 140.

Now, try compiling again. It should get past that file. But I have a feeling that other files will have the same errors (make will stop at the first file with errors)...

If you run "make -k" instead of "make", it will ignore errors, so you can get a count of how many of these there really are.

If there are only a few more errors, it should be fine (and you should be able to fix them in a similar way), but if there are a lot more, we might need to upgrade to a new Boost version...

EDIT: Actually, your post brings up a good point... Maybe we should allow for a system libboost library to be used instead of the included ones.

Long ago we had some good reasons for including a version of boost (and even now, we still need it for windows), but I don't see why we can't give an option to use a system boost library under Linux.
rooy
Insys Pilot
Insys Pilot
Posts: 2
Joined: Sun Mar 11, 2007 8:31 pm

Post by rooy »

Thanks ace123, the compile is plowing on in vegastrike/src.

For the record, there're 2 declaration lines, 109 and 136 in boost/1_33/src/object_protocol.cpp. The variable type should be changed from int to Py_ssize_t as ace123 said. No other error for me, it compiled completely.
Post Reply