CEGUI-OGRE.pc

SuperElectric

20-01-2006 08:35:33

I'm trying to build pyogre on ubuntu 5.10, but I get the following error, followed by pages of error text:
Package CEGUI-OGRE was not found in the pkg-config search path.
Perhaps you should add the directory containing `CEGUI-OGRE.pc'
to the PKG_CONFIG_PATH environment variable
No package 'CEGUI-OGRE' found

The above message is repeated 3 times, followed by pages of compilation errors about the generated wrapper .cxx files, like the following:
pyogre/ogre/ogre_wrap.cxx:16782: error: invalid cast from type â€"Ogre::Vector2" to type "Ogre::Real"
pyogre/ogre/ogre_wrap.cxx: In function "PyObject* _wrap_Vector3_getRotationTo__SWIG_0(PyObject*, PyObject*)":
pyogre/ogre/ogre_wrap.cxx:18622: error: no matching function for call to "Ogre::Vector3::getRotationTo(const Ogre::Vector3&, const Ogre::Vector3&) const"
/usr/local/include/OGRE/OgreVector3.h:526: note: candidates are: Ogre::Quaternion Ogre::Vector3::getRotationTo(const Ogre::Vector3&) const
pyogre/ogre/ogre_wrap.cxx: In function "PyObject* _wrap_new_Quaternion__SWIG_10(PyObject*, PyObject*)":
pyogre/ogre/ogre_wrap.cxx:26281: error: no matching function for call to "Ogre::Quaternion::Quaternion(Ogre::Real*&)"

I've searched my system and I can't find this CEGUI-OGRE.pc file that it's looking for (there's a CEGUI-OGRE.pc.in file in /usr/local/share/ogrenew/Samples/Common/CEGUIRenderer, but I doubt that's it). I'm using the current source release of Ogre (1.0.6).

Where is this CEGUI-OGRE.pc file supposed to be?

Thanks,
-- Matt

dermont

22-01-2006 08:45:08

From your post on the main forum regarding CEGUI:
http://www.ogre3d.org/phpBB2/viewtopic.php?t=16819&highlight=pyogre

If you want to build pyOGRE without CEGUI support, try a clean install of pyogre (may not be needed) and disable the cegui build by replacing the following line in setup.py:

#ext_modules=[ext_ogre, ext_cegui])
ext_modules=[ext_ogre])

Then build and install.

SuperElectric

22-01-2006 17:16:38

Thanks for the reply. So I don't get the errors regarding CEGUI-OGRE.pc anymore, but I still get the pages of compile errors in the (presumably SWIG-generated) .cxx files. The first lines of the output are quoted below. I'm particularly weirded out by the 4th line of output, "skipping pyogre/ogre/ogre.i":
$ sudo python setup.py build
running build
running build_ext
building 'pyogre._ogre' extension
skipping pyogre/ogre/ogre.i
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
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/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
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
/usr/local/include/OGRE/OgreController.h: In instantiation of ‘Ogre::ControllerFunction<Ogre::Real>’:
/usr/local/include/OGRE/OgrePredefinedControllers.h:160: instantiated from here
/usr/local/include/OGRE/OgreController.h:48: warning: ‘class Ogre::ControllerFunction<Ogre::Real>’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgrePredefinedControllers.h:161: warning: ‘class Ogre::AnimationControllerFunction’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgrePredefinedControllers.h:183: warning: ‘class Ogre::ScaleControllerFunction’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgrePredefinedControllers.h:222: warning: ‘class Ogre::WaveformControllerFunction’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgreEventTarget.h:50: warning: ‘class Ogre::EventTarget’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgrePositionTarget.h:48: warning: ‘class Ogre::PositionTarget’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgreRenderQueueListener.h:48: warning: ‘class Ogre::RenderQueueListener’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgreRenderTargetListener.h:69: warning: ‘class Ogre::RenderTargetListener’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgreEventListeners.h:63: warning: ‘class Ogre::MouseListener’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgreEventListeners.h:95: warning: ‘class Ogre::KeyListener’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgreEventListeners.h:124: warning: ‘class Ogre::MouseMotionListener’ has virtual functions but non-virtual destructor
/usr/local/include/OGRE/OgreTargetManager.h:57: warning: ‘class Ogre::TargetManager’ has virtual functions but non-virtual destructor
pyogre/ogre/ogre_wrap.cxx: In function ‘PyObject* _wrap_Vector2_crossProduct(PyObject*, PyObject*)’:
pyogre/ogre/ogre_wrap.cxx:16877: error: invalid cast from type ‘Ogre::Vector2’ to type ‘Ogre::Real’
pyogre/ogre/ogre_wrap.cxx: In function ‘PyObject* _wrap_Vector3_getRotationTo__SWIG_0(PyObject*, PyObject*)’:
pyogre/ogre/ogre_wrap.cxx:18717: error: no matching function for call to ‘Ogre::Vector3::getRotationTo(const Ogre::Vector3&, const Ogre::Vector3&) const’
/usr/local/include/OGRE/OgreVector3.h:526: note: candidates are: Ogre::Quaternion Ogre::Vector3::getRotationTo(const Ogre::Vector3&) const
pyogre/ogre/ogre_wrap.cxx: In function ‘PyObject* _wrap_new_Quaternion__SWIG_10(PyObject*, PyObject*)’:
pyogre/ogre/ogre_wrap.cxx:26376: error: no matching function for call to ‘Ogre::Quaternion::Quaternion(Ogre::Real*&)’
(...)

Is setup.py skipping ogre.i for some reason, and therefore not telling SWIG to generate a bunch of needed .cxx files? If so, why would ogre.i be skipped? (This happens even after I run python setup.py clean.)

-- Matt

SuperElectric

22-01-2006 21:10:03

With help from the main ogre forums, I got ogre-cegui up and compiling, so I reinstated the ogre-cegui bindings in pyogre's setup.py. It doesn't complain about cegui being missing anymore, but the above compiler errors are still there.

Can anybody suggest something I could try that might yield more information?

-- Matt

SuperElectric

23-01-2006 19:05:20

Am I possibly using incompatible versions of pyogre and ogre? I'm using ogre 1.0.6, and pyogre 1.0.6-0. (I've also tried the svn pyogre). I had assumed up to now that equal version numbers denote compatibility, but maybe that was naive?

griminventions

23-01-2006 20:13:42

I don't think OGRE is required at all if you get the packages Clay released? Since they come with the _ogre dll prebuilt.

SuperElectric

23-01-2006 20:21:11

dll? Are there similar prebuilt packages for (preferably ubuntu) linux?

SuperElectric

23-01-2006 23:22:40

I just ttried manually removing th ogre_wrap.h and ogre_wrap.cxx files from pyogre/ogre, in addition to running python setup.py clean. The build process now goes further, but exits with the following error (error on last line):
creating build/temp.linux-i686-2.4/pyogre/cegui
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/CEGUI -I/usr/local/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
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
pyogre/cegui/cegui_wrap.cxx: In constructor ‘EventCallback::EventCallback(PyObject*)’:
pyogre/cegui/cegui_wrap.cxx:2503: warning: ‘EventCallback::mSubscriber’ will be initialized after
pyogre/cegui/cegui_wrap.cxx:2502: warning: ‘swig_type_info* EventCallback::mType’
pyogre/cegui/cegui_wrap.cxx:2413: warning: when initialized here
pyogre/cegui/cegui_wrap.cxx: In copy constructor ‘EventCallback::EventCallback(const EventCallback&)’:
pyogre/cegui/cegui_wrap.cxx:2503: warning: ‘EventCallback::mSubscriber’ will be initialized after
pyogre/cegui/cegui_wrap.cxx:2502: warning: ‘swig_type_info* EventCallback::mType’
pyogre/cegui/cegui_wrap.cxx:2422: warning: when initialized here
pyogre/cegui/cegui_wrap.cxx: In member function ‘bool EventCallback::operator()(const CEGUI::EventArgs&) const’:
pyogre/cegui/cegui_wrap.cxx:2460: error: ‘raise’ is not a member of ‘Swig::DirectorMethodException’

Does this mean I have the wrong version of SWIG? I'm using 1.3.24. If so, what SWIG versions are known to work?

dermont

24-01-2006 02:53:18

Use Swig 1.3.27, that should resolve the above problem.

Edit: and manually remove the pyogre/cegui/cegui_wrap.cxx and pyogre/cegui/cegui_wrap.h files before rebuilding.

SuperElectric

26-01-2006 17:56:53

Ok, it compiles now, but I'm still unable to run any of the demo code. When I try, I get an error saying it can't find libOgreMain.so.4, even though it's right there in /usr/local/lib. I've posted the problem in another thread (here), since that thread is about a very similar problem in windows.