'undefined symbol: PyArray_DescrFromType' when loading numpy extension
Hi,
I'm trying to build aubio with pypy. the source builds fine, but when loading the module, i get an 'undefined symbol: PyArray_DescrFromType'. any idea what could be missing?
more info here: https://github.com/aubio/aubio/issues/17#issuecomment-213969499
thanks, Paul
Comments (7)
-
-
reporter Hi @mattip,
Thanks for the feedback. I tried with 5.0.1, adding pypy's
numpy/include
to the headers, but I get the same error. Missing symbols include:PyArray_DescrFromType
PyArray_MultiplyList
PyArray_FromAny
all of which can be found in
<numpy/__multiarray_api.h>
. -
What version of pypy/numpy are you using? In df821bc I reverted the broken part of 51920cf
-
reporter I use df821bc.
-
We will be releasing pyyp 5.1.1 to fix the missing header part of this issue. You still need to fix the ufunc problems in aubio, but this should allow you to move forward:
#! /bin/bash set -e set -x wget http://buildbot.pypy.org/nightly/release-5.x/pypy-c-jit-83928-60dff1f57b81-linux64.tar.bz2 tar xf pypy-c-jit-83928-60dff1f57b81-linux64.tar.bz2 virtualenv -p pypy-c-jit-83928-60dff1f57b81-linux64/bin/pypy aubioforpypy source aubioforpypy/bin/activate pypy -m pip install --upgrade setuptools git clone https://bitbucket.org/pypy/numpy.git pushd numpy pypy setup.py install popd pypy -c "import numpy" && echo "numpy successfully installed" git clone --branch=develop https://github.com/aubio/aubio.git pushd aubio make getwaf pypy waf configure build pushd python echo still need to fix missing ufunc problems pypy setup.py install # complains about missing ufunc definitions popd export LD_LIBRARY_PATH=$PWD/aubio/build/src pypy -c "import aubio" && echo "aubio successfully installed"
-
reporter great, thank you! after applying this patch, i could build and load aubio from pypy.
is there anything I should do to fix aubio's ufuncs, or should I wait for a future pypy/numpy version?
best, Paul
-
it is acutally missing support in pypy/module/cpyext/ndarrayobject.py, we seem to be missing a typedef We are working on an alternative implementation of all this stuff, so maybe by pypy 6 it will all Just Work(tm)
- Log in to comment
I assume you are using pypy 5.1? There seems to be a regression, it has to do with a restructuring of the included headers. You may want to use 5.0.1 until we can fix it.
The issue can be tracked on https://bitbucket.org/pypy/pypy/issues/2282