Hi all,
I'm trying to get OpenSG's python-bindings to work on Windows (and
contruibuting that back to the project), and trying to track down an
exception that get's thrown when running it's gen_bindings.py. (see
attached log.txt for output)
The source for gen_bindings.py is here, for reference:
https://realityforge.vrsource.org/trac/pyopensg/browser/branches/trunk_update/src/gen_bindings.py
From what I can see, the exception is thrown, as can be seen, in
read_gccxml_file in pygccxml/parser/source_reader.py. The generation of
the temp xml file (self.create_xml_file( ffname )) creates an empty
file, which then gets a syntax error when read back.
As I'm rather new to py++ (being old on c++ and average on python) I
don't really know where to look when hunting for this bug.
The PyOpenSG-devs have only used linux, and have maybe seen this before,
earlier, but can't recall what and when. They also have used a earlier
py++-version, but I'm using 1.0. I might be shooting myself in the foot
with that, but I hope not.
All help gratefully recieved. :)
Cheers,
/Marcus
J:\3rd\OpenSG\pyopensg_trunk_update\src>c:\dev\python26\python
.\gen_bindings.py -s J:\3rd\OpenSG\opensg2_trunk\source\ -b
j:\3rd\boost\boost_1_36_0 -c
J:\3rd\OpenSG\opensg2_trunk\source\\..\build.win32.cl.9.0\instlinks\bin\
c:\dev\python26\lib\site-packages\pygccxml\parser\declarations_cache.py:8:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
INFO Loading cache file "pypp.pyopensg.cache.module".
ERROR Error occured while reading cache file:
Traceback (most recent call last):
File
"c:\dev\Python26\lib\site-packages\pygccxml\parser\declarations_cache.py", line
156, in __load
cache = cPickle.load( cache_file_obj )
EOFError
INFO Invalid cache file: [pypp.pyopensg.cache.module] Regenerating.
INFO Parsing source file "osg_module\osgmodule_mainheader.h" ...
INFO gccxml cmd: ""C:\program files\bin\gccxml.exe"
/IJ:\3rd\OpenSG\opensg2_trunk\build.win32.cl.9.0\instlinks\include /IC:\Program
Filesoostoost_1_36_0 -DBOOST_PYTHON_MAX_ARITY=21 -I"." -I"osg_module"
-I"J:\3rd\OpenSG\opensg2_trunk\build.win32.cl.9.0\instlinks\include"
-I"J:\3rd\OpenSG\opensg2_trunk\build.win32.cl.9.0\instlinks\include\OpenSG"
-I"j:\3rd\boost\boost_1_36_0" -I"c:\dev\python26\include"
"osg_module\osgmodule_mainheader.h"
-fxml="c:\users\marcusl\appdata\local\temp\tmp1e92ik.xml""
Auto-building list of node cores using .fcd files...
Node cores found: 195
Building PyOpenSG module....
setting up templates...
creating header file: osg_module\osgmodule_mainheader.h
creating builder and parsing.
{'optimize_queries': True, 'cache': 'pypp.pyopensg.cache.module',
'include_paths': ['osg_module',
'J:\\3rd\\OpenSG\\opensg2_trunk\\build.win32.cl.9.0\\instlinks\\include',
'J:\\3rd\\OpenSG\\opensg2_trunk\\build.win32.cl.9.0\\instlinks\\include\\OpenSG',
'j:\\3rd\\boost\\boost_1_36_0', 'c:\\dev\\python26\\include'],
'define_symbols': [], 'cflags':
'/IJ:\\3rd\\OpenSG\\opensg2_trunk\\build.win32.cl.9.0\\instlinks\\include
/IC:\\Program Files\x08oost\x08oost_1_36_0 -DBOOST_PYTHON_MAX_ARITY=21',
'ignore_gccxml_output': True, 'working_directory': '.'}
No handlers could be found for logger "pygccxml"
Traceback (most recent call last):
File ".\gen_bindings.py", line 1918, in <module>
main()
File ".\gen_bindings.py", line 843, in main
mb = ModuleBuilder([main_header_filename], **kwargs)
File
"C:\dev\python26\lib\site-packages\pyplusplus\module_builder\builder.py", line
92, in __init__
, indexing_suite_version)
File
"C:\dev\python26\lib\site-packages\pyplusplus\module_builder\builder.py", line
146, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "c:\dev\Python26\lib\site-packages\pygccxml\parser\project_reader.py",
line 225, in read_files
return self.__parse_file_by_file(files)
File "c:\dev\Python26\lib\site-packages\pygccxml\parser\project_reader.py",
line 250, in __parse_file_by_file
decls = reader.read_file( header )
File "c:\dev\Python26\lib\site-packages\pygccxml\parser\source_reader.py",
line 197, in read_file
return self.read_gccxml_file( source_file )
File "c:\dev\Python26\lib\site-packages\pygccxml\parser\source_reader.py",
line 224, in read_gccxml_file
raise error
SyntaxError: no element found: line 1, column 0
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig