I'm sending a lot of messages, I know. I'd rather be doing something
else, but apparently the building process isn't as straight forward as
I'd hoped. I'm at step 5 of the WindowsBuildAuto wiki page, and I'm
running "python python-ogre-py3/BuildModule.py -g ois". This fails
with the following error in the log:
12-22 10:42 PythonOgre.BuildModule INFO Building Source code for
ois
12-22 10:42 PythonOgre.BuildModule DEBUG Spawning 'python
generate_code.py' in 'C:\workspace\py-ogre-workspace\python-ogre-
py3\code_generators\ois'
12-22 10:42 PythonOgre.BuildModule WARNING Task Failed
12-22 10:42 PythonOgre.BuildModule DEBUG Loading ..\..
\PythonOgreConfig_nt.pyc
12-22 10:42 PythonOgre.BuildModule DEBUG Traceback (most recent
call last):
File "generate_code.py", line 28, in <module>
import common_utils
File "..\common_utils\__init__.py", line 19, in <module>
from .logger import *
ImportError: No module named logger
This makes sense, as there is no logger module in the code_generators/
common_utils directory. The only logger module I can find is in
scripts/logger.py, but I doubt that this is the one that's supposed to
be found with a relative import statement.
I'm using Python 2.7.2 to run the scripts. The file code_Generators/
common_utils/__init__.py reads "Note that only Python 2.6 and later is
supported", so I doubt that http://wiki.python-ogre.org/index.php/WindowsBuildAuto is correct in stating Python 2.5 as a requirement.
On Dec 22, 10:58 am, Sybren <syb...@stuvel.eu> wrote:
> ImportError: No module named logger
To keep things going, I've copied some logging-related code from
trunk's common_utils/__init__.py to a new fiole common_utils/
logger.py, and that seems to work.
I'm still trying to get the wrapper code for IOS generated using
"python python-ogre-py3/BuildModule.py -g ois". It now gives me this
list of errors:
12-22 12:33 PythonOgre.BuildModule INFO Building Source code for
ois
12-22 12:33 PythonOgre.BuildModule DEBUG Spawning 'python
generate_code.py' in 'C:\workspace\py-ogre-workspace\python-ogre-
py3\code_generators\ois'
12-22 12:33 PythonOgre.BuildModule WARNING Task Failed
12-22 12:33 PythonOgre.BuildModule DEBUG Loading ..\..
\PythonOgreConfig_nt.pyc
12-22 12:33 PythonOgre.BuildModule DEBUG INFO Creating xml file "C:
\workspace\py-ogre-workspace\python-ogre-py3\code_generators\cache
\ois_1.0_cache.xml" from source file "C:\workspace\py-ogre-workspace
\python-ogre-py3\code_generators\ois\python_ois.h" ...
INFO gccxml cmd: ""C:\workspace\py-ogre-workspace\gccxml-build\bin
\Debug\gccxml.exe" -D"_HAS_TR1=0" -I"C:\workspace\py-ogre-
workspace\python-ogre-py3" -I"C:/workspace/rage-py32/deps/
boost_1_48_0" -I"C:\workspace\py-ogre-workspace\ogre\SDK\include\OIS"
-D"OIS_NONCLIENT_BUILD" -D"VERSION_1.0" "C:\workspace\py-ogre-
workspace\python-ogre-py3\code_generators\ois\python_ois.h" -fxml="C:
\workspace\py-ogre-workspace\python-ogre-py3\code_generators\cache
\ois_1.0_cache.xml""
Traceback (most recent call last):
File "generate_code.py", line 360, in <module>
generate_code()
File "generate_code.py", line 275, in generate_code
, cflags=environment.ois.cflags
File "C:\Python27\lib\site-packages\pyplusplus\module_builder
\builder.py", line 92, in __init__
, indexing_suite_version)
File "C:\Python27\lib\site-packages\pyplusplus\module_builder
\builder.py", line 146, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "C:\Python27\lib\site-packages\pygccxml\parser
\project_reader.py", line 225, in read_files
return self.__parse_file_by_file(files)
File "C:\Python27\lib\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 "C:\Python27\lib\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 C:\workspace\py-ogre-
workspace\python-ogre-py3\code_generators\ois\python_ois.h:14:
C:\workspace\py-ogre-workspace\python-ogre-py3\code_generators\ois\/
python_ois_aliases.h:11: error: wrong number of template arguments (3,
should be 1)
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:1587: error: provided for 'template<class _Alloc> class
std::_Vb_reference'
C:\workspace\py-ogre-workspace\python-ogre-py3\code_generators\ois\/
python_ois_aliases.h:11: error: invalid type in declaration before ';'
token
In file included from C:\workspace\py-ogre-workspace\python-ogre-
py3\code_generators\ois\python_ois.h:22:
C:\workspace\py-ogre-workspace\python-ogre-py3\code_generators\ois\/
python_ois_sizeof.h: In function 'void
python_ois::details::instantiate()':
C:\workspace\py-ogre-workspace\python-ogre-py3\code_generators\ois\/
python_ois_sizeof.h:14: error: wrong number of template arguments (3,
should be 1)
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:1587: error: provided for 'template<class _Alloc> class
std::_Vb_reference'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/type_traits: At global scope:
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/type_traits: In instantiation of 'std::tr1::is_scalar<unsigned
int>':
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/xutility:503: instantiated from
'std::_Ptr_cat_helper<unsigned int, unsigned int>'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/memory:611: instantiated from 'void
std::_Uninitialized_fill_n(_FwdIt, _Diff, const _Tval*, _Alloc&) [with
_FwdIt = unsigned int*, _Diff = unsigned int, _Tval = unsigned int,
_Alloc = std::allocator<unsigned int>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:1421: instantiated from 'typename
std::_Vector_val<_Ty, _Ax>::_Alty::pointer std::vector<_Ty,
_Ax>::_Ufill(typename std::_Vector_val<_Ty, _Ax>::_Alty::pointer,
typename std::_Vector_val<_Ty, _Ax>::_Alty::size_type, const _Ty*)
[with _Ty = unsigned int, _Ax = std::allocator<unsigned int>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:585: instantiated from 'void std::vector<_Ty,
_Ax>::_Construct_n(typename std::_Vector_val<_Ty,
_Ax>::_Alty::size_type, const _Ty*) [with _Ty = unsigned int, _Ax =
std::allocator<unsigned int>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:530: instantiated from 'std::vector<_Ty,
_Ax>::vector(typename std::_Vector_val<_Ty, _Ax>::_Alty::size_type,
const _Ty&, const typename std::_Vector_val<_Ty, _Ax>::_Alty&) [with
_Ty = unsigned int, _Ax = std::allocator<unsigned int>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:2008: instantiated from
'std::_Vb_val<_Alloc>::_Vb_val(typename
_Alloc::rebind<std::_Vbase>::other::size_type, bool, _Alloc) [with
_Alloc = std::allocator<bool>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:2096: instantiated from 'std::vector<bool,
_Alloc>::vector() [with _Alloc = std::allocator<bool>]'
C:/workspace/py-ogre-workspace/ogre/SDK/include/OIS/OISJoyStick.h:
70: instantiated from here
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/type_traits:611: error: 'value' is not a member of
'std::tr1::is_enum<unsigned int>'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/xutility: In instantiation of 'std::_Ptr_cat_helper<unsigned
int, unsigned int>':
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/memory:611: instantiated from 'void
std::_Uninitialized_fill_n(_FwdIt, _Diff, const _Tval*, _Alloc&) [with
_FwdIt = unsigned int*, _Diff = unsigned int, _Tval = unsigned int,
_Alloc = std::allocator<unsigned int>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:1421: instantiated from 'typename
std::_Vector_val<_Ty, _Ax>::_Alty::pointer std::vector<_Ty,
_Ax>::_Ufill(typename std::_Vector_val<_Ty, _Ax>::_Alty::pointer,
typename std::_Vector_val<_Ty, _Ax>::_Alty::size_type, const _Ty*)
[with _Ty = unsigned int, _Ax = std::allocator<unsigned int>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:585: instantiated from 'void std::vector<_Ty,
_Ax>::_Construct_n(typename std::_Vector_val<_Ty,
_Ax>::_Alty::size_type, const _Ty*) [with _Ty = unsigned int, _Ax =
std::allocator<unsigned int>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:530: instantiated from 'std::vector<_Ty,
_Ax>::vector(typename std::_Vector_val<_Ty, _Ax>::_Alty::size_type,
const _Ty&, const typename std::_Vector_val<_Ty, _Ax>::_Alty&) [with
_Ty = unsigned int, _Ax = std::allocator<unsigned int>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:2008: instantiated from
'std::_Vb_val<_Alloc>::_Vb_val(typename
_Alloc::rebind<std::_Vbase>::other::size_type, bool, _Alloc) [with
_Alloc = std::allocator<bool>]'
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/vector:2096: instantiated from 'std::vector<bool,
_Alloc>::vector() [with _Alloc = std::allocator<bool>]'
C:/workspace/py-ogre-workspace/ogre/SDK/include/OIS/OISJoyStick.h:
70: instantiated from here
C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/
Include/xutility:503: error: 'value' is not a member of
'std::tr1::is_scalar<unsigned int>'
I have to assume that something has changed in the Window 7/VC10 template library -- as a work around you can simply comment out the offending line in python_ois_alaises.h line 11 -- won't change the code generation but will cause an 'ugly' class name (which probably won't impact anything)...
As a side note have you simply tried using the prebuilt windows binaries as these should work fine in your environment.
On Thu, Dec 22, 2011 at 7:36 PM, Sybren <syb...@stuvel.eu> wrote: > On Dec 22, 10:58 am, Sybren <syb...@stuvel.eu> wrote: > > ImportError: No module named logger
> To keep things going, I've copied some logging-related code from > trunk's common_utils/__init__.py to a new fiole common_utils/ > logger.py, and that seems to work.
> I'm still trying to get the wrapper code for IOS generated using > "python python-ogre-py3/BuildModule.py -g ois". It now gives me this > list of errors:
> 12-22 12:33 PythonOgre.BuildModule INFO Building Source code for > ois > 12-22 12:33 PythonOgre.BuildModule DEBUG Spawning 'python > generate_code.py' in 'C:\workspace\py-ogre-workspace\python-ogre- > py3\code_generators\ois' > 12-22 12:33 PythonOgre.BuildModule WARNING Task Failed > 12-22 12:33 PythonOgre.BuildModule DEBUG Loading ..\.. > \PythonOgreConfig_nt.pyc
> 12-22 12:33 PythonOgre.BuildModule DEBUG INFO Creating xml file "C: > \workspace\py-ogre-workspace\python-ogre-py3\code_generators\cache > \ois_1.0_cache.xml" from source file "C:\workspace\py-ogre-workspace > \python-ogre-py3\code_generators\ois\python_ois.h" ... > INFO gccxml cmd: ""C:\workspace\py-ogre-workspace\gccxml-build\bin > \Debug\gccxml.exe" -D"_HAS_TR1=0" -I"C:\workspace\py-ogre- > workspace\python-ogre-py3" -I"C:/workspace/rage-py32/deps/ > boost_1_48_0" -I"C:\workspace\py-ogre-workspace\ogre\SDK\include\OIS" > -D"OIS_NONCLIENT_BUILD" -D"VERSION_1.0" "C:\workspace\py-ogre- > workspace\python-ogre-py3\code_generators\ois\python_ois.h" -fxml="C: > \workspace\py-ogre-workspace\python-ogre-py3\code_generators\cache > \ois_1.0_cache.xml"" > Traceback (most recent call last): > File "generate_code.py", line 360, in <module> > generate_code() > File "generate_code.py", line 275, in generate_code > , cflags=environment.ois.cflags > File "C:\Python27\lib\site-packages\pyplusplus\module_builder > \builder.py", line 92, in __init__ > , indexing_suite_version) > File "C:\Python27\lib\site-packages\pyplusplus\module_builder > \builder.py", line 146, in __parse_declarations > decls = reader.read_files( files, compilation_mode ) > File "C:\Python27\lib\site-packages\pygccxml\parser > \project_reader.py", line 225, in read_files > return self.__parse_file_by_file(files) > File "C:\Python27\lib\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 "C:\Python27\lib\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 C:\workspace\py-ogre- > workspace\python-ogre-py3\code_generators\ois\python_ois.h:14: > C:\workspace\py-ogre-workspace\python-ogre-py3\code_generators\ois\/ > python_ois_aliases.h:11: error: wrong number of template arguments (3, > should be 1) > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:1587: error: provided for 'template<class _Alloc> class > std::_Vb_reference' > C:\workspace\py-ogre-workspace\python-ogre-py3\code_generators\ois\/ > python_ois_aliases.h:11: error: invalid type in declaration before ';' > token > In file included from C:\workspace\py-ogre-workspace\python-ogre- > py3\code_generators\ois\python_ois.h:22: > C:\workspace\py-ogre-workspace\python-ogre-py3\code_generators\ois\/ > python_ois_sizeof.h: In function 'void > python_ois::details::instantiate()': > C:\workspace\py-ogre-workspace\python-ogre-py3\code_generators\ois\/ > python_ois_sizeof.h:14: error: wrong number of template arguments (3, > should be 1) > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:1587: error: provided for 'template<class _Alloc> class > std::_Vb_reference' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/type_traits: At global scope: > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/type_traits: In instantiation of 'std::tr1::is_scalar<unsigned > int>': > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/xutility:503: instantiated from > 'std::_Ptr_cat_helper<unsigned int, unsigned int>' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/memory:611: instantiated from 'void > std::_Uninitialized_fill_n(_FwdIt, _Diff, const _Tval*, _Alloc&) [with > _FwdIt = unsigned int*, _Diff = unsigned int, _Tval = unsigned int, > _Alloc = std::allocator<unsigned int>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:1421: instantiated from 'typename > std::_Vector_val<_Ty, _Ax>::_Alty::pointer std::vector<_Ty, > _Ax>::_Ufill(typename std::_Vector_val<_Ty, _Ax>::_Alty::pointer, > typename std::_Vector_val<_Ty, _Ax>::_Alty::size_type, const _Ty*) > [with _Ty = unsigned int, _Ax = std::allocator<unsigned int>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:585: instantiated from 'void std::vector<_Ty, > _Ax>::_Construct_n(typename std::_Vector_val<_Ty, > _Ax>::_Alty::size_type, const _Ty*) [with _Ty = unsigned int, _Ax = > std::allocator<unsigned int>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:530: instantiated from 'std::vector<_Ty, > _Ax>::vector(typename std::_Vector_val<_Ty, _Ax>::_Alty::size_type, > const _Ty&, const typename std::_Vector_val<_Ty, _Ax>::_Alty&) [with > _Ty = unsigned int, _Ax = std::allocator<unsigned int>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:2008: instantiated from > 'std::_Vb_val<_Alloc>::_Vb_val(typename > _Alloc::rebind<std::_Vbase>::other::size_type, bool, _Alloc) [with > _Alloc = std::allocator<bool>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:2096: instantiated from 'std::vector<bool, > _Alloc>::vector() [with _Alloc = std::allocator<bool>]' > C:/workspace/py-ogre-workspace/ogre/SDK/include/OIS/OISJoyStick.h: > 70: instantiated from here > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/type_traits:611: error: 'value' is not a member of > 'std::tr1::is_enum<unsigned int>' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/xutility: In instantiation of 'std::_Ptr_cat_helper<unsigned > int, unsigned int>': > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/memory:611: instantiated from 'void > std::_Uninitialized_fill_n(_FwdIt, _Diff, const _Tval*, _Alloc&) [with > _FwdIt = unsigned int*, _Diff = unsigned int, _Tval = unsigned int, > _Alloc = std::allocator<unsigned int>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:1421: instantiated from 'typename > std::_Vector_val<_Ty, _Ax>::_Alty::pointer std::vector<_Ty, > _Ax>::_Ufill(typename std::_Vector_val<_Ty, _Ax>::_Alty::pointer, > typename std::_Vector_val<_Ty, _Ax>::_Alty::size_type, const _Ty*) > [with _Ty = unsigned int, _Ax = std::allocator<unsigned int>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:585: instantiated from 'void std::vector<_Ty, > _Ax>::_Construct_n(typename std::_Vector_val<_Ty, > _Ax>::_Alty::size_type, const _Ty*) [with _Ty = unsigned int, _Ax = > std::allocator<unsigned int>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:530: instantiated from 'std::vector<_Ty, > _Ax>::vector(typename std::_Vector_val<_Ty, _Ax>::_Alty::size_type, > const _Ty&, const typename std::_Vector_val<_Ty, _Ax>::_Alty&) [with > _Ty = unsigned int, _Ax = std::allocator<unsigned int>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:2008: instantiated from > 'std::_Vb_val<_Alloc>::_Vb_val(typename > _Alloc::rebind<std::_Vbase>::other::size_type, bool, _Alloc) [with > _Alloc = std::allocator<bool>]' > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/vector:2096: instantiated from 'std::vector<bool, > _Alloc>::vector() [with _Alloc = std::allocator<bool>]' > C:/workspace/py-ogre-workspace/ogre/SDK/include/OIS/OISJoyStick.h: > 70: instantiated from here > C:/workspace/py-ogre-workspace/gccxml-build/GCC_XML/Support/Vc10/ > Include/xutility:503: error: 'value' is not a member of > 'std::tr1::is_scalar<unsigned int>'
> Sybren
> -- > You received this message because you are subscribed to the Google Groups > "Python Ogre Developers" group. > To post to this group, send email to > python-ogre-developers@googlegroups.com. > To unsubscribe from this group, send email to > python-ogre-developers+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/python-ogre-developers?hl=en.
@Sybren
Python 2.7.2 to run the scripts will do fine. I also don't know what
the logger module is but worked around it pretty much as you did.
What version of gccxml are you using?.
In addition to what Andy said maybe you could try updating to the
latest cvs version of gccxml where there should be more recent fixes
for VC10. I'm not sure doing so will have any impact on the rest of
the build, but it's what I did for gcc4.6.
On Dec 23, 2:53 am, Andy Miller <a...@kiwisoft.com> wrote:
> I have to assume that something has changed in the Window 7/VC10 template
> library -- as a work around you can simply comment out the offending line
> in python_ois_alaises.h line 11 -- won't change the code generation but
> will cause an 'ugly' class name (which probably won't impact anything)...
> As a side note have you simply tried using the prebuilt windows binaries as
> these should work fine in your environment.
> Regards
> Andy
> On Thu, Dec 22, 2011 at 7:36 PM, Sybren <syb...@stuvel.eu> wrote:
> > On Dec 22, 10:58 am, Sybren <syb...@stuvel.eu> wrote:
> > > ImportError: No module named logger
> > To keep things going, I've copied some logging-related code from
> > trunk's common_utils/__init__.py to a new fiole common_utils/
> > logger.py, and that seems to work.
> > I'm still trying to get the wrapper code for IOS generated using
> > "python python-ogre-py3/BuildModule.py -g ois". It now gives me this
> > list of errors: