Compile problems on Ubuntu 8.04


13-05-2008 18:03:55


I'm getting an error at step 5 (generating the wrapper and compile
my out.log looks like this:

The same thing happens when it compiles ogre.

Before this I had one error which may have something to do with this
I think it was at step 4 I had to copy the folder boost_1_34_1 from
my /development/ folder to /development/root/usr/include/ and rename
the folder to boost-1_34_1. I tried to recompile boost only and
checked the out.log
but I couldn't find any warnings or what ever that indicates a failure
of the boost build.

The native ogre examples work fine. I'm on Kubuntu Hardy.



14-05-2008 13:14:15

I've got exactly the same problem, but I didn't find any solution...

For now, I'm using the Windows version with wine and/or 1.0 binaries, but not all the examples works.

I hope someone has the solution.

P.S : I can't access to your log file.


14-05-2008 19:20:22

Looks like my post on rafb was deleted. Maybe entries get deleted after a certain amount of time. Anyway I'll post it again directly:

05-14 19:36 PythonOgre.BuildModule INFO Building Source code for ois
05-14 19:36 PythonOgre.BuildModule DEBUG Spawning 'python' in '/home/stefan/development/python-ogre/code_generators/ois'
05-14 19:36 PythonOgre.BuildModule INFO Compiling Source code for ois
05-14 19:36 PythonOgre.BuildModule DEBUG Spawning 'scons PROJECTS=ois' in '/home/stefan/development/python-ogre'
05-14 19:36 PythonOgre.BuildModule WARNING Task Failed
05-14 19:36 PythonOgre.BuildModule DEBUG scons: Reading SConscript files ...
Building ois
WARNING: Over-Writing /home/stefan/development/python-ogre/generated/ois_1.1/SConscript as it already exists
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build_dir_2.5/ois_1.1/ -Wl,-rpath=\/../../lib `pkg-config --libs OGRE` --strip-all -lstdc++ -shared build_dir_2.5/ois_1.1/Axis.pypp.os build_dir_2.5/ois_1.1/AxisVector.pypp.os build_dir_2.5/ois_1.1/Button.pypp.os build_dir_2.5/ois_1.1/Component.pypp.os build_dir_2.5/ois_1.1/ConditionalEffect.pypp.os build_dir_2.5/ois_1.1/ConstantEffect.pypp.os build_dir_2.5/ois_1.1/Effect.pypp.os build_dir_2.5/ois_1.1/Envelope.pypp.os build_dir_2.5/ois_1.1/EventArg.pypp.os build_dir_2.5/ois_1.1/Exception.pypp.os build_dir_2.5/ois_1.1/ForceEffect.pypp.os build_dir_2.5/ois_1.1/ForceFeedback.pypp.os build_dir_2.5/ois_1.1/InputManager.pypp.os build_dir_2.5/ois_1.1/Interface.pypp.os build_dir_2.5/ois_1.1/JoyStick.pypp.os build_dir_2.5/ois_1.1/JoyStickEvent.pypp.os build_dir_2.5/ois_1.1/JoyStickListener.pypp.os build_dir_2.5/ois_1.1/JoyStickState.pypp.os build_dir_2.5/ois_1.1/KeyEvent.pypp.os build_dir_2.5/ois_1.1/KeyListener.pypp.os build_dir_2.5/ois_1.1/Keyboard.pypp.os build_dir_2.5/ois_1.1/Mouse.pypp.os build_dir_2.5/ois_1.1/MouseEvent.pypp.os build_dir_2.5/ois_1.1/MouseListener.pypp.os build_dir_2.5/ois_1.1/MouseState.pypp.os build_dir_2.5/ois_1.1/Object.pypp.os build_dir_2.5/ois_1.1/ParamList.pypp.os build_dir_2.5/ois_1.1/PeriodicEffect.pypp.os build_dir_2.5/ois_1.1/Pov.pypp.os build_dir_2.5/ois_1.1/RampEffect.pypp.os build_dir_2.5/ois_1.1/Slider.pypp.os build_dir_2.5/ois_1.1/SupportedEffectList.pypp.os build_dir_2.5/ois_1.1/_ois_.main.os build_dir_2.5/ois_1.1/_ois__enumerations.pypp.os -L/home/stefan/development/root/usr/lib -L/home/stefan/development/root/usr/lib -L/usr/lib/python2.5/libs -lOIS -lboost_python-gcc42-1_34_1
scons: building terminated because of errors.

05-14 19:36 PythonOgre.BuildModule DEBUG /usr/bin/ld: cannot find -lboost_python-gcc42-1_34_1
collect2: ld returned 1 exit status
scons: *** [build_dir_2.5/ois_1.1/] Error 1

Like pointed out in
this thread it seems to be bjam thats failing. Compiling bjam with -fno-strict-aliasing seems to be fixing the problem ( and maybe introducing new problems ;) ). I've been looking through the build shell script ( wich compiles bjam how to pass the flag to gcc when it compiles but didn't understand anything :). I could'nt figure out how to compile it correctly with the flag applied. The other thing is the bjam folder is sometimes called boost-1_34_1 and sometimes boost_1_34_1 wich makes the compilation fail.


14-05-2008 19:26:59

I've been looking through the build shell script ( wich compiles bjam how to pass the flag to gcc when it compiles but didn't understand anything Smile. I could'nt figure out how to compile it correctly with the flag applied. The other thing is the bjam folder is sometimes called boost-1_34_1 and sometimes boost_1_34_1 wich makes the compilation fail.

I've try to modify it too and I think I found where add the flag for bjam :


line 383, replace :

bjambuildset = 'gcc'

with :

bjambuildset = 'gcc -fno-strict-aliasing'

But it didn't solve my problem. Note that I did not redo the build entirely so test if you want, maybe it'll works ;).



14-05-2008 19:52:20

I don't think this will work because this isn't how the bjam build works. I've been trying to step through the compile steps manually and tried to compile bjam with "./ gcc -fno-strict-aliasing" ( python-ogre would do "./ gcc" )
but then the script interprets the flag as a directory. (./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root= -fno-strict-aliasing no-strict-aliasing: No such file or directory)

Btw, You will also need to modify the file and replace all occurrences of boost- with boost_ otherwise it won't work anyway since the script tries to patch against a wrong directory.


16-05-2008 19:58:47

Hey, I think I made some progress on this issue :)
Since compiling bjam always resulted in a corrupted binary (segfault) I have tried compiling python-ogre with a precompiled
bjam that came with ubuntu (apt-get install bjam). What I did was copy the bjam executable from my /usr/bin/ folder to
myhomefolder/development/boost_1_34_1/tools/jam/src/bin.linuxx86/ and run the boost build by hand.

I could run all the demos fine, although I didn't try compiling additional modules like ogrenewt etc.

I have uploaded the precompiled binaries on rapidshare: ... r.bz2.html

I don't know what exactly is needed to run all the demos so if somebody could try the binaries I would upload missing stuff then. Place the root folder from the zip into your development folder where the python-ogre svn is located. Now you should be able to run the demos after changing your plugins.cfg to:

# Defines plugins to load

## Use this for Windows
# Define plugin folder

## NOTE use this for MacOS or Linux

I hope this helps a bit and sorry for my bad english and the rather unprofessional trial and error method I have used here :)


17-05-2008 11:25:18

Thank you SomeFusion,
I was thinking about this solution but I didn't have time to test it!! :D

I'll try your binaries and tell you if it works ;).

Thanks again man,


18-05-2008 11:07:19

I've tried your binaries and they work like a charm :D

I'll try and build my version which includes more libraries.


18-05-2008 19:08:51

I've tried your binaries, they work, but the don't work...

I had the same problem with the 1.0 linux binaries and the 1.1 windows version under wine.

Here are the errors :
First I have that :
python ImportWarning: Not importing directory '../opcode': missing
from opcode import *

And then I got the config dialog and when I click on accept, I got this errors :

Traceback (most recent call last):
File "", line 209, in <module>
MainFrame = DemoFrame(None, -1, "")
File "", line 170, in __init__
self.ogreWin = DemoOgreWindow(self, -1)
File "/home/dede/development/python-ogre/demos/ogre/", line 57, in __init__
File "/home/dede/development/python-ogre/demos/ogre/", line 112, in _OgreInit
sys.exit('Quit from Config Dialog')
NameError: global name 'sys' is not defined
Erreur de segmentation

Have anybody any solution?



19-05-2008 03:28:31

wxOgre and Linux will not work out of the box on Linux. You need to use some native code in order to extract the proper window handle out of wxWidgets to hand off to Ogre (the default method gives you the wrong one). If you search under my name in this forum you should find it.


19-05-2008 08:58:21

Thank you Game_Ender, I'll search your post so ;).


20-05-2008 22:14:45


Is this solution what you were talking about ? ... highlight=

Andy says that he'll include this solution on the next linux build, but the 1.1 isn't already the next linux build?



22-05-2008 05:06:25

Yes, but Andy is pretty swapped, so I don't think it actually got in. The code is very simple to compile and integrate into your project. You can used wx-config and pkg-config to get the needed compiler flags to build against wxWidgets and GTK. After that you just need to build the file into a shared library.

If I starting working on the Linux side of python-ogre again I will take a look at integrating that by default.


22-05-2008 09:10:31

Ok thanks for the tips ;).

I'll look at this solution as soon as I have time.