Re: Undefined symbol _Py_ZeroStruct

Robert Bradshaw <[email protected]> Thu, 1 Oct 2009 00:11:03 -0700
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
On Sep 30, 2009, at 11:59 PM, Franck Pommereau wrote:

>> Exception ImportError: '/usr/lib/python2.6/lib-dynload/pyexpat.so:
>> undefined symbol: _Py_ZeroStruct' in '_hello.JNI_OnLoad' ignored
>
> I just tested with Python 2.5 instead of 2.6, I get
>
> Exception exceptions.ImportError:
> '/usr/lib/python2.5/lib-dynload/math.so: undefined symbol:
> PyExc_ValueError' in '_sr.JNI_OnLoad' ignored
>
> instead of the previous error. I suspect that this missing symbol is
> just the first one in a very long list, and probably most of the  =

> Python
> runtime is somehow unreachable.

You are probably right...it looks like a linking problem rather than  =

directly a Pyrex issue. One thing I might look at is the (long) lost  =

of command line options used by gcc when useing distutils, and making  =

sure none of them are missing when you try to compile for use from Java.

- Robert