Subject: [Boost-users] Python 3.2 (wide-unicode) with Boost 1.46.1 on Ubuntu 10.04 64bit LTS
From: Nicholas Yue (yue.nicholas_at_[hidden])
Date: 2011-05-13 00:07:33


Hi,

  I have a local build of Python 3.2 which have have used to build
Python extensions and loaded them successfully in Blender 2.5 (which
uses Python 3.2)

  I am hoping to migrate my bindings to using Boost.Python.

  I have been been getting error messages from bootstrap.sh and bjam

  NOTE : I have no problem building boost with Python 2.6.5 which
comes with Ubuntu 10.04 LTS

  e.g. bootstrap.sh
        ./bootstrap.sh --prefix=/opt/boost/vTrunk-Python-3.2
--without-icu --with-python=/opt/python/v3.2/bin/python3.2
--with-python-version=3.2

>>>>>>>>Building Boost.Jam with toolset gcc... tools/build/v2/engine/src/bin.linuxx86_64/bjam
>>>>>>>>Detecting Python root... File "<string>", line 1
>>>>>>>> import sys; print sys.prefix
>>>>>>>> ^
>>>>>>>>SyntaxError: invalid syntax

  e.g. bjam
        ./bjam --prefix=/opt/boost/vTrunk-Python-3.2 --without-mpi
>>>>>>>>gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.3/release/threading-multi/numeric.o
>>>>>>>>In file included from ./boost/python/detail/prefix.hpp:13,
>>>>>>>> from ./boost/python/numeric.hpp:8,
>>>>>>>> from libs/python/src/numeric.cpp:6:
>>>>>>>>./boost/python/detail/wrap_python.hpp:50:23: error: pyconfig.h: No such file or directory
>>>>>>>>./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

  My local build of python is deployed as per the configure script
>>>>>>>>/opt/python/v3.2/
>>>>>>>>|-- bin
>>>>>>>>|-- include
>>>>>>>>| `-- python3.2mu
>>>>>>>>|-- lib
>>>>>>>>| |-- pkgconfig
>>>>>>>>| `-- python3.2
>>>>>>>>`-- share
>>>>>>>> `-- man

  The boost build problem might be directory path naming convention related.

  If anyone knows the correct to build Boost or Python so they play
nice together, please share.

Regards