Linux Compile Error "Camera.pypp.cpp"

dermont

15-04-2007 16:44:36

Ogre1.4 svn revison 261, svn update(today) py++/pygccxml and re-compiled boost python module.

There are a number of issues/problems with compiling python-ogre on linux. The following,however, has me stumpted:

generated/ogre_1.4/Camera.pypp.cpp
/usr/local/include/OGRE/OgreFrustum.h: In copy constructor ‘Ogre::Frustum::Frustum(const Ogre::Frustum&)’:
/usr/local/include/OGRE/OgreFrustum.h:66: instantiated from ‘Target boost::lexical_cast(const Source&) [with Target = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Source = Ogre::Camera]’
/media/hda5/boost/boost/python/operators.hpp:349: instantiated from ‘static PyObject* boost::python::detail::operator_1<op_str>::apply<T>::execute(typename boost::python::detail::unwrap_wrapper_<T>::type&) [with T = Camera_wrapper]’
/media/hda5/boost/boost/python/operators.hpp:152: instantiated from ‘void boost::python::detail::operator_<id, L, R>::visit(ClassT&) const [with ClassT = boost::python::class_<Camera_wrapper, boost::python::bases<Ogre::Frustum, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, boost::noncopyable_::noncopyable, boost::python::detail::not_specified>, boost::python::detail::operator_id id = op_str, L = boost::python::detail::not_specified, R = boost::python::detail::not_specified]’
/media/hda5/boost/boost/python/def_visitor.hpp:31: instantiated from ‘static void boost::python::def_visitor_access::visit(const V&, classT&) [with V = boost::python::def_visitor<boost::python::detail::operator_<op_str, boost::python::detail::not_specified, boost::python::detail::not_specified> >, classT = boost::python::class_<Camera_wrapper, boost::python::bases<Ogre::Frustum, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, boost::noncopyable_::noncopyable, boost::python::detail::not_specified>]’
/media/hda5/boost/boost/python/def_visitor.hpp:67: instantiated from ‘void boost::python::def_visitor<DerivedVisitor>::visit(classT&) const [with classT = boost::python::class_<Camera_wrapper, boost::python::bases<Ogre::Frustum, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, boost::noncopyable_::noncopyable, boost::python::detail::not_specified>, DerivedVisitor = boost::python::detail::operator_<op_str, boost::python::detail::not_specified, boost::python::detail::not_specified>]’
/media/hda5/boost/boost/python/class.hpp:225: instantiated from ‘boost::python::class_<T, X1, X2, X3>& boost::python::class_<T, X1, X2, X3>::def(const boost::python::def_visitor<Derived>&) [with Derived = boost::python::detail::operator_<op_str, boost::python::detail::not_specified, boost::python::detail::not_specified>, W = Camera_wrapper, X1 = boost::python::bases<Ogre::Frustum, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, X2 = boost::noncopyable_::noncopyable, X3 = boost::python::detail::not_specified]’
generated/ogre_1.4/Camera.pypp.cpp:1647: instantiated from here
/usr/local/include/OGRE/OgreVertexIndexData.h:47: error: ‘Ogre::VertexData::VertexData(const Ogre::VertexData&)’ is private
/usr/local/include/OGRE/OgreFrustum.h:66: error: within this context
/usr/local/include/OGRE/OgreCamera.h: In copy constructor ‘Ogre::Camera::Camera(const Ogre::Camera&)’:
/usr/local/include/OGRE/OgreCamera.h:81: warning: synthesized method ‘Ogre::Frustum::Frustum(const Ogre::Frustum&)’ first required here
/media/hda5/boost/boost/lexical_cast.hpp: In function ‘Target boost::lexical_cast(const Source&) [with Target = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Source = Ogre::Camera]’:
/media/hda5/boost/boost/python/operators.hpp:349: instantiated from ‘static PyObject* boost::python::detail::operator_1<op_str>::apply<T>::execute(typename boost::python::detail::unwrap_wrapper_<T>::type&) [with T = Camera_wrapper]’
/media/hda5/boost/boost/python/operators.hpp:152: instantiated from ‘void boost::python::detail::operator_<id, L, R>::visit(ClassT&) const [with ClassT = boost::python::class_<Camera_wrapper, boost::python::bases<Ogre::Frustum, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, boost::noncopyable_::noncopyable, boost::python::detail::not_specified>, boost::python::detail::operator_id id = op_str, L = boost::python::detail::not_specified, R = boost::python::detail::not_specified]’
/media/hda5/boost/boost/python/def_visitor.hpp:31: instantiated from ‘static void boost::python::def_visitor_access::visit(const V&, classT&) [with V = boost::python::def_visitor<boost::python::detail::operator_<op_str, boost::python::detail::not_specified, boost::python::detail::not_specified> >, classT = boost::python::class_<Camera_wrapper, boost::python::bases<Ogre::Frustum, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, boost::noncopyable_::noncopyable, boost::python::detail::not_specified>]’
/media/hda5/boost/boost/python/def_visitor.hpp:67: instantiated from ‘void boost::python::def_visitor<DerivedVisitor>::visit(classT&) const [with classT = boost::python::class_<Camera_wrapper, boost::python::bases<Ogre::Frustum, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, boost::noncopyable_::noncopyable, boost::python::detail::not_specified>, DerivedVisitor = boost::python::detail::operator_<op_str, boost::python::detail::not_specified, boost::python::detail::not_specified>]’
/media/hda5/boost/boost/python/class.hpp:225: instantiated from ‘boost::python::class_<T, X1, X2, X3>& boost::python::class_<T, X1, X2, X3>::def(const boost::python::def_visitor<Derived>&) [with Derived = boost::python::detail::operator_<op_str, boost::python::detail::not_specified, boost::python::detail::not_specified>, W = Camera_wrapper, X1 = boost::python::bases<Ogre::Frustum, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, X2 = boost::noncopyable_::noncopyable, X3 = boost::python::detail::not_specified]’
generated/ogre_1.4/Camera.pypp.cpp:1647: instantiated from here
/media/hda5/boost/boost/lexical_cast.hpp:1073: warning: synthesized method ‘Ogre::Camera::Camera(const Ogre::Camera&)’ first required here
/media/hda5/boost/boost/lexical_cast.hpp:1073: warning: initializing argument 1 of ‘Target boost::detail::lexical_cast(typename boost::call_traits<T2>::value_type, CharT*, size_t) [with Target = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Source = Ogre::Camera, bool Unlimited = true, CharT = char]’
scons: *** [build_dir_2.4/ogre_1.4/Camera.pypp.os] Error 1
scons: building terminated because of errors.


As a hack I updated Camera.pypp.cpp and commented out line 1647:

// Camera_exposer.def( bp::self_ns::str( bp::self ) );


With the above hack the ogre module compiles, imports and the demos run. Any help appreciated.

andy

16-04-2007 04:57:52

Just to confirm that the current Python-Ogre support is for the Ogre 1.4 release source (not the Ogre CVS version -- just in case)

And your fix is currently the right one :) I'm building at the moment under Linux and will see if I get the same problem or not..

What linux system etc are you using..

Cheers
Andy

dermont

16-04-2007 20:12:41

Thanks for replying.

Andy wrote:

What linux system etc are you using

Sorry only Ubuntu at present moment. I've tried combination of gcc 3.4.6,4.0.3,4.1.1,4.1.2,4.2(svn), each with it's quirks. Also to confirm that the build is against Ogre1.4 (not CVS).

To confirm this I've compiled on windows with the following:

- VC 2005 Express SP 1
- Ogre1.4
- Python Ogre svn revison 261
- gccxml/py++/pygccxml probably a week old.

1 (one) Compile Error (which is probably more useful to you):

1>e:\ogre\ogre-win32-v1-4-0\ogrenew\ogremain\include\OgreFrustum.h(585) : error C2248: 'Ogre::VertexData::VertexData' : cannot access private member declared in class 'Ogre::VertexData'
1> E:\OGRE\ogre-win32-v1-4-0\ogrenew\OgreMain\include\OgreVertexIndexData.h(47) : see declaration of 'Ogre::VertexData::VertexData'
1> E:\OGRE\ogre-win32-v1-4-0\ogrenew\OgreMain\include\OgreVertexIndexData.h(44) : see declaration of 'Ogre::VertexData'
1> This diagnostic occurred in the compiler generated function 'Ogre::Frustum::Frustum(const Ogre::Frustum &)'


Same as above, comment out the following:

//Camera_exposer.def( bp::self_ns::str( bp::self ) );


Ogre module compiles/links and imports OK.


Edit : Sorry should have mentioned, the above is for Python2.4.