python2.4-dbg and C modules

"Martin v. Löwis" martin at
Wed Jan 23 10:25:30 CET 2008

> please, when I try to run my code under python2.4-dbg
> from Ubuntu, the interpreter complains that the Py_InitModule4
> symbol is undefined in a C module I'm using (PyOpenAL):
> ImportError: /var/lib/python-support/python2.4/ undefined
> symbol: Py_InitModule4
> Google reveals that this problem is not specific just to PyOpenAL,
> but I couldn't find out what is the essence of the problem and how
> python-2.4dbg is different from python2.4 except for including
> debugging symbols, because in plain python2.4 the module works
> fine.

The dbg version does not define Py_InitModule4, but
Py_InitModule4TraceRefs. This is a safety-measure to prevent modules
compiled for the nodebug version of Python to load into the debug
version. There are major changes to the internal interpreter data
structures in the debug version, so you have to recompile your module
with the debug headers.


More information about the Python-list mailing list