Compile problems on Ubuntu 8.04

SomeFusion

13-05-2008 18:03:55

Hi,

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

http://rafb.net/p/CaoKix76.html

The same thing happens when it compiles ogre.

Before this I had one error which may have something to do with this
error.
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.

Thanks,
somefusion

dedesite

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.

SomeFusion

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 generate_code.py' 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/ois.so -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/ois.so] Error 1


Like pointed out in http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=6534&highlight=boost+segmentation+fault
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 (build.sh) 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.

dedesite

14-05-2008 19:26:59

I've been looking through the build shell script (build.sh) 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 :

Open environment.py

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 ;).

Greetings,
Andreas

SomeFusion

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 "./build.sh gcc -fno-strict-aliasing" ( python-ogre would do "./build.sh 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 environment.py 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.

SomeFusion

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:
http://rapidshare.com/files/115383299/p ... 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
PluginFolder=../../../root/usr/lib/OGRE/
#home/andy/development/root/usr/lib/OGRE
#Plugin=RenderSystem_GL.dll
#Plugin=RenderSystem_Direct3D9.dll
#Plugin=Plugin_ParticleFX.dll
#Plugin=Plugin_BSPSceneManager.dll
#Plugin=Plugin_OctreeSceneManager.dll
#Plugin=Plugin_CgProgramManager.dll

##
## NOTE use this for MacOS or Linux
Plugin=RenderSystem_GL
Plugin=Plugin_ParticleFX
Plugin=Plugin_BSPSceneManager
Plugin=Plugin_OctreeSceneManager
Plugin=Plugin_CgProgramManager


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

dedesite

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,
Greetings,
Andreas

Kreso

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.

dedesite

18-05-2008 19:08:51

I've tried your binaries, they work, but the Demo_WX.py 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 Demo_WX.py/usr/lib/python2.5/dis.py:6: ImportWarning: Not importing directory '../opcode': missing __init__.py
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 "Demo_WX.py", line 209, in <module>
MainFrame = DemoFrame(None, -1, "")
File "Demo_WX.py", line 170, in __init__
self.ogreWin = DemoOgreWindow(self, -1)
File "/home/dede/development/python-ogre/demos/ogre/OgreWindowWx.py", line 57, in __init__
self._OgreInit(size,renderSystem)
File "/home/dede/development/python-ogre/demos/ogre/OgreWindowWx.py", line 112, in _OgreInit
sys.exit('Quit from Config Dialog')
NameError: global name 'sys' is not defined
Erreur de segmentation


Have anybody any solution?

Greetings,
Andreas

Game_Ender

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.

dedesite

19-05-2008 08:58:21

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

dedesite

20-05-2008 22:14:45

Game_Ender,

Is this solution what you were talking about ?

http://www.ogre3d.org/phpBB2addons/view ... 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?

Greetings,
Andreas

Game_Ender

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.

dedesite

22-05-2008 09:10:31

Ok thanks for the tips ;).

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