Ubuntu 11.10 build errors for Ogre 1.7.2

algaeshock

22-07-2012 15:02:14

I decided to follow the Instructions_Ubuntu.txt, and I got to this part:

>python python-ogre/BuildModule.py -g -v ogre

log.out says:

07-22 09:45 PythonOgre.BuildModule INFO Building Source code for ogre
07-22 09:45 PythonOgre.BuildModule DEBUG Spawning 'python generate_code.py' in '/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre'
07-22 09:45 PythonOgre.BuildModule WARNING Task Failed
07-22 09:45 PythonOgre.BuildModule DEBUG
07-22 09:45 PythonOgre.BuildModule DEBUG


The error output says:

PythonOgre.BuildModule: INFO Building Source code for ogre
***** :
Traceback (most recent call last):
File "generate_code.py", line 1484, in <module>
generate_code()
File "generate_code.py", line 1213, in generate_code
, cflags=environment.ogre.cflags
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 95, in __init__
, indexing_suite_version)
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 138, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pygccxml/parser/project_reader.py", line 217, in read_files
return self.__parse_file_by_file(files)
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pygccxml/parser/project_reader.py", line 238, in __parse_file_by_file
, self.__decl_factory )
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pygccxml/parser/source_reader.py", line 88, in __init__
self.__config.raise_on_wrong_settings()
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pygccxml/parser/config.py", line 196, in raise_on_wrong_settings
raise RuntimeError( msg )
RuntimeError: gccxml_path("/home/tables/programming/python/python-ogre/development/root/usr/bin") should exists or to be a valid file name.
PythonOgre.BuildModule: WARNING Task Failed


But I do see that .../development/root/usr/bin exists. I see files: cgc, cgfxcat, cginfo, OgreMeshUpgrader, OgreXMLConverter.

dermont

22-07-2012 16:23:43

You probably haven't built the gccxml module, fortunately Ubuntu/Debian repo has a version of gccxml that is newer than the one built via python-ogre.

Check the version of gccxml:
>>apt-cache show gccxml

if you see the version as cvs2011xxxx then install:
>> sudo apt-get install gccxml

Them edit your PythonOgreConfig_posix.py file (or PythonOgreConfig_system.py if you are following the tutorial) and point gccxml_bin path, e.g:

# We need to know where to find gccxml......
#gccxml_bin = os.path.join(BASE_DIR,'gccxml-build/bin')
#gccxml_bin = os.path.join(ROOT_DIR,'usr/bin')
gccxml_bin = r'/usr/bin/gccxml'


See this link here for other potential problems or post here.
viewtopic.php?f=3&t=14981

algaeshock

23-07-2012 00:30:28

Thanks. I installed the latest gccxml from the repository and edited the config file, but now there is another error:


PythonOgre.BuildModule: INFO Building Source code for ogre
***** :
INFO Creating xml file "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/cache/ogre_1.7.2_cache.xml" from source file "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h" ...
pygccxml.cxx_parser: INFO Creating xml file "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/cache/ogre_1.7.2_cache.xml" from source file "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h" ...
INFO gccxml cmd: /usr/bin/gccxml -I"/home/tables/programming/python/python-ogre/development/python-ogre" -I"/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre" -I"/home/tables/programming/python/python-ogre/development/root/usr/include/boost" -I"/home/tables/programming/python/python-ogre/development/root/usr/include/OGRE" -I"/home/tables/programming/python/python-ogre/development/ogre/Components/Property/include" -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"OGRE_VERSION_1.7.2" "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h" -fxml="/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/cache/ogre_1.7.2_cache.xml"
pygccxml.cxx_parser: INFO gccxml cmd: /usr/bin/gccxml -I"/home/tables/programming/python/python-ogre/development/python-ogre" -I"/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre" -I"/home/tables/programming/python/python-ogre/development/root/usr/include/boost" -I"/home/tables/programming/python/python-ogre/development/root/usr/include/OGRE" -I"/home/tables/programming/python/python-ogre/development/ogre/Components/Property/include" -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"OGRE_VERSION_1.7.2" "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h" -fxml="/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/cache/ogre_1.7.2_cache.xml"
Traceback (most recent call last):
File "generate_code.py", line 1484, in <module>
generate_code()
File "generate_code.py", line 1213, in generate_code
, cflags=environment.ogre.cflags
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 95, in __init__
, indexing_suite_version)
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 138, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pygccxml/parser/project_reader.py", line 217, in read_files
return self.__parse_file_by_file(files)
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/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 "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-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 /usr/include/c++/4.6/tr1/unordered_map:39,
from /home/tables/programming/python/python-ogre/development/root/usr/include/OGRE/OgreStdHeaders.h:40,
from /home/tables/programming/python/python-ogre/development/root/usr/include/OGRE/OgrePrerequisites.h:315,
from /home/tables/programming/python/python-ogre/development/root/usr/include/OGRE/Ogre.h:31,
from /home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/./python_ogre_include_OGRE.h:24,
from /home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre_masterlist.h:11,
from /home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h:11:
/usr/include/c++/4.6/tr1/type_traits:211: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:211: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:217: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:217: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:223: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:223: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:230: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:230: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:231: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:231: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:231: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:233: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:233: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:234: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:234: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:234: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:236: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:236: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:237: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:237: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:237: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:239: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:239: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:240: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:240: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:240: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:242: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:242: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:243: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:243: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:243: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:245: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:245: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:246: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:246: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:246: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:248: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:248: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:249: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:249: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:249: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:251: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:251: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:252: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:252: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:252: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:337: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:337: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:343: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:343: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:349: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:349: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:582: error: expected primary-expression before ',' token
/usr/include/c++/4.6/tr1/type_traits:582: error: expected primary-expression before ')' token
/usr/include/c++/4.6/tr1/type_traits:582: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:676: error: requested alignment is not a constant
PythonOgre.BuildModule: WARNING Task Failed


I thought maybe it was some incompatibility issue between gcc and gccxml as this thread had suggested:
http://www.ogre3d.org/addonforums/viewtopic.php?f=3&t=14274

I changed the line to '01May2011', and my gcc is 4.6.1. It didn't work.

I also tried purging the old gccxml and installing it again:
sudo apt-get purge gccxml && sudo apt-get install gccxml

I tried adding to python_ogrenewt2.h (as per this thread: http://linode.ogre3d.org/addonforums/viewtopic.php?f=3&t=29480)
#include "../ogre/python_ogre_include_OGRE.h"

None of them worked to fix the error.

dermont

23-07-2012 04:53:55

Thanks. I installed the latest gccxml from the repository and edited the config file, but now there is another error:


PythonOgre.BuildModule: INFO Building Source code for ogre
***** :
INFO Creating xml file "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/cache/ogre_1.7.2_cache.xml" from source file "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h" ...
pygccxml.cxx_parser: INFO Creating xml file "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/cache/ogre_1.7.2_cache.xml" from source file "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h" ...
INFO gccxml cmd: /usr/bin/gccxml -I"/home/tables/programming/python/python-ogre/development/python-ogre" -I"/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre" -I"/home/tables/programming/python/python-ogre/development/root/usr/include/boost" -I"/home/tables/programming/python/python-ogre/development/root/usr/include/OGRE" -I"/home/tables/programming/python/python-ogre/development/ogre/Components/Property/include" -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"OGRE_VERSION_1.7.2" "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h" -fxml="/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/cache/ogre_1.7.2_cache.xml"
pygccxml.cxx_parser: INFO gccxml cmd: /usr/bin/gccxml -I"/home/tables/programming/python/python-ogre/development/python-ogre" -I"/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre" -I"/home/tables/programming/python/python-ogre/development/root/usr/include/boost" -I"/home/tables/programming/python/python-ogre/development/root/usr/include/OGRE" -I"/home/tables/programming/python/python-ogre/development/ogre/Components/Property/include" -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"OGRE_VERSION_1.7.2" "/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h" -fxml="/home/tables/programming/python/python-ogre/development/python-ogre/code_generators/cache/ogre_1.7.2_cache.xml"
Traceback (most recent call last):
File "generate_code.py", line 1484, in <module>
generate_code()
File "generate_code.py", line 1213, in generate_code
, cflags=environment.ogre.cflags
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 95, in __init__
, indexing_suite_version)
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 138, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-packages/pygccxml/parser/project_reader.py", line 217, in read_files
return self.__parse_file_by_file(files)
File "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/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 "/home/tables/programming/python/python-ogre/development/root/usr/lib/python2.7/site-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 /usr/include/c++/4.6/tr1/unordered_map:39,
from /home/tables/programming/python/python-ogre/development/root/usr/include/OGRE/OgreStdHeaders.h:40,
from /home/tables/programming/python/python-ogre/development/root/usr/include/OGRE/OgrePrerequisites.h:315,
from /home/tables/programming/python/python-ogre/development/root/usr/include/OGRE/Ogre.h:31,
from /home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/./python_ogre_include_OGRE.h:24,
from /home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre_masterlist.h:11,
from /home/tables/programming/python/python-ogre/development/python-ogre/code_generators/ogre/python_ogre.h:11:
/usr/include/c++/4.6/tr1/type_traits:211: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:211: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:217: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:217: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:223: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:223: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:230: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:230: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:231: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:231: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:231: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:233: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:233: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:234: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:234: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:234: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:236: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:236: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:237: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:237: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:237: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:239: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:239: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:240: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:240: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:240: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:242: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:242: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:243: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:243: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:243: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:245: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:245: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:246: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:246: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:246: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:248: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:248: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:249: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:249: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:249: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:251: error: expected nested-name-specifier before '...' token
/usr/include/c++/4.6/tr1/type_traits:251: error: expected '>' before '...' token
/usr/include/c++/4.6/tr1/type_traits:252: error: '_ArgTypes' was not declared in this scope
/usr/include/c++/4.6/tr1/type_traits:252: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp> struct std::tr1::is_function'
/usr/include/c++/4.6/tr1/type_traits:252: error: expected a type, got '(_Res)(<expression error>)'
/usr/include/c++/4.6/tr1/type_traits:337: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:337: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:343: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:343: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:349: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:349: error: template argument 2 is invalid
/usr/include/c++/4.6/tr1/type_traits:582: error: expected primary-expression before ',' token
/usr/include/c++/4.6/tr1/type_traits:582: error: expected primary-expression before ')' token
/usr/include/c++/4.6/tr1/type_traits:582: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.6/tr1/type_traits:676: error: requested alignment is not a constant
PythonOgre.BuildModule: WARNING Task Failed


I thought maybe it was some incompatibility issue between gcc and gccxml as this thread had suggested:
http://www.ogre3d.org/addonforums/viewtopic.php?f=3&t=14274

I changed the line to '01May2011', and my gcc is 4.6.1. It didn't work.

I also tried purging the old gccxml and installing it again:
sudo apt-get purge gccxml && sudo apt-get install gccxml

I tried adding to python_ogrenewt2.h (as per this thread: http://linode.ogre3d.org/addonforums/viewtopic.php?f=3&t=29480)
#include "../ogre/python_ogre_include_OGRE.h"

None of them worked to fix the error.


The problem is similar to the ogrenewt2 link you posted above so the gccxml version isn't the issue here.

What version of python-ogre svn are you using? I'm assuming trunk in which case this should already be set-up so I'm not sure what the problem is.

Looking at python_ogre_include_OGRE.h (the define OGRE_COMP_VER 420 is the hack to disable tr1 for gccxml) the only thing I can think of is that Ogre wasn't built with thread support, try removing the check, e.g:

#include "OgrePlatform.h"
//#if (OGRE_COMPILER == OGRE_COMPILER_GNUC ) && OGRE_THREAD_PROVIDER
#define OGRE_COMP_VER 420
//#endif


Before you do that go to the python-ogre install dir and look at include/OGRE/OgreBuildSettings.h and check what OGRE_THREAD_PROVIDER says (1) Boost Threading Support. DO NOT manually change these values.

#define OGRE_THREAD_SUPPORT 2
#define OGRE_THREAD_PROVIDER 1


Secondly go to the python-ogre lib dir and check the shared lib has been built against whatever boost version you have installed, e.g:

>> ldd *OgreMain*.so
..
libboost_thread.so.1.49.0 => /usr/local/lib/libboost_thread.so.1.49.0 (0xb6def000)
..