#24 Runtime Error on kfreebsd-* architectures

Aron Xu

pygccxml doesn't work at all on kfreebsd-*:

$ python /usr/share/doc/python-pygccxml/examples/example.py
/usr/lib/pymodules/python2.6/pygccxml/parser/declarations_cache.py:8: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
Traceback (most recent call last):
File "/usr/share/doc/python-pygccxml/examples/example.py", line 24, in <module>
decls = parser.parse( ['example.hpp'], config )
File "/usr/lib/pymodules/python2.6/pygccxml/parser/__init__.py", line 50, in parse
answer = parser.read_files(files, compilation_mode)
File "/usr/lib/pymodules/python2.6/pygccxml/parser/project_reader.py", line 225, in read_files
return self.__parse_file_by_file(files)
File "/usr/lib/pymodules/python2.6/pygccxml/parser/project_reader.py", line 246, in __parse_file_by_file
, self.__decl_factory )
File "/usr/lib/pymodules/python2.6/pygccxml/parser/source_reader.py", line 87, in __init__
File "/usr/lib/pymodules/python2.6/pygccxml/parser/config.py", line 176, in raise_on_wrong_settings
raise RuntimeError( 'unable to find out location of gccxml' )
RuntimeError: unable to find out location of gccxml

The culprit is this line:

pygccxml/parser/config.py:172: elif sys.platform == 'linux2' or sys.platform == 'darwin':

It's better to check if os.name == 'posix'; value of sys.platform varies across
different unixes.

-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i686)

Kernel: kFreeBSD 7.3-1-686
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-pygccxml depends on:
ii gccxml 0.9.0+cvs20100501-2 XML output extension to GCC
ii python 2.6.5-5 An interactive high-level object-o
ii python-support 1.0.9 automated rebuilding support for P

This is originally Debian BTS #588844 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588844)


  • Aron Xu

    Aron Xu - 2010-11-13

    Patch to check os.name == 'posix' to get pygccxml work on other posix compatible systems

  • Roman

    Roman - 2011-02-26
    • assigned_to: nobody --> roman_yakovenko
    • status: open --> closed-fixed

Log in to post a comment.