[SciPy-user] undefined symbol: slamch_

David Cournapeau david@ar.media.kyoto-u.ac...
Thu Jun 11 07:28:58 CDT 2009


romain.jacquet.dev@free.fr wrote:
> Hello,
>
>    I'm working on Ubuntu.
>    I'm trying to install scipy on a python installation compiled from source:
>    - python-2.5.4
>    - lapack-3.2.1
>    - atlas3.8.3
>    - numpy-1.2.0
>    - scipy-0.7.1rc2
>
>    Everything is compiled and installed correctly. But it doesn't work:
>
> python  -c "from scipy.interpolate import interpolate"
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File
> "/tmp/test2/Python-2.5.4/install_dir/lib/python2.5/site-packages/scipy/interpolate/__init__.py",
> line 13, in <module>
>     from rbf import Rbf
>   File
> "/tmp/test2/Python-2.5.4/install_dir/lib/python2.5/site-packages/scipy/interpolate/rbf.py",
> line 47, in <module>
>     from scipy import linalg
>   File
> "/tmp/test2/Python-2.5.4/install_dir/lib/python2.5/site-packages/scipy/linalg/__init__.py",
> line 8, in <module>
>     from basic import *
>   File
> "/tmp/test2/Python-2.5.4/install_dir/lib/python2.5/site-packages/scipy/linalg/basic.py",
> line 17, in <module>
>     from lapack import get_lapack_funcs
>   File
> "/tmp/test2/Python-2.5.4/install_dir/lib/python2.5/site-packages/scipy/linalg/lapack.py",
> line 17, in <module>
>     from scipy.linalg import flapack
> ImportError:
> /tmp/test2/Python-2.5.4/install_dir/lib/python2.5/site-packages/scipy/linalg/flapack.so:
> undefined symbol: slamch_
>
> Ths slamch symbols is located in the lapack library:
> strings /tmp/test2/lapack-3.2.1/lapack_LINUX.a |grep slamch_ | wc -l
> 269
>
> But the ATLAS dynamic library doesn't have slamch_
> strings /tmp/test2/ATLAS/install_dir/lib/liblapack.so |grep slamch_ | wc -l
> 0
>
> The LD_LIBRARY_PATH is fine:
>
> ldd
> /tmp/test2/Python-2.5.4/install_dir/lib/python2.5/site-packages/scipy/linalg/flapack.so
>         linux-gate.so.1 =>  (0xb7f9f000)
>         liblapack.so => /tmp/test2/ATLAS/install_dir/lib/liblapack.so
> (0xb7f1c000)
>         libptf77blas.so => /tmp/test2/ATLAS/install_dir/lib/libptf77blas.so
> (0xb7f00000)
>         libptcblas.so => /tmp/test2/ATLAS/install_dir/lib/libptcblas.so
> (0xb7ee1000)
>         libatlas.so => /tmp/test2/ATLAS/install_dir/lib/libatlas.so (0xb7aa8000)
>         libpython2.5.so.1.0 =>
> /tmp/test2/Python-2.5.4/install_dir/lib/libpython2.5.so.1.0 (0xb796f000)
>         libgfortran.so.2 => /usr/lib/libgfortran.so.2 (0xb78be000)
>         libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7898000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb788d000)
>         libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb773e000)
>         libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7726000)
>         libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7722000)
>         libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0xb771d000)
>         /lib/ld-linux.so.2 (0xb7fa0000)
>
> So what is the problem? Where the slamch_ must be find?
>   

It is (optionally) built in lapack - most likely, you did not build
lapack correctly. I would advise against using LAPACK 3.2 (3.1.1 is
fine), I noticed several problems with it in the past.

cheers,

David


More information about the SciPy-user mailing list