Segmentation fault when running pyogre.cegui demo on Debian

mrkissinger

02-12-2006 18:26:14

I tried to compile pyogre.cegui on Debian in this way:

swig -c++ -python -modern \
$(pkg-config --cflags-only-I CEGUI OGRE) \
-Ipyogre/ogre \
pyogre/cegui/cegui.i

gcc -shared -fpic -DPIC \
$(pkg-config --cflags --libs CEGUI OGRE CEGUI-OGRE CEGUI-OPENGL) \
-I/usr/include/python2.4 -o pyogre/cegui/_cegui.so \
pyogre/cegui/cegui_wrap.cxx

cp pyogre/cegui/_cegui.so /usr/lib/python2.4/site-packages/pyogre/

Compiling gave some warning:
pyogre/cegui/cegui_wrap.cxx: In function 'const CEGUI::String& CEGUI_Window_tooltipType_get(CEGUI::Window*)':
pyogre/cegui/cegui_wrap.cxx:4089: 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:4099: warning: returning reference to temporary

When I tried to run some demo, I always got "Segmentation fault".

Can anyone help?

dermont

03-12-2006 07:12:49

You need to include the CEGUI-OGRE-PYTHON.pc package config file, Its in the main dev-1.2.0 directory. it's a workaround to resolve the seg fault problem loading the CEGUI (CEGUIFalagardBase) module. You'll probably need to add that dir to PKG_CONFIG_PATH. Here's my ouput from running setup.py:


swig -python -c++ -modern -Ipyogre/cegui -I/usr/local/include/CEGUI -I/usr/local/include/OGRE -I/usr/local/include -Ipyogre/ogre -o pyogre/cegui/cegui_wrap.cxx -outdir pyogre pyogre/cegui/cegui.i

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/CEGUI -I/usr/local/include/OGRE -I/usr/local/include -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

g++ -pthread -shared build/temp.linux-i686-2.4/pyogre/cegui/cegui_wrap.o -o build/lib.linux-i686-2.4/pyogre/_cegui.so -L/usr/local/lib -L/usr/local/lib -lCEGUIOpenGLRenderer -lCEGUIOgreRenderer -lOgreMain -lCEGUIBase -lCEGUIFalagardBase

mrkissinger

20-12-2006 20:57:41

It works, your answers are always very helpful.
THANKS!