python-ogre compile failed on macosx10.6

pyogrebeginner

30-01-2011 02:14:28

Hi,
I am following the steps on http://wiki.python-ogre.org/index.php/OSXBuild10.6 to install python-ogre on macosx10.6. Everything went fine except the last step "python2.5 python-ogre/BuildModule.py -g -c ogre". Generating ogre code was Ok, but compile failed. I tried with and without "curl http://54.org/alfred/python-ogre/OSXBuild10.6.patch | patch -p0 -N -d python-ogre", it always fails at the same place.


generated/ogre_1.6.4/UTFString.pypp.cpp:1453: error: address of overloaded function with no contextual type information
generated/ogre_1.6.4/UTFString.pypp.cpp:2698: error: address of overloaded function with no contextual type information
generated/ogre_1.6.4/UTFString.pypp.cpp:3057: error: address of overloaded function with no contextual type information
generated/ogre_1.6.4/UTFString.pypp.cpp:3701: error: address of overloaded function with no contextual type information

generated/ogre_1.6.4/UTFString.pypp.cpp:1428: instantiated from here
/Users/user/developer/root/usr/include/boost/python/operators.hpp:212: error: ambiguous overload for ‘operator+’ in ‘l + r’
generated/ogre_1.6.4/UTFString.pypp.cpp:1430: instantiated from here
/Users/user/developer/root/usr/include/boost/python/operators.hpp:301: error: ambiguous overload for ‘operator+=’ in ‘l.
generated/ogre_1.6.4/UTFString.pypp.cpp:1432: instantiated from here
/Users/user/developer/root/usr/include/boost/python/operators.hpp:213: error: ambiguous overload for ‘operator-’ in ‘l - r’
generated/ogre_1.6.4/UTFString.pypp.cpp:1434: instantiated from here
/Users/user/developer/root/usr/include/boost/python/operators.hpp:302: error: ambiguous overload for ‘operator-=’ in ‘l.


I took a look at UTFString.pypp.cpp, the code that produces errors involves const_fwd_iterator, const_rev_iterator, fwd_iterator, rev_iterator. Code is posted below. It's related to the first 4 errors.


{ //::Ogre::UTFString::_const_fwd_iterator::operator[]

typedef short unsigned int const & ( ::Ogre::UTFString::_const_fwd_iterator::*__getitem___function_type )( ::size_t ) const;

_const_fwd_iterator_exposer.def(
"__getitem__"
, __getitem___function_type( &::Ogre::UTFString::_const_fwd_iterator::operator[] )
, ( bp::arg("n") )
, bp::return_value_policy< bp::copy_const_reference >()
, "! dereference at offset operator\n" );

}
{ //::Ogre::UTFString::_const_fwd_iterator::operator[]

typedef short unsigned int const & ( ::Ogre::UTFString::_const_fwd_iterator::*__getitem___function_type )( long int ) const;

_const_fwd_iterator_exposer.def(
"__getitem__"
line 1453: , __getitem___function_type( &::Ogre::UTFString::_const_fwd_iterator::operator[] )
, ( bp::arg("n") )
, bp::return_value_policy< bp::copy_const_reference >()
, "! dereference at offset operator\n" );

}


Following code is related to the last 4 errors.


_const_fwd_iterator_exposer.def( bp::self + bp::other< size_t >() );
line 1428: _const_fwd_iterator_exposer.def( bp::self + bp::other< long int >() );
_const_fwd_iterator_exposer.def( bp::self += bp::other< size_t >() );
_const_fwd_iterator_exposer.def( bp::self += bp::other< long int >() );
_const_fwd_iterator_exposer.def( bp::self - bp::other< size_t >() );
_const_fwd_iterator_exposer.def( bp::self - bp::other< long int >() );
_const_fwd_iterator_exposer.def( bp::self -= bp::other< size_t >() );
_const_fwd_iterator_exposer.def( bp::self -= bp::other< long int >() );



It seems to me that the errors are somehow related to overloading size_t and long int. It's just a wild guess.

I need to install python-ogre for a class. Has anyone successfully installed python-ogre on macosx10.6? I saw some post that someone was able to install it on macosx10.5. But I really don't want to go through the trouble of reinstalling the operating system. Any advice is greatly appreciated. Thanks!

terryH

13-08-2011 23:54:59

I am geeting the exact same behavior under Mac OS X10.6.8 running on a MacBook Pro
with a 2.66 GHz Intel Core i7 and 4GB RAM. Any words of wisdom would be appreciated.
Thanks.

iwanantonowitsch

14-08-2011 00:26:43

i thought dev said that linux and mac aren't really supported, there are versions for those platforms and some people can use it but the main platform remains PC but im not sure, ive been away for a while so maybe things have changed.