Building on Linux fails because of RakNet/PLSM2 & question..

Enrico

22-02-2009 10:10:44

Hi,

I just tried the recent SVN version 895 to build under Linux. The result from python python-ogre/BuildModule.py -g -c ogre ois cegui:

python python-ogre/BuildModule.py -g -c ogre ois cegui
Traceback (most recent call last):
File "python-ogre/BuildModule.py", line 9, in <module>
import environment
File "/home/enrico/projekte/python-ogre/environment.py", line 1899, in <module>
class raknet:
File "/home/enrico/projekte/python-ogre/environment.py", line 1907, in raknet
Config.PATH_INCLUDE_raknet
AttributeError: 'module' object has no attribute 'PATH_INCLUDE_raknet'

Ok, after removing this stuff (dont need RakNet for now):

python python-ogre/BuildModule.py -g -c ogre ois cegui
Traceback (most recent call last):
File "python-ogre/BuildModule.py", line 9, in <module>
import environment
File "/home/enrico/projekte/python-ogre/environment.py", line 1916, in <module>
class plsm2:
File "/home/enrico/projekte/python-ogre/environment.py", line 1925, in plsm2
Config.PATH_INCLUDE_plsm2
AttributeError: 'module' object has no attribute 'PATH_INCLUDE_plsm2


Ok, works for now. Then trying to build:

2-22 11:08 PythonOgre.BuildModule INFO Building Source code for ogre
02-22 11:08 PythonOgre.BuildModule DEBUG Spawning 'python generate_code.py' in '/home/enrico/projekte/python-ogre/code_generators/ogre'
02-22 11:08 PythonOgre.BuildModule WARNING Task Failed
02-22 11:08 PythonOgre.BuildModule DEBUG /home/enrico/projekte/python-ogre/code_generators/ogre
['/home/enrico/projekte/root/usr/include/boost-1_37', '/home/enrico/projekte/root/usr/include/OGRE']
['/home/enrico/projekte/python-ogre/code_generators/ogre', '/home/enrico/projekte/root/usr/include/boost-1_37', '/home/enrico/projekte/root/usr/include/OGRE']


Uhm, yeah. The boost and ogre pathes are definitely wrong. This is one thing I do not understand: I have boost 1.38 installed on my system (/usr/include/boost/...) and Ogre 1.61/trunk. Why do you want me to install and compile both libraries again? Same applies to OIS, CEGUI, etc.

I hope I can hack my way through this weird install script and get python-ogre build somehow...

andy

22-02-2009 11:34:36

You either 'have' to follow the directions for the Linux build on the wiki (as it's be designed to work on as many systems as possible and doesn't make any assumptions on what you might already have installed) - OR dive in and change the paths to match your system..

There isn't any issues using your existing version of boost, presuming you also have boost python installed and the Ogre trunk should also be fine..

You can of course also try the Linux binary builds to make things easier if you have a compatible system.

Andy

Enrico

22-02-2009 11:38:57

Ok, thanks :) Are you interested in patches for the build system?

dermont

22-02-2009 11:59:36

I think there already is a system config template file PythonOgreConfig_system.py that you could use. Simply copy it to for example PythonOgreConfig_enrico.py where enrico is your username. You can set your paths etc there and issue your generate / compile commands as per the wiki.

Enrico

22-02-2009 14:25:22

Ok, got my own config file now :)
Unfortunately I get compile errors:

02-22 15:25 PythonOgre.BuildModule INFO Building Source code for ogre
02-22 15:25 PythonOgre.BuildModule DEBUG Spawning 'python generate_code.py' in '/home/enrico/projekte/python-ogre/code_generators/ogre'
02-22 15:25 PythonOgre.BuildModule WARNING Task Failed
02-22 15:25 PythonOgre.BuildModule DEBUG /home/enrico/projekte/python-ogre/code_generators/ogre
['/usr/include/boost-1_38/', '/usr/local/include/OGRE']
['/home/enrico/projekte/python-ogre/code_generators/ogre', '/usr/include/boost-1_38/', '/usr/local/include/OGRE']

02-22 15:25 PythonOgre.BuildModule DEBUG INFO Creating xml file "/home/enrico/projekte/python-ogre/code_generators/cache/ogre_1.6.1_cache.xml" fromsource file "/home/enrico/projekte/python-ogre/code_generators/ogre/python_ogre.h" ...
INFO gccxml cmd: /usr/bin/gccxml -I"/home/enrico/projekte/python-ogre" -I"/home/enrico/projekte/python-ogre/code_generators/ogre" -I"/usr/include/boost-1_38/" -I"/usr/local/include/OGRE" -D"OGRE_NONCLIENT_BUILD" -D"OGRE_GCC_VISIBILITY" -D"__PYTHONOGRE_BUILD_CODE" -D"OGRE_VERSION_1.6.1" "/home/enrico/projekte/python-ogre/code_generators/ogre/python_ogre.h" -fxml="/home/enrico/projekte/python-ogre/code_generators/cache/ogre_1.6.1_cache.xml"
Traceback (most recent call last):
File "generate_code.py", line 1296, in <module>
generate_code()
File "generate_code.py", line 1126, in generate_code
, cflags=environment.ogre.cflags
File "/usr/lib/python2.5/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 95, in __init__
, indexing_suite_version)
File "/usr/lib/python2.5/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 138, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "/usr/lib/python2.5/site-packages/pygccxml/parser/project_reader.py", line 217, in read_files
return self.__parse_file_by_file(files)
File "/usr/lib/python2.5/site-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/lib/python2.5/site-packages/pygccxml/parser/source_reader.py", line 169, in create_xml_file
raise error
pygccxml.parser.source_reader.gccxml_runtime_error_t: Error occured while running GCC-XML: In file included from /usr/include/c++/4.3/tr1/type_traits:52,
from /usr/include/c++/4.3/tr1/unordered_map:48,
from /usr/local/include/OGRE/OgreStdHeaders.h:40,
from /usr/local/include/OGRE/OgrePrerequisites.h:401,
from /usr/local/include/OGRE/Ogre.h:32,
from /home/enrico/projekte/python-ogre/code_generators/ogre/python_ogre_masterlist.h:7,
from /home/enrico/projekte/python-ogre/code_generators/ogre/python_ogre.h:14:
/usr/include/c++/4.3/tr1_impl/type_traits:166: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.3/tr1_impl/type_traits:166: error: template argument 2 is invalid
/usr/include/c++/4.3/tr1_impl/type_traits:172: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.3/tr1_impl/type_traits:172: error: template argument 2 is invalid
/usr/include/c++/4.3/tr1_impl/type_traits:178: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.3/tr1_impl/type_traits:178: error: template argument 2 is invalid
/usr/include/c++/4.3/tr1_impl/type_traits:284: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.3/tr1_impl/type_traits:284: error: template argument 2 is invalid
/usr/include/c++/4.3/tr1_impl/type_traits:290: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.3/tr1_impl/type_traits:290: error: template argument 2 is invalid
/usr/include/c++/4.3/tr1_impl/type_traits:296: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.3/tr1_impl/type_traits:296: error: template argument 2 is invalid
In file included from /usr/include/c++/4.3/tr1/unordered_map:48,
from /usr/local/include/OGRE/OgreStdHeaders.h:40,
from /usr/local/include/OGRE/OgrePrerequisites.h:401,
from /usr/local/include/OGRE/Ogre.h:32,
from /home/enrico/projekte/python-ogre/code_generators/ogre/python_ogre_masterlist.h:7,
from /home/enrico/projekte/python-ogre/code_generators/ogre/python_ogre.h:14:
/usr/include/c++/4.3/tr1/type_traits:146: error: expected primary-expression before ',' token
/usr/include/c++/4.3/tr1/type_traits:146: error: expected primary-expression before ')' token
/usr/include/c++/4.3/tr1/type_traits:146: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.3/tr1/type_traits:240: error: requested alignment is not a constant


Any idea/hint?

andy

22-02-2009 22:49:07

Ah...It's because you are using your own unmodified version of Ogre that this is occurring.

Have a look at patch/ogre_1.6.1.patch and apply the changes to your Ogre source tree -- this doesn't change any ogre compiled code (ie you don't have to do an ogre rebuild) however does allow gccxml to generate code with your gcc version..

Andy

Enrico

23-02-2009 18:49:10

Still no luck to build python-ogre :-(

Ok #1: I tried to install the binary packages from python-ogre wiki. There is nothing for Debian lenny, so I tried sid, which gives:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package python-ogre


Ok, back to installing from source this time following exactly the wiki. Compiles and all, however starting a demo gives:
python Demo_Basic.py
Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
FreeImage version: 3.10.0
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
DDS codec registering
Registering ResourceManager for type HighLevelGpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
../plugins.cfg.linux not found, automatic plugin loading disabled.
*-*-* OGRE Initialising
*-*-* Version 1.6.1 (Shoggoth)
Traceback (most recent call last):
File "Demo_Basic.py", line 119, in <module>
main()
File "Demo_Basic.py", line 103, in main
root = OGREMain(plugins_path='../plugins.cfg.linux')
File "Demo_Basic.py", line 30, in __init__
self._load_resources(self.resource_path)
File "Demo_Basic.py", line 87, in _load_resources
section_iter = config.getSectionIterator()
TypeError: No to_python (by-value) converter found for C++ type: Ogre::MapIterator<std::map<std::string, std::multimap<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >*, std::less<std::string>, std::allocator<std::pair<std::string const, std::multimap<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >*> > > >
*-*-* OGRE Shutdown

So I copied the plugins.cfg-file from the ogre/Samples/Common/bin-directory to the demo directory and renamed it. This gives another error about rend_list being empty and thus no renderer to use :(

:(

Enrico

01-03-2009 08:13:13

*bump*

andy

01-03-2009 09:25:09

What version of gcc is on your system?

The problem you are reporting would indicate that the mapiterator hasn't been exposed for some reason -- so just to ensure nothing strange is happening update the svn (if you are building from the trunk), rm code_generators/cache/ogre*, rerun the code generation and compile (BuildPython.py -g -c ogre) stage for ogre (shouldn't take too long) and confirm you have the same issue..

Then compress the ogre.xml file from the cache directory and send it to me via the google mailing list (as this is when most of the build discussion happens and it's easier for me to get to :) ) and I'll take a look..

Regards
ANdy

Enrico

06-03-2009 10:17:01

I posted all information on the Developer Mailing List and got no response, so I am bumping here again....

andy

07-03-2009 01:23:39

Isn't your's the 64bit system??

As mentioned on the google list this isn't working at the moment and luckly I've been given access to a system and will take a look over the next week or so...

If it's not 64bit then please re-raise the issue on the google list...

Regards
Andy

Enrico

08-03-2009 21:41:20

Yeah, system is 64bit. If you need more systems, I have two 64Bit and could give you access or help ;)