[fixed] fail to compile & generate the wrapper code for ogre

makism

05-06-2009 05:50:29

hello :-)

i had compiled python-ogre (using the branch v1.6-or-something :P) with python 2.5 following the instructions at the wiki plus some tips at the forums (like applying ogre patches myself).
recently i upgrade to python 2.6 and i switched to trunk (which supports python-2.6). following the same instructions i have a problem when i generate and compile the wrapper code for ogre. you know: python python-ogre/BuildModule.py -g -c ogre :P
i tried somethings, like applying and not applying the ogre-patches (although i sure the are needed :P), but no results.
here is the log.out


06-05 07:59 PythonOgre.BuildModule INFO Building Source code for ogre
06-05 07:59 PythonOgre.BuildModule DEBUG Spawning 'python generate_code.py' in '/media/Files/Python-Ogre/python-ogre/code_generators/ogre'
06-05 08:00 PythonOgre.BuildModule WARNING Task Failed
06-05 08:00 PythonOgre.BuildModule DEBUG Using the 1 cores

06-05 08:00 PythonOgre.BuildModule DEBUG ../common_utils/__init__.py:7: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
INFO Creating xml file "/media/Files/Python-Ogre/python-ogre/code_generators/cache/ogre_1.6.1_cache.xml" from source file "/media/Files/Python-Ogre/python-ogre/code_generators/ogre/python_ogre.h" ...
INFO gccxml cmd: /media/Files/Python-Ogre/root/usr/bin/gccxml -I"/media/Files/Python-Ogre/python-ogre" -I"/media/Files/Python-Ogre/python-ogre/code_generators/ogre" -I"/media/Files/Python-Ogre/root/usr/include/boost-1_38" -I"/media/Files/Python-Ogre/root/usr/include/OGRE" -D"OGRE_NONCLIENT_BUILD" -D"OGRE_GCC_VISIBILITY" -D"__PYTHONOGRE_BUILD_CODE" -D"OGRE_VERSION_1.6.1" "/media/Files/Python-Ogre/python-ogre/code_generators/ogre/python_ogre.h" -fxml="/media/Files/Python-Ogre/python-ogre/code_generators/cache/ogre_1.6.1_cache.xml"
/media/Files/Python-Ogre/root/usr/lib/python2.6/site-packages/pygccxml/parser/source_reader.py:151: DeprecationWarning: os.popen4 is deprecated. Use the subprocess module.
input_, output = os.popen4( command_line )
Traceback (most recent call last):
File "generate_code.py", line 1320, in <module>
generate_code()
File "generate_code.py", line 1152, in generate_code
, cflags=environment.ogre.cflags
File "/media/Files/Python-Ogre/root/usr/lib/python2.6/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 95, in __init__
, indexing_suite_version)
File "/media/Files/Python-Ogre/root/usr/lib/python2.6/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 138, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "/media/Files/Python-Ogre/root/usr/lib/python2.6/site-packages/pygccxml/parser/project_reader.py", line 217, in read_files
return self.__parse_file_by_file(files)
File "/media/Files/Python-Ogre/root/usr/lib/python2.6/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 "/media/Files/Python-Ogre/root/usr/lib/python2.6/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/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1/type_traits:52,
from /usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1/unordered_map:48,
from /media/Files/Python-Ogre/root/usr/include/OGRE/OgreStdHeaders.h:40,
from /media/Files/Python-Ogre/root/usr/include/OGRE/OgrePrerequisites.h:408,
from /media/Files/Python-Ogre/root/usr/include/OGRE/Ogre.h:32,
from /media/Files/Python-Ogre/python-ogre/code_generators/ogre/python_ogre_masterlist.h:7,
from /media/Files/Python-Ogre/python-ogre/code_generators/ogre/python_ogre.h:14:
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:166: error: a function call cannot appear in a constant-expression
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:166: error: template argument 2 is invalid
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:172: error: a function call cannot appear in a constant-expression
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:172: error: template argument 2 is invalid
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:178: error: a function call cannot appear in a constant-expression
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:178: error: template argument 2 is invalid
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:284: error: a function call cannot appear in a constant-expression
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:284: error: template argument 2 is invalid
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:290: error: a function call cannot appear in a constant-expression
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:290: error: template argument 2 is invalid
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:296: error: a function call cannot appear in a constant-expression
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1_impl/type_traits:296: error: template argument 2 is invalid
In file included from /usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1/unordered_map:48,
from /media/Files/Python-Ogre/root/usr/include/OGRE/OgreStdHeaders.h:40,
from /media/Files/Python-Ogre/root/usr/include/OGRE/OgrePrerequisites.h:408,
from /media/Files/Python-Ogre/root/usr/include/OGRE/Ogre.h:32,
from /media/Files/Python-Ogre/python-ogre/code_generators/ogre/python_ogre_masterlist.h:7,
from /media/Files/Python-Ogre/python-ogre/code_generators/ogre/python_ogre.h:14:
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1/type_traits:146: error: expected primary-expression before ',' token
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1/type_traits:146: error: expected primary-expression before ')' token
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1/type_traits:146: error: a function call cannot appear in a constant-expression
/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include/g++-v4/tr1/type_traits:240: error: requested alignment is not a constant


06-05 08:00 PythonOgre.BuildModule INFO Compiling Source code for ogre
06-05 08:00 PythonOgre.BuildModule DEBUG Spawning 'scons -j1 PROJECTS=ogre' in '/media/Files/Python-Ogre/python-ogre'


any help would be appreciated.

p.s.: sorry for the big post...

andy

05-06-2009 11:35:05

Did you apply the ogre patch (in the ./patch) directory against the ogre source ??

Not sure if it will fix the issue as I'm doing some work on Ogre 1.7 so haven't looked at latest Ogre 1.6 release...

Andy

makism

05-06-2009 14:11:46

thanks Andy for the quick reply, but it seems that it was mistake...
i applied the patches at the wrong... directory :P