[C++-sig] Bindings compilation with bjam. release build doesn't work
Maciej Sitarz
macieksitarz at wp.pl
Sat Sep 4 14:14:36 CEST 2010
Hi,
I have generated python binding with pyplusplus, I was building it all
the time with bjam using debug build type. Everythin worked fine.
Now when I tried to build it in release mode, importing the module fails
with "Segmentation fault" message.
$ PYTHONPATH="./bin/gcc-4.1.2/release" python26
Python 2.6.5 (r265:79063, Apr 9 2010, 11:16:46)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Cream
Segmentation fault
I'm using:
- gcc 4.1.2
- boost 1.44
- python 2.6.5
- gccxml 0.9( 1.135 )
- pygccxml and pyplusplus from SVN
The difference betweend debug and relase shows during compilation.
There's an additional warning message when compiling in release:
/home/macieks/boost/boost_1_44_0/boost/python/converter/pyobject_type.hpp:
In static member function 'static bool
boost::python::converter::pyobject_type<Object,
pytype>::check(PyObject*) [with Object = boost::python::indexing::slice,
PyTypeObject* pytype = (& PySlice_Type)]':
/home/macieks/boost/boost_1_44_0/boost/python/converter/obj_mgr_arg_from_python.hpp:69:
instantiated from 'bool
boost::python::converter::object_manager_value_arg_from_python<T>::convertible()
const [with T = boost::python::indexing::slice]'
/home/macieks/boost/boost_1_44_0/boost/preprocessor/iteration/detail/local.hpp:37:
instantiated from 'PyObject*
boost::python::detail::caller_arity<2u>::impl<F, Policies,
Sig>::operator()(PyObject*, PyObject*) [with F = void
(*)(std::vector<CREAMTYPES__Property*,
std::allocator<CREAMTYPES__Property*> >&,
boost::python::indexing::slice), Policies =
boost::python::return_internal_reference<1ul,
boost::python::default_call_policies>, Sig = boost::mpl::vector3<void,
std::vector<CREAMTYPES__Property*, std::allocator<CREAMTYPES__Property*>
>&, boost::python::indexing::slice>]'
/home/macieks/boost/boost_1_44_0/boost/python/object/py_function.hpp:38:
instantiated from 'PyObject*
boost::python::objects::caller_py_function_impl<Caller>::operator()(PyObject*,
PyObject*) [with Caller = boost::python::detail::caller<void
(*)(std::vector<CREAMTYPES__Property*,
std::allocator<CREAMTYPES__Property*> >&,
boost::python::indexing::slice),
boost::python::return_internal_reference<1ul,
boost::python::default_call_policies>, boost::mpl::vector3<void,
std::vector<CREAMTYPES__Property*, std::allocator<CREAMTYPES__Property*>
>&, boost::python::indexing::slice> >]'
Cream.cpp:818: instantiated from here
/home/macieks/boost/boost_1_44_0/boost/python/converter/pyobject_type.hpp:21:
warning: dereferencing type-punned pointer will break strict-aliasing rules
relase build messages: http://pastie.org/1137650
debug build messages: http://pastie.org/1137649
Jamroot file: http://pastie.org/1137763
Thanks for help.
Cheers,
--
Maciek Sitarz
More information about the Cplusplus-sig
mailing list