Hi Chris, Thanks for letting me know how you've gotten it to work. I'll try including the individual Boost.Python headers instead of <boost/python.hpp>. As I mentioned in my response to Ralf, if you compile a compatible gcc (3.3.1 for SUSE 9.0) and install it into /usr/local, including <boost/python.hpp> works. Chad On Fri, 25 Jun 2004 11:29:31 +0200 (CEST), Chris Hoeppler <hoeppler@diener.iap.physik.uni-tuebingen.de> wrote:
On Tue, 22 Jun 2004, Chad Austin wrote:
Hi all,
Has anyone successfully used Boost.Python in SUSE 9.0 or SUSE 9.1? In 9.0 I had to build and install boost 1.31 from source, but 9.1 comes with a boost 1.31 package. Either way, merely #including <boost/python.hpp> causes an internal compiler error in a variety of places. Note: SUSE 9.0 uses gcc 3.3.1 (+ SUSE-specific patches?) and SUSE 9.1 uses gcc 3.3.3 (+ patches again?). If I build gcc 3.4.0 from source, Boost.Python compiles, but does not link do to incompatibilities in libstdc++. I'm going to try Boost.Python from CVS before anything else, but I thought I'd ask if anyone else has had success or failure in this area.
Thanks, Chad
Hi,
I've managed to successfully compile and use a small module on SuSE 9.0 with the following setup:
* gcc version 3.3.1 (SuSE Linux)
* boost_1_31_0 obtained from boost site and compiled from sources
* python 2.3.3 also compiled from sources.
* Module:
#include <boost/python/suite/indexing/vector_indexing_suite.hpp> #include <boost/python/module.hpp> #include <boost/python/def.hpp> #include <boost/python/implicit.hpp>
#include "rpower.h"
using namespace boost::python;
BOOST_PYTHON_MODULE(fftw_ext) { class_<std::vector<fftw_real> >("fftw_realVec") .def(vector_indexing_suite<std::vector<fftw_real> >()) ;
def("power_spectrum", power_spectrum); }
where power_spectrum is a function defined in rpower.h with the following signature:
void power_spectrum(std::vector<fftw_real> &in, std::vector<fftw_real> &out);
However, I've just tried to compile a test file with just one line #include <boost/python.hpp> as mentioned in your post quoted above, which also results in an internal compiler error:
g++ -Wall -ftemplate-depth-100 -DBOOST_PYTHON_DYNAMIC_LIB -g -O0 \ -fno-inline -fPIC -DDEBUG -I/usr/local/include/python2.3 \ -I/usr/local/include/boost-1_31 -c -o test.os test.cpp
<snipped warning about _POSIX_C_SOURCE being redefined> /usr/local/include/boost-1_31/boost/python/object_core.hpp:283: internal compiler error: Segmentation fault
Any clues on how to proceed from here?
Thanks, Chris
_______________________________________________ C++-sig mailing list C++-sig@python.org http://mail.python.org/mailman/listinfo/c++-sig