Attempting to build Python Ogre 1.8.1

sammo

01-10-2012 14:48:08

Anybody want Python Ogre 1.8.1? I'm willing to spend some time on this if I can get some support (knock knock Andy) ...

I've been trying to build it in Ubuntu 12.04 without much luck.

I'm able to build Python Ogre 1.7.2 successfully from subversion:

https://python-ogre.svn.sourceforge.net ... ython-ogre

However, I'm not sure if I should be trying to build 1.8.1 from subversion or from the newer mercurial repo:

https://bitbucket.org/kiwisoft/python-ogre

So which repo should I be using?

gregp

03-12-2012 17:06:20

Sammo,

So you were able to get Python Ogre 1.7.2 installed on Ubuntu 12.04? I've been able to get it running on older Ubuntu's, but keep getting compiler errors on 12.04. Was there any trick you remember?

Thanks!
Greg

dermont

04-12-2012 06:46:53

@gregp

You will have to supply more info regarding your compiler errors or preferably your log.out file if you want someone to help you.

pradhoom

04-12-2012 16:42:43

Hey gregp, Python-Ogre 1.7.2 compiles just fine fine on Ubuntu 12.04. Most of the problems relating to installation of python-ogre have been discussed on the forums, if you browse through it you will see (updating SConstruct file, PythonOgreConfig_posix_*.py file, like disabling the hydrax plugin if not using and such). That is how I just recently installed python-ogre fro svn trunk with ogre 1.7.4 on my Ubuntu 12.04 x86_64. One of the issue I faced was python-ogre looked for lib files inside /usr/lib section while I had mine on /usr/lib/x86_64-linux-gnu, so I had to mannually create a symbolic link to /usr/lib for the required libs (may be there is better way, but it works :D).

If you still get errors, post the log.out file from the python-ogre directory as dermont suggested. And BTW, I thought about testing with ogre version 1.8.1 but looking back at the time it took to generate and compile, I don't have the will anymore (for now :D). Goodluck.

gregp

12-12-2012 19:46:49

pradhoom, thanks for the suggestions!!

I didn't provide much info, because I was mostly just wanting to hear if it was even possible on 12.04 or if I was wasting my time (this thread is the only relevant hit I found googling "python ogre" and "ubuntu 12.04"). Anyway, I'll dig through the previous posts and try some of the suggestions. If I still can't get it to work, I'll post a log.out

Thanks again!
Greg P

2legsflailing

28-12-2012 13:41:22

I'd love to have python 1.8.1 for windows. but no clue how to do it.

1.7.2 runs quite nice enough but new is always sexy!

IchUndNichtDu

20-02-2013 21:02:45

Hey guys!
I tried to compile for ogre1.8.0 (because this version is in the package sources of Ubuntu) i wanted to use ogre installed from the package sources and skipped "python python-ogre/BuildModule.py -r -b ogre --usesystem (correct me if this is wrong). So i changed some information in the environment.py (version, base, source...) and got an error by "python python-ogre/BuildModule.py -g ogre --usesystem". log.out is attached.
I hope someone can help me
Regards
Ich und nicht Du

dermont

22-02-2013 15:46:25

What repo are you using? If you are using the current svn trunk there are a few number updates needed for 1.8.x/1.9

If you are using the newer mercurial repo then I don't know what the state/status of this is.

IchUndNichtDu

22-02-2013 16:00:33

I'm using the svn repo. Updatet in python-ogre/code_generators/ogre/generate_code.py an fix for the version 1.7.x so the fix is done for 1.8.x. The Error i described earlyer doesn't appear again. But now i have antoher error by "python python-ogre/BuildModule.py -c ogre --usesystem". log.out is attached.

IchUndNichtDu

25-02-2013 10:17:22

here is a full list of my changes:

environment.py:
class ogre:
(only in the elif isLinux() section)
version = "1.7.2" -> version = "1.8.0"
base = "ogre_src_v1-7-2" -> base = "ogre_src_v1-8-0"
source = [[wget, "http://sourceforge.net/projects/ogre/files/ogre/1.7/"; + base + ".tar.bz", downloadPath],] -> source = [[wget, "http://garr.dl.sourceforge.net/project/ogre/ogre/1.8/1.8.0/"; + base + ".tar.bz2", downloadPath],]
buildCmds = [...
...
[0, "mv ogre_src_v1-7-2 " + baseDir, os.getcwd()], -> [0, "mv ogre_src_v1-8-0 " + baseDir, os.getcwd()],
...

code_generators/ogre/generate_code.py:
def generate_code:
if environment.ogre.version.startswith("1.7"): -> if environment.ogre.version.startswith("1.7") or environment.ogre.version.startswith("1.8"):

dermont

26-02-2013 07:58:28

here is a full list of my changes:

environment.py:
class ogre:
(only in the elif isLinux() section)
version = "1.7.2" -> version = "1.8.0"
base = "ogre_src_v1-7-2" -> base = "ogre_src_v1-8-0"
source = [[wget, "http://sourceforge.net/projects/ogre/files/ogre/1.7/"; + base + ".tar.bz", downloadPath],] -> source = [[wget, "http://garr.dl.sourceforge.net/project/ogre/ogre/1.8/1.8.0/"; + base + ".tar.bz2", downloadPath],]
buildCmds = [...
...
[0, "mv ogre_src_v1-7-2 " + baseDir, os.getcwd()], -> [0, "mv ogre_src_v1-8-0 " + baseDir, os.getcwd()],
...

code_generators/ogre/generate_code.py:
def generate_code:
if environment.ogre.version.startswith("1.7"): -> if environment.ogre.version.startswith("1.7") or environment.ogre.version.startswith("1.8"):


You can't just change the version of ogre and expect the code generation process to work. The code generators normally require updating/tweaking between different versions of ogre.

Your best bet would be to try the mercurial code which appears to be updated for 1.8. From a quick look it appears that some of the newer 1.8 features are not implemented but it should give you a starting point.

https://bitbucket.org/kiwisoft/python-ogre

IchUndNichtDu

26-02-2013 14:09:55

You can't just change the version of ogre and expect the code generation process to work. The code generators normally require updating/tweaking between different versions of ogre.

ok, i wasn't sure wether this could work.

Your best bet would be to try the mercurial code which appears to be updated for 1.8. From a quick look it appears that some of the newer 1.8 features are not implemented but it should give you a starting point.

Already looked on the hg-repo since the last post. Anyway thanks for the info. The note on the mercurial-repo says "Numerous updates for building Ogre 1.8 in OSX" so it think it won't work without changes on Ubuntu. I tried that (skipping python python-ogre/BuildModule.py -r -b ogre --usesystem like last time) and got a error by BuildModule.py -g. So i changed the version, base, source variables in the environment.py for Linux and tried again. The log.out (attached) gives the same error.

dermont

28-02-2013 10:04:20

From your log the error looks different from the one posted last time.


pygccxml.cxx_parser: INFO gccxml cmd: /usr/bin/gccxml -I"/home/sven/ogre/python-ogre" -I"/home/sven/ogre/python-ogre/code_generators/ogre" -I"/usr/include/boost" -I"/usr/include/OGRE" -I"/usr/include/OGRE/Property" -I"/usr/include/python2.7/" -D"OGRE_NONCLIENT_BUILD" -D"OGRE_GCC_VISIBILITY" -D"__PYTHONOGRE_BUILD_CODE" -D"HAVE_OGRE_BUILDSETTINGS_H" -D"__GCCXML__" -D"__GNUC__" -D"OGRE_VERSION_1.8.0" -U"__clang__" "/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre.h" -fxml="/home/sven/ogre/python-ogre/code_generators/cache/ogre_1.8.0_cache.xml"
Traceback (most recent call last):
File "generate_code.py", line 1513, in <module>
generate_code()
File "generate_code.py", line 1242, in generate_code
, cflags=environment.ogre.cflags
File "/usr/local/lib/python2.7/dist-packages/pyplusplus/module_builder/boost_python_builder.py", line 95, in __init__
, indexing_suite_version)
File "/usr/local/lib/python2.7/dist-packages/pyplusplus/module_builder/boost_python_builder.py", line 138, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "/usr/local/lib/python2.7/dist-packages/pygccxml/parser/project_reader.py", line 217, in read_files
return self.__parse_file_by_file(files)
File "/usr/local/lib/python2.7/dist-packages/pygccxml/parser/project_reader.py", line 254, in __parse_file_by_file
reader.create_xml_file( header, prj_file.cached_source_file )
File "/usr/local/lib/python2.7/dist-packages/pygccxml/parser/source_reader.py", line 179, 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/sven/ogre/python-ogre/code_generators/ogre/python_ogre.h:11:
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_masterlist.h:138:34: error: OgreDepthBuffer.h: No such file or directory
In file included from /home/sven/ogre/python-ogre/code_generators/ogre/python_ogre.h:18:
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:5: error: 'InstancedEntity' is not a member of 'Ogre'
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:5: error: 'InstancedEntity' is not a member of 'Ogre'
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:5: error: 'InstancedEntity' is not a member of 'Ogre'
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:5: error: 'InstancedEntity' is not a member of 'Ogre'
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:5: error: template argument 1 is invalid
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:5: error: template argument 1 is invalid
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:5: error: template argument 2 is invalid
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:5: error: invalid type in declaration before ';' token
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:6: error: 'InstanceBatch' is not a member of 'Ogre'
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:6: error: 'InstanceBatch' is not a member of 'Ogre'
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:6: error: 'InstanceBatch' is not a member of 'Ogre'
/home/sven/ogre/python-ogre/code_generators/ogre/python_ogre_aliases.h:6: error: 'InstanceBatch' is not a member of 'Ogre'
...


The log is telling you do not have the development files installed for ogre1.8 (libogre-1.8-dev ????). You are building against the headers from 1.7.

IchUndNichtDu

28-02-2013 20:29:51

From your log the error looks different from the one posted last time.
That means the error is the same with and without the changes in the environment.py not the same error as the last post.
You was right i didn't install libogre1.8-dev. Now everything works fine. (except CEGUI this looks still for the old .so files. I wil just compile it again (maybe a newer version))
I hope i will learn something from all this issues.