Yet another Linux Build problem

Redhothoshi

30-08-2010 03:11:59

I really do hope this error hasn't been posted and I'm now reposting it or something. I'd really like to try out Ogre in python, as it's a nice library in C++

Traceback (most recent call last):
File "python-ogre/BuildModule.py", line 9, in <module>
import environment
File "/home/hoshi/python-ogre/trunk/python-ogre/environment.py", line 1290, in <module>
class ogrevideo(pymodule):
File "/home/hoshi/python-ogre/trunk/python-ogre/environment.py", line 1311, in ogrevideo
os.path.join(Config.PATH_libtheoraplayer, "include"),
AttributeError: 'module' object has no attribute 'PATH_libtheoraplayer'


Thank you in advance for any help anyone can offer.

dermont

30-08-2010 18:33:08

Your config file is probably not up to date, check your PythonOgreConfig_posix.py (or PythonOgreConfig_<username>.py) file and add the PATH_libtheoraplayer variable as follows:

PATH_INCLUDE_ogrevideo = LOCAL_INCLUDE
PATH_DEMO_ogrevideo = LOCAL_INCLUDE
PATH_INCLUDE_libtheoraplayer = LOCAL_INCLUDE
PATH_LIB_ogrevideo = LOCAL_LIB
## add the following line
PATH_libtheoraplayer = LOCAL_LIB

Redhothoshi

30-08-2010 20:24:04

I can run BuildModule.py now without it competely erroring, thanks to that fix, but now I get this

$ python python-ogre/BuildModule.py -g -c ogre --usesystem
PythonOgre.BuildModule: INFO Building Source code for ogre
PythonOgre.BuildModule: WARNING Task Failed
PythonOgre.BuildModule: INFO Compiling Source code for ogre


That warning says it failed to build the code for the wrapper, right? What's it compiling if it can't build the source?

dermont

31-08-2010 00:41:26

AFAIK all errors for the build should be written to log.out. Your build error appears to be during generating the wrapper code for Ogre. You should check that and upload a copy of log.out. Maybe you have missed a step along the way?

http://wiki.pythonogre.org/index.php/LinuxBuildV4

Does the sample browser application from the base Ogre run OK, step 4 from the LinuxBuildV4.

There is also the Python Ogre Developers Group maybe it will be easier to post your log there.
http://groups.google.com/group/python-ogre-developers

Redhothoshi

31-08-2010 02:48:47

Yeah, I can run the sample browser from the base Ogre.


Pastebin of my log.out http://pastebin.com/rALRcNpX

Thanks for your help so far. I skimmed through log.out, but I can't see anything outright that I can figure a fix for.

dermont

04-09-2010 07:01:00

Your error(s) appear related to GCC-XML and the version of gcc (4.5.1) you are using.

I'm not sure the build system uses the most up-to-date version of GCC-XML, so it may be that updates for
gcc 4.5.x are not included. It works fine for me with gcc 4.4.x. on a 32-bit machine.

You should google your error and post on the Python Ogre Developers Group - the Py++ developer is a regular contributor there and will probably be able to offer you better advice.

What distro are you running?

skeptic

18-10-2010 22:29:26

I'm trying to install python-ogre 1.7.1 on Linux (Linux Mint 9 - Isadora, based on Ubuntu 10.04), and since my issues are similar I thought I'd continue this thread instead starting another one.

Through searching I've been able to get past most issues one way or another, but I'm stuck on a couple things:

--usesystem causes the build to use PythonOgreConfig_system.py instead of PythonOgreConfig_posix.py. Same initial problems as the OP. Probably obvious and intended, but the two files are very different. Not using --usesystem I can get past this, but I really want everything as part of the system, not in other locations causing me to set env's and such. Am I barking up the wrong tree here? Should I just build it as is then copy the various ~/development/python-ogre/root/usr/* stuff to the system areas? Maybe I'd be better off leaving it where it is and just adding them to PATH, LD_LIBRARY_PATH, etc?

The second issue is it seems to be building 1.7.0. environment.py claims it is PythonOgreMajorVersion = "1", PythonOgreMinorVersion = "7", PythonOgrePatchVersion = "1" yet it downloads ogre-v1-7-0p1.tar.bz2. Changing environment.py so it downloads ogre_src_v1-7-1.tar.bz2 (then renaming the directory it untars to ogre) I get to the second set of errors the OP posted, the "PythonOgre.BuildModule WARNING Task Failed" and similar.

This is all from "svn co https://python-ogre.svn.sourceforge.net ... ython-ogre python-ogre"

Before trying to use --usesystem and forcing the 1.7.1 download I was able to get well past these steps (didn't have these issues) and likely would have had a working setup. It was only after realizing it was using 1.7.0 source and not putting things in system dirs that I started over.

I have looked through the developer group linked above, very little activity, and nothing that I can find to address these issues. I'm not really sure where to go from here...

dermont

01-11-2010 06:15:45



--usesystem causes the build to use PythonOgreConfig_system.py instead of PythonOgreConfig_posix.py. Same initial problems as the OP. Probably obvious and intended, but the two files are very different. Not using --usesystem I can get past this, but I really want everything as part of the system, not in other locations causing me to set env's and such. Am I barking up the wrong tree here? Should I just build it as is then copy the various ~/development/python-ogre/root/usr/* stuff to the system areas? Maybe I'd be better off leaving it where it is and just adding them to PATH, LD_LIBRARY_PATH, etc?



For your initial problem you can just update the PythonOgreConfig_system.py file as indicated above or copy PythonOgreConfig_system.py to PythonOgreConfig_<yourusername>.py and make your changes.

If you are building against libraries in the system path you should be able to copy packages_2.6/ogre to /usr/lib/python2.6/dist-packages and run from there (or even try running from where the libraries are built????). I've done this in the past, you may need to update demos/PythonOgreConfig.py to point to the ogre packages to run the demos, for example my build using CMake:


import sys
sys.path.insert(0,'/media/sda7/Libraries/PYTHON/cmake/packages_2.6')



The second issue is it seems to be building 1.7.0. environment.py claims it is PythonOgreMajorVersion = "1", PythonOgreMinorVersion = "7", PythonOgrePatchVersion = "1" yet it downloads ogre-v1-7-0p1.tar.bz2. Changing environment.py so it downloads ogre_src_v1-7-1.tar.bz2 (then renaming the directory it untars to ogre) I get to the second set of errors the OP posted, the "PythonOgre.BuildModule WARNING Task Failed" and similar.

This is all from "svn co https://python-ogre.svn.sourceforge.net ... ython-ogre python-ogre"

Before trying to use --usesystem and forcing the 1.7.1 download I was able to get well past these steps (didn't have these issues) and likely would have had a working setup. It was only after realizing it was using 1.7.0 source and not putting things in system dirs that I started over.


Post log.out for the 1.7.1 build.