[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

python2.4-dbg and C modules

hanke

1/23/2008 7:59:00 AM


Hello,

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/_openal.so: 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. Also, the same thing happens with python 2.5 (not the
-dbg variant).

Please, what is the problem and how to overcome it?

Thank you,
Hynek Hanke


1 Answer

Martin v. Loewis

1/23/2008 9:26:00 AM

0

> 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/_openal.so: 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.

HTH,
Martin