[SciPy-user] Scipy weave errors: undefined symbols when importing compiled extension

Craig Finch oanjao@yahoo....
Sun Jul 5 13:30:18 CDT 2009


By "build log" I assume you mean the output to stderr and stdout when when building Scipy.  It's a huge amount of output, and I'm not sure exactly what to look for.  Do you want me to post a particular section?  Below is the output from sections where g++ is called.  It seems to be linked with g++ everywhere.

One more potential problem area: I'm linking with the Intel Math Kernel Library (MKL) which was almost certainly built with Intel compilers.  Could that be causing this problem?

   Craig
  
-----------------------
building 'scipy.interpolate._interpolate' extension
compiling C++ sources
C compiler: g++ -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -fPIC

compile options: '-Iscipy/interpolate/src -I/home/cfinch/lib/python2.5/site-packages/numpy/core/include -I/home/cfinch/include/python2.5 -c'
g++: scipy/interpolate/src/_interpolate.cpp
g++ -pthread -shared build/temp.linux-x86_64-2.5/scipy/interpolate/src/_interpolate.o -Lbuild/temp.linux-x86_64-2.5 -o build/lib.linux-x86_64-2.5/scipy/interpolate/_interpolate.so
-----------------------
building 'scipy.sparse.sparsetools._csr' extension
compiling C++ sources
C compiler: g++ -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -fPIC

creating build/temp.linux-x86_64-2.5/scipy/sparse/sparsetools
compile options: '-I/home/cfinch/lib/python2.5/site-packages/numpy/core/include -I/home/cfinch/include/python2.5 -c'
g++: scipy/sparse/sparsetools/csr_wrap.cxx
g++ -pthread -shared build/temp.linux-x86_64-2.5/scipy/sparse/sparsetools/csr_wrap.o -Lbuild/temp.linux-x86_64-2.5 -o build/lib.linux-x86_64-2.5/scipy/sparse/sparsetools/_csr.so
building 'scipy.sparse.sparsetools._csc' extension
compiling C++ sources
C compiler: g++ -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -fPIC

compile options: '-I/home/cfinch/lib/python2.5/site-packages/numpy/core/include -I/home/cfinch/include/python2.5 -c'
g++: scipy/sparse/sparsetools/csc_wrap.cxx
g++ -pthread -shared build/temp.linux-x86_64-2.5/scipy/sparse/sparsetools/csc_wrap.o -Lbuild/temp.linux-x86_64-2.5 -o build/lib.linux-x86_64-2.5/scipy/sparse/sparsetools/_csc.so
building 'scipy.sparse.sparsetools._coo' extension
compiling C++ sources
C compiler: g++ -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -fPIC

compile options: '-I/home/cfinch/lib/python2.5/site-packages/numpy/core/include -I/home/cfinch/include/python2.5 -c'
g++: scipy/sparse/sparsetools/coo_wrap.cxx
g++ -pthread -shared build/temp.linux-x86_64-2.5/scipy/sparse/sparsetools/coo_wrap.o -Lbuild/temp.linux-x86_64-2.5 -o build/lib.linux-x86_64-2.5/scipy/sparse/sparsetools/_coo.so
building 'scipy.sparse.sparsetools._bsr' extension
compiling C++ sources
C compiler: g++ -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -fPIC

compile options: '-I/home/cfinch/lib/python2.5/site-packages/numpy/core/include -I/home/cfinch/include/python2.5 -c'
g++: scipy/sparse/sparsetools/bsr_wrap.cxx
g++ -pthread -shared build/temp.linux-x86_64-2.5/scipy/sparse/sparsetools/bsr_wrap.o -Lbuild/temp.linux-x86_64-2.5 -o build/lib.linux-x86_64-2.5/scipy/sparse/sparsetools/_bsr.so
building 'scipy.sparse.sparsetools._dia' extension
compiling C++ sources
C compiler: g++ -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -fPIC

compile options: '-I/home/cfinch/lib/python2.5/site-packages/numpy/core/include -I/home/cfinch/include/python2.5 -c'
g++: scipy/sparse/sparsetools/dia_wrap.cxx
g++ -pthread -shared build/temp.linux-x86_64-2.5/scipy/sparse/sparsetools/dia_wrap.o -Lbuild/temp.linux-x86_64-2.5 -o build/lib.linux-x86_64-2.5/scipy/sparse/sparsetools/_dia.so

-----------------------




----- Original Message ----
From: David Cournapeau <cournape@gmail.com>
To: Craig Finch <cfinch@ieee.org>; SciPy Users List <scipy-user@scipy.org>
Sent: Friday, July 3, 2009 10:21:28 PM
Subject: Re: [SciPy-user] Scipy weave errors: undefined symbols when importing  compiled extension

On Sat, Jul 4, 2009 at 3:38 AM, Craig Finch<oanjao@yahoo.com> wrote:

> ImportError: /home/cfinch/lib/python2.5/site-packages/scipy/sparse/sparsetools/_csr.so: undefined symbol: __gxx_personality_v0
>
> As far as I know, everything Python-related on this machine has now been built with GNU tools, but something is still broken.  One more thing--Python, Numpy, and Scipy are all locally installed in my /home/cfinch directory because the system Python is frozen at 2.4.

This is still a C++ problem, I have sometimes noticed this problem on
some machines. Normally this is caused by a C++ object file being
linked with gcc (instead of g++). Can you post the build log of scipy
?

David



      


More information about the SciPy-user mailing list