Python-Ogre Installation Issues

PhycoFalcon

02-12-2007 15:47:35

Hello, a friend and I have been attempting to compile your program for some time now, and we've managed to get to script 06 in the LinuxBuild article on the wiki.
My system is AMD64 Ubuntu Gutsy, and we're compiling off the most recent SVN revision, 484.
After a great deal of problem-solving, I have come to a problem I cannot isolate.
Here is what led up to this error:
alex@halifax-black:~/SVN/python-ogre$ ./06-GenerateCode.sh ogre
=== generating ogre ===
~/SVN/python-ogre/python-ogre/code_generators/ogre ~/SVN/python-ogre

INFO Creating xml file "/home/alex/SVN/python-ogre/python-ogre/code_generators/cache/ogre_1.4_cache.xml" from source file "/home/alex/SVN/python-ogre/python-ogre/code_generators/ogre/python_ogre.h" ...

INFO gccxml cmd: /home/alex/SVN/python-ogre/gccxml-build/bin/gccxml -I"/home/alex/SVN/python-ogre/python-ogre" -I"/home/alex/SVN/python-ogre/root/usr/include/boost-1_34" -I"/home/alex/SVN/python-ogre/root/usr/include/OGRE" -D"OGRE_NONCLIENT_BUILD" -D"OGRE_GCC_VISIBILITY" -D"OGRE_VERSION_1.4" "/home/alex/SVN/python-ogre/python-ogre/code_generators/ogre/python_ogre.h" -fxml="/home/alex/SVN/python-ogre/python-ogre/code_generators/cache/ogre_1.4_cache.xml"
Traceback (most recent call last):
File "generate_code.py", line 1005, in <module>
generate_code()
File "generate_code.py", line 869, in generate_code
, cflags=environment.ogre.cflags
File "/home/alex/SVN/python-ogre/root/usr/lib/python2.5/site-packages/pyplusplus/module_builder/builder.py", line 90, in __init__
, indexing_suite_version)
File "/home/alex/SVN/python-ogre/root/usr/lib/python2.5/site-packages/pyplusplus/module_builder/builder.py", line 131, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "/home/alex/SVN/python-ogre/root/usr/lib/python2.5/site-packages/pygccxml/parser/project_reader.py", line 225, in read_files
return self.__parse_file_by_file(files)
File "/home/alex/SVN/python-ogre/root/usr/lib/python2.5/site-packages/pygccxml/parser/project_reader.py", line 262, in __parse_file_by_file
reader.create_xml_file( header, prj_file.cached_source_file )
File "/home/alex/SVN/python-ogre/root/usr/lib/python2.5/site-packages/pygccxml/parser/source_reader.py", line 170, in create_xml_file
raise error
pygccxml.parser.source_reader.gccxml_runtime_error_t: Error occured while running GCC-XML: In file included from /home/alex/SVN/python-ogre/python-ogre/code_generators/ogre/python_ogre.h:28:
/home/alex/SVN/python-ogre/python-ogre/code_generators/ogre/python_ogre_sizeof.h: In
function `void python_ogre::details::instantiate()':
/home/alex/SVN/python-ogre/python-ogre/code_generators/ogre/python_ogre_sizeof.h:9: error: `
stdext' undeclared (first use this function)
/home/alex/SVN/python-ogre/python-ogre/code_generators/ogre/python_ogre_sizeof.h:9: error: (Each
undeclared identifier is reported only once for each function it appears
in.)
/home/alex/SVN/python-ogre/python-ogre/code_generators/ogre/python_ogre_sizeof.h:9: error: syntax
error before `::' token
/home/alex/SVN/python-ogre/python-ogre/code_generators/ogre/python_ogre_sizeof.h:11: error: syntax
error before `::' token
/home/alex/SVN/python-ogre/python-ogre/code_generators/ogre/python_ogre_sizeof.h:13: error: syntax
error before `::' token

Can someone tell me exactly where the problem lies, and how to fix it?
Also, my friend has a separate problem. If you folks don't mind, we just want to keep it to one thread.

giulio

02-12-2007 15:58:17

Hello, I'm that friend of above.
My problem is slighly different: on my Arch Linux Don't Panic! I reached script #06 but then got stuck when trying to generate the code.
I then went back to script #03 where it outputs Segmentation fault when the file 'bjam' is called in order to compile boost libs.

The output of script 6, which made me thinking something was wrong, is similar for all the packages:

-- creating bullet code
~/dev/python-ogre/code_generators/bullet ~/dev
Traceback (most recent call last):
File "generate_code.py", line 406, in <module>
generate_code()
File "generate_code.py", line 320, in generate_code
, cflags=environment.bullet.cflags
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/pyplusplus/module_builder/builder.py", line 90, in __init__
, indexing_suite_version)
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/pyplusplus/module_builder/builder.py", line 131, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/pygccxml/parser/project_reader.py", line 225, in read_files
return self.__parse_file_by_file(files)
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/pygccxml/parser/project_reader.py", line 246, in __parse_file_by_file
, self.__decl_factory )
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/pygccxml/parser/source_reader.py", line 88, in __init__
self.__config.raise_on_wrong_settings()
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/pygccxml/parser/config.py", line 166, in raise_on_wrong_settings
super( gccxml_configuration_t, self ).raise_on_wrong_settings()
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/pygccxml/parser/config.py", line 105, in raise_on_wrong_settings
, self.include_paths )
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/pygccxml/parser/config.py", line 104, in <lambda>
map( lambda idir: self.__ensure_dir_exists( idir, 'include directory' )
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/pygccxml/parser/config.py", line 96, in __ensure_dir_exists
raise RuntimeError( '%s("%s") does not exist!' % ( meaning, dir_path ) )
RuntimeError: include directory("/home/giulio/dev/root/usr/include/boost-1_34") does not exist!
~/dev
-- creating ogrebulletc code
-- creating ogrebulletd code

=== done building code ===


I bet it's not normal...

I tried several times even with a fresh new boost release but the result is the same.

What's wrong with that library?

Game_Ender

02-12-2007 18:46:02

Does "/home/giulio/dev/root/usr/include/boost-1_34" actually exist? It seems that boost was not installed properly.

Game_Ender

02-12-2007 19:11:20

PhycoFalcon: It appears the GCC-XML cannot find the "stdext" namespace used by the hash_map and hash_set containers references in that file. That is odd, but its probably due to some change Andy made recently during the upgrade.

You might want to try and older version of Python-Ogre, the trunk by its very nature is unstable and Andy has been making a lot of changes recently. I would try revision 479 (which I know worked on Linux because Andy was adding a linux specific features)

Offtopic:
I really wish this projects used tags and that the scripts did not download SVN head. You can never expect those scripts to work reliable if they download SVN head.

andy

02-12-2007 23:42:51

There are significant changes occuring with the svn at the moment and as mentioned by GameEnder you could check out the earlier SVN version for Python-Ogre (the breaking updates probably occured yesterday)

Or wait a couple of days as I work throught the linux testing and update the build scripts (and create a new Linux binary release)..

Then on to OSX :)

Cheers
Andy

PhycoFalcon

03-12-2007 07:49:11

Andy: Sweet, I'm glad to hear that you're working both on better linux support, and official OS X support as well. We'll need that.

Game_Ender: Python-Ogre was at r480 for a while, but I'm going to try your suggestion at r479. Also, I noticed-- in a pure, unadulterated 'WTF moment'-- that during installation, you actually download python-ogre twice, once for the main directory where all the work is done, and once for the python-ogre directory within that directory. So, even though I had downloaded r479 for the scripts, the stuff that generates the code was probably at r484, the latest one so far. I fixed this with 'svn update -r 479' :)

Also, some general information about building on my 64-bit distro.
A great deal of the stuff in the "Python-Ogre BrandTM" /root/usr/bin/ doesn't work, so script 03 won't work. By 'not working', I mean, my distro doesn't know WTF it is. Nautilus shows it as a binary executable, but bash knows better. You need to build these things from source, or copy from your own distro's /usr/bin/, so that things like gccxml can build properly. First step I did was to compile cmake on your machine, then copy over all the binaries from that compile. Then, I copied versions of ccmake, cgc, and bjam to that directory mentioned above, for a complete set of tools.

Alright, I have a significant improvement to scripts 06 and 07, as they took over two hours to build on my machine. Now, having attempted a run at the script, I experienced a similar error as eupham did, here:
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=5845

I edited the file "python-ogre/generated/ogre_1.4/RenderQueueListener.pypp.cpp" as andy suggested in that thread. After running script 07, I now get this error:

alex@halifax-black:~/SVN/python-ogre/python-ogre/demos/ogre$ python Demo_Smoke.py
Traceback (most recent call last):
File "Demo_Smoke.py", line 15, in <module>
import ogre.renderer.OGRE as ogre
File "/home/alex/SVN/python-ogre/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: libOgreMain-1.4.5.so: cannot open shared object file: No such file or directory


Any thoughts? :)

giulio

03-12-2007 12:45:54

Does "/home/giulio/dev/root/usr/include/boost-1_34" actually exist? It seems that boost was not installed properly.

In fact, that directory does not exist. This is the reason because of I looked trough the scripts and found that the boost installation gives up saying: Segmentation fault.

During the execution of the makefile in ~/dev/boost-1_34_0 it should call the fle locacated in ./tools/jam/src/bin.linuxx86/bjam in order to install boost, but the above error is displayed.

The output I have attached only shows the reason because of I argued something was wrong.

andy

03-12-2007 14:03:50

I'm doing a set of Linux tests now so let me confirm everything works on a 32 bit system and then have you try it again on your systems.

As your error seems to be when running bjam (which we download as a binary) it would seem likely there is an issue with the .13 version of bjam running on x64 machines.. There is a .16 version that you could try -- otherwise we'll have to look at building bjam as part of the overall build system.

Cheers
Andy

PhycoFalcon

04-12-2007 01:01:33

Sounds good, andy. Also, I need to point out that Giulio is not running 64-bit linux, it's 32-bit Arch linux.

As I pointed out earlier, several of the applications within /root/usr/bin do not work, including all the cmake apps, ccmake, cgc, and bjam. They need to be 64-bit versions, so, perhaps your build scripts should determine whether it's building on a 64-bit OS, and save your 32-bit folks the trouble.

...though, now that I think about it, if those running 64-bit linux were to use a different version of those tools, and development goes on and something breaks, the error may not be found out for a while, which would be bad.

I really hope you can solve Giulio's problem, because you're currently working with improving compatibility with 32-bit systems, and that should be priority.

Once you have the repository build in a decent condition, we can get that and work with it. Andy, feel free to contact me using IM. I should be more available to work on this project on Wednesday.

andy

04-12-2007 11:48:24

The SVN is back to a "Linux" friendly state -- sorry about that :(

I suggest you start with a clean build as I fixed the patch for Ogre so it needs to be rebuilt (it ensures you don't have the double renderqueue listener functions and fixes a couple of other transformations) as well as code generation etc

Also fixed some typo's etc in the Ogre library build. I'm still checking some of the libaries but know that Ogre, OIS and CEGUI are OK..

Thanks
Andy

silentpolygon

04-12-2007 23:38:47

Confirming that Linuxbuild works

Done this today with SVN489 step by step with the instructions from the wiki. Hole process took 3 hours with a AMDXP2200/512MBRAM and 1Mbit/sec Internet connection.

Ubuntu 7.10(Gutsy)

keep upyour good work
silentpolygon

andy

05-12-2007 01:52:22

Great news -- thanks for testing this (and letting us know!!!)

I did a small update this morning that fixes OgreForests.. so you can...

cd python-ogre
svn up
rm code_generators/cache/ogrefore*
cd ..
./06-GenerateCode.sh ogreforests
./07-BuildModules.sh ogreforests

Deleting the cache file is simply to ensure that gccxml rebuilds the xml file that Py++ then uses to create code -- it's probably not needed but a good thing to do when the underlying C library source has changed.

Cheers
Andy

PhycoFalcon

05-12-2007 06:07:55

I've started over from scratch (again) in the hopes the changes in the repo will help.

Some minor problems I have experienced with the build (upon closer inspection) so far are:

1) In the Compositor demo, HDR doesn't work, it complains:
An exception has occured: OGRE EXCEPTION(2:InvalidParametersException): All framebuffer formats with this texture internal format unsupported in GLFrameBufferObject::initialise at OgreGLFrameBufferObject.cpp (line 211)Unregistering ResourceManager for type BspLevel

2) OgreODE doesn't build --
This is some stuff around the error to help you figure it out. :)
In file included from /home/alex/SVN/python-ogre/root/usr/include/OGRE/OgreConfig.h:36,
from /home/alex/SVN/python-ogre/root/usr/include/OGRE/OgrePlatform.h:32,
from /home/alex/SVN/python-ogre/root/usr/include/OGRE/OgrePrerequisites.h:32,
from /home/alex/SVN/python-ogre/root/usr/include/OGRE/Ogre.h:32,
from ../include/OgreOdePreReqs.h:4,
from ../include/OgreOdeWorld.h:4,
from OgreOdeBody.cpp:4:
../config.h:59:1: warning: this is the location of the previous definition
OgreOdeBody.cpp:855:2: warning: no newline at end of file
OgreOdeBody.cpp: In member function 'OgreOde::Joint* OgreOde::Body::getJoint(int)':
OgreOdeBody.cpp:523: error: cast from 'dxJoint*' to 'unsigned int' loses precision
OgreOdeBody.cpp: In destructor 'virtual OgreOde::Body::~Body()':
OgreOdeBody.cpp:720: error: cast from 'dxBody*' to 'unsigned int' loses precision
make[1]: *** [OgreOdeBody.lo] Error 1
make[1]: Leaving directory `/home/alex/SVN/python-ogre/ogreaddons/ogreode/src'
make: *** [install-recursive] Error 1


I reckon these things will not substantially affect the performance of the end result. I'm going to go ahead with scripts 06 and 07 now and see how well they work.

This is the sixth time I've attempted this. Wish me luck! :)

PhycoFalcon

05-12-2007 09:03:39

Alright, all that work and I got the same error as I did before:
alex@halifax-black:~/SVN/python-ogre/python-ogre/demos/ogre$ python Demo_Smoke.py
Traceback (most recent call last):
File "Demo_Smoke.py", line 15, in <module>
import ogre.renderer.OGRE as ogre
File "/home/alex/SVN/python-ogre/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: libOgreMain-1.4.5.so: cannot open shared object file: No such file or directory

I've tried a couple of things, such as placing a symbolic link to the library under the Python-Ogre root directory (rather than the ogrenew directory) and this didn't change anything. Environment variables do nothing either.

andy

05-12-2007 11:06:07

Go back to basics...

Do the Ogre C++ demos work?
Are there files in the python-ogre/generated/ogre_1.4 directory
Does _ogre_.so exist in python-ogre/packages2.5/ogre/renderer/OGRE
If not, what happens when you run ./07-BuildModules.sh ogre
Andy

giulio

05-12-2007 17:01:20

I'm here again, sorry for the delay but I've been busy for a while.

After the n-th rebuilt from scratch, I got an error similar to alex's one:
giulio@honey:~/dev/python-ogre/demos/ogre$ python Demo_Smoke.py
Traceback (most recent call last):
File "Demo_Smoke.py", line 15, in <module>
import ogre.renderer.OGRE as ogre
File "/home/giulio/dev/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: No module named _ogre_


So, as andy suggested, i looked into python-ogre/packages_2.5/ogre/renderer/OGRE and found there was no file named ogre.so.

I ran script #07, got this output
giulio@honey:~/dev$ ./07-BuildModules.sh ogre
scons: Reading SConscript files ...
WARNING: Unable to find boost/python.hpp include file (ogre class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (ogrenewt class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (cegui class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (et class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (ode class) in include_dirs
WARNING: Unable to find ode/ode.h include file (ode class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (ogrerefapp class) in include_dirs
WARNING: Unable to find ode/ode.h include file (ogrerefapp class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (ogreode class) in include_dirs
WARNING: Unable to find ode/ode.h include file (ogreode class) in include_dirs
WARNING: Unable to find ode/odecpp.h include file (ogreode class) in include_dirs
WARNING: Unable to find Ogreode_Prefab.h include file (ogreode class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (ois class) in include_dirs
WARNING: Unable to find OIS.h include file (ois class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (bullet class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (opcode class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (ogrebulletc class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (ogrebulletd class) in include_dirs
Building ogre
WARNING: Generate the sources in this directory: "/home/giulio/dev/python-ogre/generated/ogre_1.4"
OSError: [Errno 2] No such file or directory: '/home/giulio/dev/python-ogre/generated/ogre_1.4':
File "/home/giulio/dev/python-ogre/SConstruct", line 188:
sourcefiles = get_source_files(cls, cls._source, usepch)
File "/home/giulio/dev/python-ogre/SConstruct", line 87:
raise e
running install
running build
running build_py
running install_lib
running install_egg_info
Removing /home/giulio/dev/root/usr/lib/python2.5/site-packages/Python_Ogre-1.1.a-py2.5.egg-info
Writing /home/giulio/dev/root/usr/lib/python2.5/site-packages/Python_Ogre-1.1.a-py2.5.egg-info


After some scream of terror, realized both boost and ois plus lot of other stuff were missing.

== ois
I downloaded ois-1.0 which compiles also with automake 1.10 (NOTE the installscript uses ois-1.0RC1, maybe you can update this).
Installed it with these

cd ois
./bootstrap
./configure --prefix=/home/giulio/dev/root/usr --includedir=/home/giulio/dev/root/usr/include
make
make install
cd ..


Happy because it compiled successfully, I went on with

== ode
(have no idea of what it is)
In script #3 I fund the follwing

cd ode-0.9
chmod +x autogen.sh
./autogen.sh
./configure --prefix=/home/giulio/dev/root/usr --includedir=/home/giulio/dev/root/usr/include
make
make install
cd ..

I cleaned it all (make clean) and started over with ode: everything seemed normal.
Unfortunately, when I try to tun (yes again!) the script #07, it still outputs, among other tousands of things, something related to ode:

WARNING: Unable to find ode/ode.h include file (ode class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (ogrerefapp class) in include_dirs
WARNING: Unable to find ode/ode.h include file (ogrerefapp class) in include_dirs
WARNING: Unable to find boost/python.hpp include file (ogreode class) in include_dirs
WARNING: Unable to find ode/ode.h include file (ogreode class) in include_dirs
WARNING: Unable to find ode/odecpp.h include file (ogreode class) in include_dirs


Anyway, as for OIS and boost, this is ust a WARNING, so I decided to skip over to see if I could do something in order to fix it

[...]
OSError: [Errno 2] No such file or directory: '/home/giulio/dev/python-ogre/generated/ogre_1.4':
File "/home/giulio/dev/python-ogre/SConstruct", line 188:
sourcefiles = get_source_files(cls, cls._source, usepch)
File "/home/giulio/dev/python-ogre/SConstruct", line 87:
raise e
[...]


I checked if the directory python-ogre/generated/ogre_1.4 existed but, obviously, there was only a directory called 'plib_1.8.4'.
I thought I could try to generate the code again with ./06-GenerateCode.sh ogre (/ois)
To it, it was ok:

giulio@honey:~/dev$ ./06-GenerateCode.sh ogre
=== generating ogre ===
~/dev/python-ogre/code_generators/ogre ~/dev
~/dev

=== done building code ===
giulio@honey:~/dev$ ./06-GenerateCode.sh ois
=== generating ois ===
~/dev/python-ogre/code_generators/ois ~/dev
~/dev

=== done building code ===

but anything changed.

*stump* (its me falling on the floor)

Sorry about the very looong post (I had to do something t become quiet again :), hope this could help someone (?) or that somebody is able to help me.

Almost forgot, I'm using revision 489 (on 32-bit system as pointed out before)

andy

05-12-2007 22:55:01

Can you join the google mailing list and we'll take this converstion over there as it will be much easier..

http://groups.google.com/group/python-ogre-developers

There seems ot be a very basic difference between your system and a Ubuntu/debian based one that is causing some of the basics to fail -- for example if OIS wasn't there then it would suggest that the Ogre C++ demos don't work -- ie http://wiki.python-ogre.org/index.php/LinuxBuild#Step_5 needs to work before even worring about the Python-Ogre part..

Thanks

Andy

PhycoFalcon

06-12-2007 00:47:26

Andy, I'm somewhat hesitant to post problems onto the mailing list; as a beginner, I search the wiki & this forum often, and now I have to search a mailing list as well! The information is spread out. Even information involving the development of this library is important that it's consolidated. The ideal source of information is the wiki, no doubt, however, discussions are important as well, which is why wikis have discussion pages and why forums are excellent compliments to wikis.

Perhaps instead of spreading everything out, people should focus on one or two places... Just a suggestion.

andy

06-12-2007 05:48:28

The way we try and seperate the information is as follows:

Issues relating to "using" Python-Ogre are in this forum
Issues relating to developing Python-Ogre (new modules, compile problems,etc) belong in the google mailing list..

Yes I know this isn't perfect, however for many of us it's much easier to be responsive in an email environment.

As your issues are becoming difficult (ie they are specificaly related to you 64bit system -- I believe), and I know that a number of people on the mailing list have working 64 bit environments then it makes sense to move there..

Also the build system (today) hasn't been built around 64bit support so it's not like you are doing something wrong -- it's a flaw in the build system and I'd rather be fixing that on the mailing list -- not on this forum.

Cheers
Andy

giulio

06-12-2007 12:33:16

I rather agree with you, phycofalcon, but also think if anybody on this forum is able to help us, it'd be better to find other sources of information, even if it could pack email addresses with some unneeded messages or tag ourselves as spammers for double-posting the same issue.

I've just sent a message to the developement mailing list (that, in my opinion, should be something different from the 'help & support' one), and hope somebody could solve my problem.

btw, c++ demos work and im not on a 64bit system, so it should all work fine.

Thanks for the time you all spent for helping somehow :)

Game_Ender

06-12-2007 18:46:23

I don't think those are really warnings, if it can't find the header files, and it won't be able to build the module which wraps them. You have to manually verify that the all the pieces are falling together. The first is that ODE was properly installed to its prefix directory. The second is that the headers are being found by Py++. I am not sure how to o about doing this though.

dermont

08-12-2007 00:49:21

PhycoFalcon wrote:


alex@halifax-black:~/SVN/python-ogre/python-ogre/demos/ogre$ python Demo_Smoke.py
Traceback (most recent call last):
File "Demo_Smoke.py", line 15, in <module>
import ogre.renderer.OGRE as ogre
File "/home/alex/SVN/python-ogre/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: libOgreMain-1.4.5.so: cannot open shared object file: No such file or directory


@PhycoFalcon, I had similar problems with this linux build. The problem for me was the RPATH doesn't appear to point to the lib directory i.e:

cd python-ogre/packages_2.5/ogre/renderer/OGRE
scanelf --rpath *.so

>> TYPE RPATH FILE
>> ET_DYN /../../lib _ogre_.so


ldd *.so

linux-gate.so.1 => (0xffffe000)
libOgreMain-1.4.5.so => not found
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb4a40000)
libboost_python-gcc41-1_34.so.1.34.0 => /usr/local/lib/libboost_python-gcc41-1_34.so.1.34.0 (0xb49fb000)
libm.so.6 => /../../lib/tls/i686/cmov/libm.so.6 (0xb49d6000)
libgcc_s.so.1 => /../../lib/libgcc_s.so.1 (0xb49cb000)
libc.so.6 => /../../lib/tls/i686/cmov/libc.so.6 (0xb4881000)
/lib/ld-linux.so.2 (0x80000000)
libutil.so.1 => /../../lib/tls/i686/cmov/libutil.so.1 (0xb487d000)
libpthread.so.0 => /../../lib/tls/i686/cmov/libpthread.so.0 (0xb4864000)
libdl.so.2 => /../../lib/tls/i686/cmov/libdl.so.2 (0xb4860000)


As a quick hack, to test if this is your problem, you can try:

a) deleting the shared libs from:
packages_2.5/ogre/renderer/OGRE/_ogre_.so
build_dir_2.5/ogre_1.4/ogre.so

b) Update SConstruct with:

##_env.Append(RPATH=environment.rpath)
_env.Append( RPATH = _env.Literal(os.path.join('\\$$ORIGIN', '../../../../..')))

c) rerun linking stage:
./07-BuildModules.sh ogre

andy

08-12-2007 01:03:07

The current 'solution' is to set your LD_LIBRARY_PATH to point to the libs as per the wiki instructions..

The "plan" is to have a script that moves the libraries we need from ./root/usr/lib to ./python-ogre/packages_2.5/lib so we can create a self contained binary.

If you really want to change the RPATH change it in PythonOgreConfig_posix.py, not in the SConstruct..

Cheers

Andy

iamedu

31-12-2007 15:02:18

I think I'm having the same problem with svn revision 527.

I'm working on Ubuntu Linux 7.10 64bit arch

Again, The c++ demos are working, output for 06-GenerateCode.sh ogre

=== generating ogre ===
/home/iamedu/Development/Library/pyogre/root/usr/lib:/home/iamedu/Development/Library/pyogre/root/usr/lib:/home/iamedu/Development/Library/pyogre/root/usr/lib/
~/Development/Library/pyogre/python-ogre/code_generators/ogre ~/Development/Library/pyogre
~/Development/Library/pyogre

=== done building code ===


And my output for
iamedu@iamedu:~/Development/Library/pyogre$ ./07-BuildModules.sh ogre ois

/home/iamedu/Development/Library/pyogre/root/usr/lib:/home/iamedu/Development/Library/pyogre/root/usr/lib/
scons: Reading SConscript files ...
Building ogre
WARNING: Generate the sources in this directory: "/home/iamedu/Development/Library/pyogre/python-ogre/generated/ogre_1.4"
OSError: [Errno 2] No such file or directory: '/home/iamedu/Development/Library/pyogre/python-ogre/generated/ogre_1.4':
File "/home/iamedu/Development/Library/pyogre/python-ogre/SConstruct", line 189:
sourcefiles = get_source_files(cls, cls._source, usepch)
File "/home/iamedu/Development/Library/pyogre/python-ogre/SConstruct", line 87:
raise e
running install
running build
running build_py
running install_lib
running install_egg_info
Removing /home/iamedu/Development/Library/pyogre/root/usr/lib/python2.5/site-packages/Python_Ogre-1.1.a.egg-info
Writing /home/iamedu/Development/Library/pyogre/root/usr/lib/python2.5/site-packages/Python_Ogre-1.1.a.egg-info


My LD_LIBRARY_PATH is set as in the wiki,

I've been using ogre for a while but i'm new to python, so any help would be very much apreciated

HolyHead

10-01-2008 21:10:45

Hello guys...

I have exactly the same problem as "iamedu" mentioned (demos are working, haven't seen any errors... but it just doesn't generate code at 06-genere... working with Ubuntu 7.10 Gutsy Gibbon) ... i hope you will post a solution for this... i am working with the current (10. 01. 08 ) svn trunk of pyogre.

it would be fine if you send me a pm if you find a solution or need more information...

on the other hand it would be very fine if someone could make a debian package of the current pyogre and post a link, or just a link to a new binary 4 linux which works with debian / ubuntu (build with current version of pyogre)

or just tell me a svn version which is working with the install instructions (http://wiki.python-ogre.org/index.php/LinuxBuild)...

greetings Fabian & thanks a lot in advance

andy

10-01-2008 23:18:41

Can you have a fresh look at the [b]wiki[/b], completely clean out your current build environment and try again.

There has been significant changes (and improvements I hope) to the build system -- one of the most important being that sorting our problems is now significantly easier..

Regards
Andy

HolyHead

15-01-2008 20:47:22

Thank you andy...
With that new wiki script, it worked without problems (please remove the old script, because its a bit confusing if u have 2 scripts, 1 working, 1 not).
Only at step 4 i had to manually build the base libs in the right direction (doesn't seem to do it step by step):
python python-ogre/BuildModule.py -r -b cegui
python python-ogre/BuildModule.py -r -b ois
python python-ogre/BuildModule.py -r -b ogre

i used newest revision from 13. 01. 08.

pervasion

17-01-2008 21:37:25

I too am having problems with the same issue holyhead had. Breaking apart the build steps worked, until:

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

from here I get:

PythonOgre.BuildModule: INFO Build Command make
PythonOgre.BuildModule: WARNING Task Failed
PythonOgre.BuildModule: INFO Build Command make install
PythonOgre.BuildModule: WARNING Task Failed


I tried looking at log.out, but I don't even know where to start looking.

andy

18-01-2008 00:57:07

Your output doesn't make sense based upon the command you ran (the message indicates you included 'install' on the command line where as you didn't) so can you run:

rm downloads/ogre-linux*
python python-ogre/BuildModule.py -r -b ogre


And send through the log.out file

Thanks
Andy

pervasion

18-01-2008 04:04:48


01-17 21:52 PythonOgre.BuildModule DEBUG g++: /usr/lib/libGL.so: No such file or directory
make[4]: *** [RenderSystem_GL.la] Error 1
make[3]: *** [install-recursive] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1


I ran a search for it, and it seems to point to /usr/lib/nvidia/libGL.so.1.2.xlibmesa, which apparently doesn't exist for some reason. I'm not entirely sure what's going on.

andy

18-01-2008 06:23:39

Did you run the prereq part in Step 1 in the wiki..

cp python-ogre/scripts/00-PreReqs.sh .
sh ./00-PreReqs.sh


And did it run OK?

Andy

pervasion

18-01-2008 14:01:54

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

That's what I get when I run it now, and I don't believe anything ran incorrectly up to the building of the base libraries, which all failed until I ran them individually. Even with that, building ogre stil failed.

fpois

20-01-2008 14:07:32

hope i'm not intruding on the flow of the Q&A right now, but I would just like to ask, I'm trying to building python-ogre on ubuntu gutsy on a relatively standard machine (AthlonXP 3000, 1GB RAM), but the "python python-ogre/BuildModule.py -g -c ois ogre" step (LinuxBuildV2 - step 5) had taken more than 1 and a half hours to compile, and I'm wondering what's the typical time it takes for that step to compile?

scriptkid

20-01-2008 15:32:00

Last time i compiled the code myself (on Windows) i remember both Ogre and Cegui take a long time. Not sure, but at least an hour. That was on a dual core 6400.

To me in seemed that Scons didn't use precompiled headers.

HTH.

Revhack

24-02-2008 00:06:34

Hello!

plz help me:
Demo c++ work for me "./Smoke" at Step 4 in installation on Linux.

But when i trying "python Demo_Smoke.py" At Step 5

Window ask me for configuration and when click Accept Ogre show me a 1 sec of black window and after close with this error:

Traceback (most recent call last):
File "Demo_Smoke.py", line 39, in <module>
application.go()
File "/home/revhack/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/sf_OIS.py", line 61, in go
if not self._setUp():
File "/home/revhack/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/sf_OIS.py", line 103, in _setUp
self._createFrameListener()
File "/home/revhack/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/sf_OIS.py", line 173, in _createFrameListener
self.frameListener = FrameListener(self.renderWindow, self.camera)
File "/home/revhack/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/sf_OIS.py", line 221, in __init__
self._setupInput()
File "/home/revhack/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/sf_OIS.py", line 248, in _setupInput
self.windowResized(self.renderWindow)
File "/home/revhack/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/sf_OIS.py", line 263, in windowResized
[width, height, depth, left, top] = rw.getMetrics() # Note the wrapped function as default needs unsigned int's
ValueError: need more than 3 values to unpack
Unregistering ResourceManager for type BspLevel
*-*-* OGRE Shutdown


Sorry my bad english and thx

andy

24-02-2008 01:12:52

Very strange -- it would seem that the ogre wrapper has failed in some way??

Could you send me your python-ogre/generated/ogre_1.4/RenderWindow.pypp.cpp

Thanks
Andy

Revhack

24-02-2008 03:13:41

it's here: http://rafb.net/p/tn6UVo28.html

andy

24-02-2008 06:34:29

Problem due to a change in Py++ that I didn't catch in my testing..

I will upate environment.py to force Py++ to rev 1234 or you could edit environment.py to read

source = [
[svn, " co -r 1234 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()]
]

Then delete your pygccxml directory and run:
python python-ogre/BuildModule.py -r -b pygccxml
python python-ogre/BuildModule.py -g -c ois ogre
python python-ogre/BuildModule.py -b install


Regards
Andy

Revhack

24-02-2008 18:51:30

Work great thx a lot

brunomfs

16-03-2008 21:57:50

Problem due to a change in Py++ that I didn't catch in my testing..

I will upate environment.py to force Py++ to rev 1234 or you could edit environment.py to read

source = [
[svn, " co -r 1234 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()]
]

Then delete your pygccxml directory and run:
python python-ogre/BuildModule.py -r -b pygccxml
python python-ogre/BuildModule.py -g -c ois ogre
python python-ogre/BuildModule.py -b install


Regards
Andy


Hey Andy, thanks a lot for the info, i was having this problem too.
Would be nice if you commit this change in the svn.