I recently updated to Python 2.7 from Python 2.6 and am running into issues with pygccxml. Previously, I was on: Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)] on win32 I'm now on: Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
On both systems, I have the latest versions of pygccxml/py++ installed from SVN. I've diff'd the versions installed in both interpreter's site-packages directory and they match exactly. When I run on Python 2.7.3, the suprocess call to gccxml barfs. Here is an example: INFO Parsing source file "D:\SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces\temp.executive.hpp" ... INFO gccxml cmd: ""C:\MinGW\bin\gccxml.exe" -DBOOST_NO_RVALUE_REFERENCES -D__mode__(x)= -DMS_WIN64 -I"." -I"D:\SimExternalInterfaces\src\C++" -I ExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces" -I"C:\Python27\include" -I"D:\SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterf "D:\SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces\temp.executive.hpp" -fxml="c:\users\josh\appdata\local\temp\tmp0h9nvf.xml"" COMMAND LINE*""C:\MinGW\bin\gccxml.exe" -DBOOST_NO_RVALUE_REFERENCES -D__mode__(x)= -DMS_WIN64 -I"." -I"D:\SimExternalInterfaces\src\C++" -I"D:\ rnalInterfaces\src\C++\SimInterfaces\SimExecInterfaces" -I"C:\Python27\include" -I"D:\SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces \SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces\temp.executive.hpp" -fxml="c:\users\josh\appdata\local\temp\tmp0h9nvf.xml""* <type 'str'> LENGTH 433 LINE The input line is too long. LINE LINE Traceback (most recent call last): File "C:\Python27\lib\site-packages\pygccxml\parser\source_reader.py", line 229, in read_gccxml_file gccxml_file = self.create_xml_file( ffname ) File "C:\Python27\lib\site-packages\pygccxml\parser\source_reader.py", line 185, in create_xml_file raise error gccxml_runtime_error_t: Error occured while running GCC-XML: The input line is too long. ffname D:\SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces\temp.executive.hpp There are a few extra print statements at the end, which line up to some debugging code I inserted into source_reader.py: print "COMMAND LINE*%s*" % (command_line,) print type(command_line) print "LENGTH", len(command_line) The few lines beginning with "LINE" are just prints from the loop that reads the stdout pipe after spawning gccxml. As you can see, the line is only 433 characters which is well within Windows limits. I've moved the project all over the place and no matter where it's at, I get this error. If I switch back to Python26, this is what I get: INFO Parsing source file "D:\SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces\temp.executive.hpp" ... INFO gccxml cmd: ""C:\MinGW\bin\gccxml.exe" -DBOOST_NO_RVALUE_REFERENCES -D__mode__(x)= -DMS_WIN64 -I"." -I"D:\SimExternalInterfaces\src\C++" -I ExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces" -I"C:\Python26\include" -I"D:\SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterf "D:\SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces\temp.executive.hpp" -fxml="c:\users\josh\appdata\local\temp\tmpdgchpg.xml"" COMMAND LINE*""C:\MinGW\bin\gccxml.exe" -DBOOST_NO_RVALUE_REFERENCES -D__mode__(x)= -DMS_WIN64 -I"." -I"D:\SimExternalInterfaces\src\C++" -I"D:\ rnalInterfaces\src\C++\SimInterfaces\SimExecInterfaces" -I"C:\Python26\include" -I"D:\SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces \SimExternalInterfaces\src\C++\SimInterfaces\SimExecInterfaces\temp.executive.hpp" -fxml="c:\users\josh\appdata\local\temp\tmpdgchpg.xml""* <type 'str'> LENGTH 433 LINE INFO GCCXML version - 0.9( 1.135 ) <snip /> As you can see, the command line is basically the same save the references to the different Python installation. Length is also the same. It appears that someting in subprocess changed in 2.7 that doesn't play nicely with how gccxml is being launched. _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig