[SOLVED] PyOgre compilation problem (GCC 4.1?)

flowolf

16-03-2006 18:55:21

Hi all,
I'm trying to compile the current PyOgre SVN snapshot (using GCC 4.1) but I get the following error:
flowolf@shannara ~/downloads/coding/python/pyogre $ python setup.py build
running build
running build_ext
building 'pyogre._ogre' extension
swigging pyogre/ogre/ogre.i to pyogre/ogre/ogre_wrap.cxx
swig -python -c++ -modern -Ipyogre/ogre -I/usr/include/OGRE -o pyogre/ogre/ogre_wrap.cxx -outdir pyogre pyogre/ogre/ogre.i
/usr/include/OGRE/OgreVertexIndexData.h:151: Warning(362): operator= ignored
/usr/include/OGRE/OgreTexture.h:338: Warning(362): operator= ignored
pyogre/ogre/OgreStringVector.i:9: Warning(404): Template 'SharedPtr<std::vector<Ogre::String > >' was already wrapped,
pyogre/ogre/OgreStringVector.i:9: Warning(404): previous wrap of 'SharedPtr<std::vector<Ogre::String > >'.
/usr/include/OGRE/OgreFileSystem.h:106: Warning(402): Base class 'ArchiveFactory' is incomplete.
/usr/include/OGRE/OgrePrerequisites.h:190: Warning(402): Only forward declaration 'ArchiveFactory' was found.
/usr/include/OGRE/OgreResourceGroupManager.h:64: Warning(515): Target language argument 'Ogre::ResourcePtr const &resource' discards const in director method ResourceGroupListener::resourceLoadStarted.
/usr/include/OGRE/OgreRenderTargetListener.h:69: Warning(515): Target language argument 'Ogre::RenderTargetEvent const &evt' discards const in director method RenderTargetListener::preRenderTargetUpdate.
/usr/include/OGRE/OgreRenderTargetListener.h:69: Warning(515): Target language argument 'Ogre::RenderTargetEvent const &evt' discards const in director method RenderTargetListener::postRenderTargetUpdate.
/usr/include/OGRE/OgreRenderTargetListener.h:69: Warning(515): Target language argument 'Ogre::RenderTargetViewportEvent const &evt' discards const in director method RenderTargetListener::postViewportUpdate.
/usr/include/OGRE/OgreRenderTargetListener.h:69: Warning(515): Target language argument 'Ogre::RenderTargetViewportEvent const &evt' discards const in director method RenderTargetListener::preViewportUpdate.
pyogre/ogre/OgreEventListeners.i:89: Warning(515): Target language argument 'Ogre::FrameEvent const &evt' discards const in director method CombinedListener::frameStarted.
pyogre/ogre/OgreEventListeners.i:89: Warning(515): Target language argument 'Ogre::FrameEvent const &evt' discards const in director method CombinedListener::frameEnded.
creating build
creating build/temp.linux-i686-2.4
creating build/temp.linux-i686-2.4/pyogre
creating build/temp.linux-i686-2.4/pyogre/ogre
i686-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -fPIC -I/usr/include/OGRE -I/usr/include/python2.4 -c pyogre/ogre/ogre_wrap.cxx -o build/temp.linux-i686-2.4/pyogre/ogre/ogre_wrap.o -DEXT_HASH
i686-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -fPIC -I/usr/include/OGRE -I/usr/include/python2.4 -c pyogre/ogre/VertexBufferProxy.cxx -o build/temp.linux-i686-2.4/pyogre/ogre/VertexBufferProxy.o -DEXT_HASH
In file included from /usr/include/python2.4/Python.h:8,
from pyogre/ogre/VertexBufferProxy.h:8,
from pyogre/ogre/VertexBufferProxy.cxx:1:
/usr/include/python2.4/pyconfig.h:838:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include/g++-v4/i686-pc-linux-gnu/bits/os_defines.h:39,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:35,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include/g++-v4/bits/stl_algobase.h:64,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include/g++-v4/vector:67,
from pyogre/ogre/VertexBufferProxy.h:4,
from pyogre/ogre/VertexBufferProxy.cxx:1:
/usr/include/features.h:154:1: warning: this is the location of the previous definition
pyogre/ogre/VertexBufferProxy.cxx: In member function ‘void VertexBufferProxy::setByte(Ogre::uint32, Ogre::uint32, const Ogre::Vector4&)’:
pyogre/ogre/VertexBufferProxy.cxx:153: warning: converting to ‘unsigned char’ from ‘const Ogre::Real’
pyogre/ogre/VertexBufferProxy.cxx:154: warning: converting to ‘unsigned char’ from ‘const Ogre::Real’
pyogre/ogre/VertexBufferProxy.cxx:155: warning: converting to ‘unsigned char’ from ‘const Ogre::Real’
pyogre/ogre/VertexBufferProxy.cxx:156: warning: converting to ‘unsigned char’ from ‘const Ogre::Real’
i686-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -fPIC -I/usr/include/OGRE -I/usr/include/python2.4 -c pyogre/ogre/IndexBufferProxy.cxx -o build/temp.linux-i686-2.4/pyogre/ogre/IndexBufferProxy.o -DEXT_HASH
creating build/lib.linux-i686-2.4
creating build/lib.linux-i686-2.4/pyogre
i686-pc-linux-gnu-g++ -pthread -shared build/temp.linux-i686-2.4/pyogre/ogre/ogre_wrap.o build/temp.linux-i686-2.4/pyogre/ogre/VertexBufferProxy.o build/temp.linux-i686-2.4/pyogre/ogre/IndexBufferProxy.o -o build/lib.linux-i686-2.4/pyogre/_ogre.so -lOgreMain
building 'pyogre._cegui' extension
swigging pyogre/cegui/cegui.i to pyogre/cegui/cegui_wrap.cxx
swig -python -c++ -modern -Ipyogre/cegui -I/usr/include/CEGUI -I/usr/include/OGRE -Ipyogre/ogre -o pyogre/cegui/cegui_wrap.cxx -outdir pyogre pyogre/cegui/cegui.i
/usr/include/OGRE/OgreSceneManager.h:91: Warning(312): Nested struct not currently supported (ignored).
/usr/include/OGRE/OgreSceneManager.h:96: Warning(312): Nested struct not currently supported (ignored).
/usr/include/CEGUI/CEGUIEvent.h:235: Warning(312): Nested class not currently supported (ignored)
/usr/include/CEGUI/CEGUIEvent.h:248: Warning(312): Nested class not currently supported (ignored).
/usr/include/OGRE/OgreRenderWindow.h:56: Warning(401): Nothing known about base class 'RenderTarget'. Ignored.
/usr/include/OGRE/OgreSceneManager.h:1815: Warning(401): Nothing known about base class 'IntersectionSceneQuery'. Ignored.
/usr/include/OGRE/OgreSceneManager.h:1826: Warning(401): Nothing known about base class 'RaySceneQuery'. Ignored.
/usr/include/OGRE/OgreSceneManager.h:1836: Warning(401): Nothing known about base class 'SphereSceneQuery'. Ignored.
/usr/include/OGRE/OgreSceneManager.h:1846: Warning(401): Nothing known about base class 'PlaneBoundedVolumeListSceneQuery'. Ignored.
/usr/include/OGRE/OgreSceneManager.h:1856: Warning(401): Nothing known about base class 'AxisAlignedBoxSceneQuery'. Ignored.
/usr/include/CEGUI/CEGUIcolour.h:257: Warning(503): Can't wrap 'operator CEGUI::argb_t' unless renamed to a valid identifier.
creating build/temp.linux-i686-2.4/pyogre/cegui
i686-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -fPIC -I/usr/include/CEGUI -I/usr/include/OGRE -I/usr/include/python2.4 -c pyogre/cegui/cegui_wrap.cxx -o build/temp.linux-i686-2.4/pyogre/cegui/cegui_wrap.o -DEXT_HASH
pyogre/cegui/cegui_wrap.cxx:2470: error: extra qualification ‘EventCallback::’ on member ‘operator=’
pyogre/cegui/cegui_wrap.cxx: In function ‘const CEGUI::String& CEGUI_Window_tooltipType_get(CEGUI::Window*)’:
pyogre/cegui/cegui_wrap.cxx:2896: warning: returning reference to temporary
pyogre/cegui/cegui_wrap.cxx: In function ‘const CEGUI::UVector2& CEGUI_Window_windowSize_get(CEGUI::Window*)’:
pyogre/cegui/cegui_wrap.cxx:2906: warning: returning reference to temporary
error: command 'i686-pc-linux-gnu-gcc' failed with exit status 1


Can you help me?
Thank you.

dermont

16-03-2006 19:51:18

Haven't tried gcc4.1 yet, so this is really a shot in the dark, googling the extra qualification error shows threads such as:
http://lists.opensuse.org/archive/opensuse-factory/2005-Nov/0025.html

Maybe try editing CEGUIEventSet.i

//EventCallback &EventCallback::operator=(const EventCallback &rhs)
EventCallback &operator=(const EventCallback &rhs)

pkdawson

16-03-2006 20:37:56

You can always try adding the -fpermissive flag, which sometimes works when GCC decides to get anal about syntax it used to accept in older versions.

flowolf

16-03-2006 21:46:21


Maybe try editing CEGUIEventSet.i

//EventCallback &EventCallback::operator=(const EventCallback &rhs)
EventCallback &operator=(const EventCallback &rhs)


It worked, thank you.