[C++-sig] Building boost::python on Ubuntu

Simon Pickles sipickles at hotmail.com
Mon Jan 7 14:29:40 CET 2008


Hi,

I obviously have not got my system, Ubuntu gutsy, set up yet, since I 
can't seem to build the boost::python libs. I am quite new to Linux 
after escaping from Windows

When trying to build the libs, I am using:

bjam --with-python stage

in the boost root directory. It correctly finds my gcc compiler, but 
then spits out 1000's of errors. Those which stand out are:

In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/ssize_t.hpp:9,
                 from ./boost/python/object.hpp:8,
                 from ./boost/python/exec.hpp:8,
                 from libs/python/src/exec.cpp:6:
./boost/python/detail/wrap_python.hpp:75:24: error: patchlevel.h: No 
such file or directory
./boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or 
higher is required for this version of Boost.Python.
./boost/python/detail/wrap_python.hpp:142:21: error: Python.h: No such 
file or directory
./boost/python/detail/wrap_python.hpp:190:4: error: #error 
"HAVE_LONG_LONG defined but not PY_LONG_LONG or LONG_LONG"

This is odd since I have Python 2.5 installed:

simon at simon-linux:~$ python
Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>>


A problem with my path perhaps?

As an alternative, I tried using synaptic to install the library from 
the repositories, but am nor sure hwo to link to that... where is it 
installed to ?

Your help much appreciated

Thanks

Simon


-- 
Linux Counter: User# 424693 






More information about the Cplusplus-sig mailing list