[Entirely] disappointed - Linux

zafiro

11-03-2008 03:08:56

Hi,

I am new to Ogre and Py-ogre. In fact I downloaded, compiled and tested Ogre before trying python-ogre.

While trying to build python-ogre from source, for Fedora 7, Python 2.5 I found two problems.

First. The guide at http://wiki.python-ogre.org/index.php/LinuxBuildV2 makes me download every dependency, build, etc. etc. I understand that this is clean, but I would greately appreciate some hints to take advantage of the things that I have already installed. Like Ogre itself!!!

Second. I had to hack the bootstrap file for ois, so that I could use automake 1.10. Something tricky happened here, but I don't know if this is the root of my problem. Before hacking the bootstrap, when I invoqued:

python python-ogre/BuildModule.py -r -b cegui ois ogre

Cegui and ois failed, but ogre succeded. I found that normal, it must have used the cegui and ois stuff which were already on my system. But the next step would still ask for a local ois, so I went back and did the hack to compile. After that, everything went smothly, until I tried to compile ogre with:

python python-ogre/BuildModule.py -g -c ois ogre

Ois succeded, -g for ogre also did. But the -c part just remained forever. It consumed all my RAM (512Mb) and swap (1G) and froze my computer. I had to increase the swap, it seems that 300Mb would have done it, however I used 500Mb. The computer didn't freeze, but it never ended either. I waited for 4 hour approx. So, I wonder if this is normal and I just got desperated too soon, or if there is something wrong.

The last message on the log is:

03-10 20:32 PythonOgre.BuildModule INFO Compiling Source code for ogre
03-10 20:32 PythonOgre.BuildModule DEBUG Spawning 'scons PROJECTS=ogre' in '/home/varriola/Descargar/Programacion/python-ogre/development/python-ogre'

By the time I stopped it, there was an ogre.so file, but it seems to be useless (jeje it's size is cero).

python python-ogre/BuildModule.py -b install

doesn't complain, even though there are files in the python-ogre/generated/ogre_1.4 directory, but _ogre_.so does not exist in python-ogre/packages2.5/ogre/renderer/OGRE .

zafiro

16-03-2008 17:33:36

I cleaned everything. It took less than 20 minutes to extract, compile and successfully run an Ogre example.

But, ogre.so never gets built. The code is generated, It takes 45 minutes to compile all the os files. But when it comes to finally assemble ogre.so it just consumes all the memory and loops forever. I can not think, that it should take more than 3 times the time it took to build all its components. So it definitely looks like a broken thing.

The log messages are entirely useless. I used ps -fea to figure out what was going on.

myuser 26760 4247 0 19:52 pts/1 00:00:00 python python-ogre/BuildModule.py -g -c ois ogre
myuser 27185 26760 1 20:02 pts/1 00:03:49 python /home/myuser/Descargar/Programacion/python-ogre/development/root/usr/bin/scons PROJECTS=ogre
myuser 31056 27185 0 20:45 pts/1 00:00:00 /usr/bin/g++ -o build_dir_2.5/ogre_1.4/ogre.so -Wl,-rpath=/../../lib -L/home/myuser/Descargar/Programacion/python-ogre/development/root/usr/lib -lOgreMain --strip-all -lstdc++ -shared build_dir_2.5/ogre_1.4/AliasTextureIterator.pypp.os build_dir_2.5/ogre_1.4/AlignedAllocatorVector40.pypp.os build_dir_2.5/ogre_1.4/AlignedMemory.pypp.os build_dir_2.5/ogre_1.4/AnimableObject.pypp.os build_dir_2.5/ogre_1.4/AnimableValue.pypp.os build_dir_2.5/ogre_1.4/Animation.pypp.os ...

myuser 31059 31056 0 20:45 pts/1 00:00:00 /usr/libexec/gcc/i386-redhat-linux/4.1.2/collect2 --eh-frame-hdr -m elf_i386 --hash-style=gnu -shared -o build_dir_2.5/ogre_1.4/ogre.so /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o -L/home/myuser/Descargar/Programacion/python-ogre/development/root/usr/lib -L/home/myuser/Descargar/Programacion/python-ogre/development/root/usr/lib -L/usr/lib/python2.5/libs -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. -rpath=/../../lib -lOgreMain -lstdc++ build_dir_2.5/ogre_1.4/AliasTextureIterator.pypp.os build_dir_2.5/ogre_1.4/AlignedAllocatorVector40.pypp.os build_dir_2.5/ogre_1.4/AlignedMemory.pypp.os build_dir_2.5/ogre_1.4/AnimableObject.pypp.os build_dir_2.5/ogre_1.4/AnimableValue.pypp.os build_dir_2.5/ogre_1.4/Animation.pypp.os
...


myuser 31060 31059 0 20:45 pts/1 00:00:30 /usr/bin/ld --eh-frame-hdr -m elf_i386 --hash-style=gnu -shared -o build_dir_2.5/ogre_1.4/ogre.so /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o -L/home/myuser/Descargar/Programacion/python-ogre/development/root/usr/lib -L/home/myuser/Descargar/Programacion/python-ogre/development/root/usr/lib -L/usr/lib/python2.5/libs -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. -rpath=/../../lib -lOgreMain -lstdc++ build_dir_2.5/ogre_1.4/AliasTextureIterator.pypp.os build_dir_2.5/ogre_1.4/AlignedAllocatorVector40.pypp.os build_dir_2.5/ogre_1.4/AlignedMemory.pypp.os build_dir_2.5/ogre_1.4/AnimableObject.pypp.os build_dir_2.5/ogre_1.4/AnimableValue.pypp.os build_dir_2.5/ogre_1.4/Animation.pypp.os
...



I can't use python-ogre since I just can't even get ogre.so

andy

17-03-2008 02:31:26

Can't really help with the build piece -- 512Mb would appear to be insufficent to build the library (my Linux system has 768M and runs fine)...

Perhaps you should use the Linux binary that is up on sourceforge -- it's not the latest version, however it runs fine and there haven't been significant changes since I put it up there (especially if you are in the initial learning stage) - or use the Windows version :)

http://sourceforge.net/project/showfiles.php?group_id=186291&package_id=227111&release_id=521464

Regards

Andy

zafiro

12-04-2008 00:13:00

Gave it a try. But it didn't work. After following the instructions at the README, I still get


ogre]$ python Demo_Basic.py
Traceback (most recent call last):
File "Demo_Basic.py", line 15, in <module>
import Ogre as ogre
ImportError: No module named Ogre


If I start the interactive python console, the lib dir is there (with its full path). I also tried by setting LD_LIBRARY_PATH, but no luck.

I am affraid I will have to abandon python-ogre until I can buy more memory and build my own copy (windows is not an option for me).

Thanks.

andy

17-04-2008 02:29:53

Did yoy happen to try any of the other demos ???

As it would seem that Demo-Basic shoudn't have been included and has an incorrect import statement...

Andy

bharling

17-04-2008 09:31:25

yeah, that import line should be

import ogre.renderer.OGRE as ogre

Seriously, if you're still having troubles I think you need to double check your build, and / or clean everything and start again. I managed to get pyOgre ( admittedly I didn't try python-ogre) to compile on a PS3 running yellowdog linux not too long ago. If it can compile on a console with such serious ram and processor limits, then I think you should be able to do it on the system you've specified.

zafiro

17-04-2008 20:07:26

Nice. After instaling an older version of zziplib (12) and doing

export PYTHONPATH=<path to here>/packages_2.5
export LD_LIBRARY_PATH=<path to hear>/lib
cd demos/ogre or demos/gui
python Demo_XXX.py


Demos_Smoke worked, and some others. :) Thank you very much for your help :D. I expect this old build will help with my first experiments, I had done some with PyOpenGL but that's like stone knapping. Here is what I am trying to do: http://sourceforge.net/projects/ultima-realidad/

zafiro

23-04-2008 00:40:02

It seemed a good idea to use the Ubuntu version until I tryed "Demo_WX.py". It segment faults while creating the window:


(python:4920): Gdk-WARNING **: gdkdrawable-x11.c:878 drawable is not a pixmap or window
GLRenderSystem::createRenderWindow "wxPython render window", 640x480 windowed miscParams: externalWindowHandle=0
GLXWindow::create
Parsing miscParams
Violación de segmento


This ocurrs inside


File "Demo_WX.py", line 221, in <module>
MainFrame = DemoFrame(None, -1, "")
File "Demo_WX.py", line 170, in __init__
self.ogreWin = DemoOgreWindow(self, -1)
File "/home/.../PythonOgreUbuntu/dist/demos/ogre/OgreWindowWx.py", line , in __init__

self._OgreInit(size,renderSystem)


Ironically I really need to make a graphic interface so I care a lot for this sample.

I can create windows with wxPython, outside python-ogre. So I thought there were conflicts between my libraries and the ones ogre.so was built against. I tryed again to compile my own, but with 1Gb of RAM. This should be more than enough, but when reaching the compile step I get the same results than on my first post (just that the amount of eaten memory is a lot bigger). My build is clean, so I would really like to know where could I start looking for the error. EVERYTHING builds fine, the ogre demos work. and I get all the pypp.os; ogre.so is the only one that never sees the light.

I have never suffered of a problem like this. What can cause this final step to remain forever?

By the way, I still insist on my first question: How long should it take to get ogre.so after everything else has been done?

monokrome

05-07-2010 00:07:44

Hey.

I know that this is an old thread, but the issue exists. I ran into it today and repaired it when I noticed that the compiler is being told to use NUMBER_OF_CPUS*1.5, when the standard setting for compiling has always been NUMBER_OF_CPUS+1. Since the build process was literally using up my entire 2.8GHz quad-core i7, and it wasn't compiling properly I decided to look into it. I changed the -j option in the build script to 2 and everything built fine afterward.

Someone aught to look into not using NUMBER_OF_CPUS*1.5 for multiple obvious reasons. IE, if you have 3 CPUs - you just did "-j 4.5"

andy

07-07-2010 00:22:53

Where did you make this script change? We don't use "NUMBER_OF_CPUS" anywhere in the Python-Ogre build code so I'm a little confused.. :)

Thanks
Andy

monokrome

13-07-2010 14:37:18

In BuildModule.py