Hello,
It appears that the ctypes_intergration stuff in pyplusplus is not 64bit
safe. The general basics is that it is casting a void* to a
boost::uint32_t (which can't fit a void* on 64bit platforms).
See the error below,
/usr/include/OGRE -I/usr/include/python2.5 -I/usr/include/boost
generated/ogre_1.6.1/PatchSurface.pypp.cpp
g++ -o build_dir_2.5/ogre_1.6.1/PixelBox.pypp.os -c `pkg-config
--cflags OGRE` -I -O3 -I./ -DBOOST_PYTHON_MAX_ARITY=19
-DBOOST_PYTHON_NO_PY_SIGNATURES
-I/usr/local/google/foss/pyogre/python-ogre/generated/ogre_1.6.1
-D__PYTHONOGRE_BUILD_CODE -g -I/usr/include -L/usr/lib
-L/usr/lib64 -fPIC -I/usr/include/boost -I/usr/include/OGRE
-I/usr/include/python2.5 -I/usr/include/boost
generated/ogre_1.6.1/PixelBox.pypp.cpp
generated/ogre_1.6.1/__ctypes_integration.pypp.hpp: In function
‘uint32_t pyplusplus::convenience::addressof(const TType*, const
TMemVarType TType::*) [with TType = Ogre::PixelBox, TMemVarType
= void*]’:
generated/ogre_1.6.1/__ctypes_integration.pypp.hpp:49:
instantiated from ‘boost::python::api::object
pyplusplus::convenience::make_addressof_getter(const TMemVarType
TType::*) [with TType = Ogre::PixelBox, TMemVarType = void*]’
generated/ogre_1.6.1/PixelBox.pypp.cpp:162: instantiated from
here
generated/ogre_1.6.1/__ctypes_integration.pypp.hpp:29: error:
cast from ‘void* const*’ to ‘uint32_t’ loses precision
scons: * [build_dir_2.5/ogre_1.6.1/PixelBox.pypp.os] Error 1
scons: building terminated because of errors.
I ended up changing the code in
pyplusplus/code_repository/ctypes_intergration.py from boost::uint32_t
to std::size_t.
It seems to compile and work now...
Is that the correct solution?
Tim 'mithro' Ansell