[SciPy-User] Undefined symbol: clapack_sgesv when doing import in Python
Agile Aspect
agile.aspect at gmail.com
Fri Mar 12 11:28:32 EST 2010
On Thu, Mar 11, 2010 at 10:10 AM, Diederik van Liere
<dvanliere at gmail.com> wrote:
>>> ImportError:
>>> /usr/local/lib/python2.6/site-packages/scipy/linalg/clapack.so:
>>> undefined symbol: clapack_sgesv
>
>
>> You should use nm to check for the symbol in your ATLAS libraries to
>> see if it's really missing or if numpy just can't find it.
>
>> Try
>
>> nm -A /usr/local/atlas/lib/lib*.so | grep clapack_sgesv
>
>> or just
>
>> nm liblapack.so | grep clapack_sgesv
>
> This is my output:
> liblapack.a:clapack_sgesv.o:00000000 r .LC0
> liblapack.a:clapack_sgesv.o:00000000 r .LC1
> liblapack.a:clapack_sgesv.o:0000002c r .LC2
> liblapack.a:clapack_sgesv.o:0000005c r .LC3
> liblapack.a:clapack_sgesv.o:00000090 r .LC4
> liblapack.a:clapack_sgesv.o:000000b8 r .LC5
> liblapack.a:clapack_sgesv.o: U ATL_sgetrf
> liblapack.a:clapack_sgesv.o: U ATL_sgetrs
> liblapack.a:clapack_sgesv.o: U _GLOBAL_OFFSET_TABLE_
> liblapack.a:clapack_sgesv.o:00000000 T __i686.get_pc_thunk.bx
> liblapack.a:clapack_sgesv.o: U cblas_xerbla
> liblapack.a:clapack_sgesv.o:00000000 T clapack_sgesv
> I don't have .so files, I have .a files, could that be an issue? So it looks
> that ATLAS is properly compiled, right?
I presume it has to be shared (it's never worked for me otherwise.)
It looks like it might not have been compiled with
-fPIC
which is necessary to build shared libraries.
If you built the libraries from source, you should be able to
make shared
make ptshared
which would included the -fPIC compile option and create the shared
libraries for you.
>> If the symbol is defined in your ATLAS libraries, then you should post
>> your site.cfg from numpy.
>
> My site.cfg from numpy reads:
> [DEFAULT]
> library_dirs = /usr/local/atlas/lib/
> include_dirs = /usr/local/atlas/include/
> [blas_opt]
> libraries = lapack, f77blas, cblas, atlas
> [lapack_opt]
> libraries = lapack, f77blas, cblas, atlas
>
Looks good.
--
Enjoy global warming while it lasts.
More information about the SciPy-User
mailing list