[Pyxpcomext] ImportError with _Py_ZeroStruct in C extension

Elias Showk elias.showk at iscpif.fr
Tue Feb 9 03:50:16 PST 2010

Great ! Everything's working fine. Thanks Todd.

About using shared librairies, such as BerkeleyDB 4, as you may know, 
it's very easy to set up :

1- in a bootstrapper script (one for each platform) :

export LD_LIBRARY_PATH=`pwd`/platform/Linux_x86_64-gcc3/lib:$LD_LIBRARY_PATH

1- copy the compiled library directory into 
platform/Linux_x86_64-gcc3/lib, and any python module looking some 
shared lib will first take a look at LD_LIBRARY_PATH.

Feel free to clone our Xulrunner+PyXPCOM software for (large) text 
corpora analysis during the next year at 
http://github.com/jbilcke/tinasoft.desktop. Soon, we'll release a beta 
version including text-mining and graph vizualization features, so that 
anyone could test, ask and feedback. We will be happy to help developers 
of xulrunner+python based apps with our own experience.

Again, thank you Todd for your work on pyxpcomext. We'll feed you back 
soon as we'll upgrade to xulrunner 1.9.2 and pyxpcomext 2.6.4

Best regards.

On 09/02/2010 02:36, Todd Whiteman wrote:
> Try building numpy with the actual Python in the PyhtonExt extension, 
> i.e. use the following numpy build/install steps:
>   export 
> PYTHONHOME=/home/phyrephox/.mozilla/firefox/3tn4oxjv.reform/extensions/pythonext at mozdev.org/python 
>   cd numpy-src
>   chmod 700 $PYTHONHOME/bin/python2.6
>   $PYTHONHOME/bin/python2.6 setup.py build
>   $PYTHONHOME/bin/python2.6 setup.py install
> Which will install numpy into the site-packages dir:
>   $PYTHONHOME/lib/python2.6/site-packages
> Does that one work any differently?
> Cheers,
> Todd
> On 10-02-08 04:26 PM, William Cauchois wrote:
>> Its interesting that you're having the same issue as me, with a
>> completely different module.
>> I just tried running my software on another system, and it worked 
>> perfectly.
>> On Mon, Feb 8, 2010 at 2:45 AM, Elias Showk <elias.showk at iscpif.fr
>> <mailto:elias.showk at iscpif.fr>> wrote:
>>     Hi Todd and Bill,
>>     I experience the same problems, since my previous thread
>> (http://www.mozdev.org/pipermail/pyxpcomext/2010-January/000136.html).
>>     Following Todd's advice to import python packages with extensions
>>     (numpy, bssdb3) into the xulrunner+python app  (by the way,
>>     http://github.com/jbilcke/tinasoft.desktop), I used a UCS2 Python
>>     2.6.4 (in fact an ActivePython-
>>     Although it resolved the original issues (undefined _Py_ZeroStruct
>>     from import bsddb3 and undefined Py_Unicode from import numpy), I
>>     still have another import error from numpy :
>>     "platform/Linux_x86_64-gcc3/pylib/numpy/core/multiarray.so:
>>     undefined symbol: _Py_ZeroStruct"
>>     Finally, I found no 32-bit builts into the entire source code
>>     directory (nothing returned by $ find . | xargs file | grep ".*: .*
>>     32-bit").
>>     If anyone has an idea, or an advice, it could help a lot.
>>     If I found something, I'll post it.

More information about the Pyxpcomext mailing list