[SciPy-user] numpy linking issue

Friedrich, Robin K Robin.K.Friedrich at usa-spaceops.com
Wed Nov 22 08:11:56 CST 2006


I'm trying to build Numpy from source on a Red Hat Enterprise Linux 3
system. But it doesn't seem to be linking the way I need it to. I have a
scratch built ATLAS installation (libatlas.a  libcblas.a  libf77blas.a 
liblapack.a etc.) in our CM location (not /usr/lib) that I want to link
with. Importing numpy throws an exception from lapack_lite for an
undefined symbol. Regardless of whatever problem the
/usr/lib/liblapack.so might have I chose via site.cfg to use the ATLAS
libraries.  The configtest.c seems to have picked it up and was OK with
it.  Why does the main numpy lapack_lite not use the same libs?
Is there some way of forcing these libs to be picked up in preference to
/usr/lib stuff?
Thanks!
-Robin



==============================
Python 2.5 (r25:51908, Oct 17 2006, 11:07:50)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-53)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/ips/fd/sw/csw/oss/lib/python2.5/site-packages/numpy/__init__.py", line
40, in <module>
    import linalg
  File
"/ips/fd/sw/csw/oss/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in <module>
    from linalg import *
  File
"/ips/fd/sw/csw/oss/lib/python2.5/site-packages/numpy/linalg/linalg.py",
line 25, in <module>
    from numpy.linalg import lapack_lite
ImportError: /usr/lib/libblas.so.3: undefined symbol: e_wsfe
>>>

===========================
ldd -r lapack_lite.so
        liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00965000)
        libblas.so.3 => /usr/lib/libblas.so.3 (0x005cf000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00575000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00111000)
        libm.so.6 => /lib/tls/libm.so.6 (0x0024a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00541000)
undefined symbol: e_wsfe        (/usr/lib/libblas.so.3)
undefined symbol: z_abs (/usr/lib/libblas.so.3)
undefined symbol: do_fio        (/usr/lib/libblas.so.3)
undefined symbol: s_stop        (/usr/lib/libblas.so.3)
undefined symbol: c_abs (/usr/lib/libblas.so.3)
undefined symbol: s_wsfe        (/usr/lib/libblas.so.3)
undefined symbol: e_wsfe        (/usr/lib/liblapack.so.3)
undefined symbol: z_abs (/usr/lib/liblapack.so.3)
undefined symbol: c_sqrt        (/usr/lib/liblapack.so.3)
undefined symbol: s_cmp (/usr/lib/liblapack.so.3)
undefined symbol: z_exp (/usr/lib/liblapack.so.3)
undefined symbol: c_exp (/usr/lib/liblapack.so.3)
undefined symbol: etime_        (/usr/lib/liblapack.so.3)
undefined symbol: do_fio        (/usr/lib/liblapack.so.3)
undefined symbol: z_sqrt        (/usr/lib/liblapack.so.3)
undefined symbol: s_cat (/usr/lib/liblapack.so.3)
undefined symbol: s_stop        (/usr/lib/liblapack.so.3)
undefined symbol: c_abs (/usr/lib/liblapack.so.3)
undefined symbol: s_wsfe        (/usr/lib/liblapack.so.3)
undefined symbol: s_copy        (/usr/lib/liblapack.so.3)
undefined symbol: PyExc_RuntimeError    (./lapack_lite.so)
undefined symbol: PyExc_ImportError     (./lapack_lite.so)
undefined symbol: PyCObject_Type        (./lapack_lite.so)
undefined symbol: PyDict_SetItemString  (./lapack_lite.so)
undefined symbol: Py_BuildValue (./lapack_lite.so)
undefined symbol: PyErr_SetString       (./lapack_lite.so)
undefined symbol: Py_InitModule4        (./lapack_lite.so)
undefined symbol: PyObject_GetAttrString        (./lapack_lite.so)
undefined symbol: PyImport_ImportModule (./lapack_lite.so)
undefined symbol: PyCObject_AsVoidPtr   (./lapack_lite.so)
undefined symbol: PyModule_GetDict      (./lapack_lite.so)
undefined symbol: PyErr_Format  (./lapack_lite.so)
undefined symbol: PyType_IsSubtype      (./lapack_lite.so)
undefined symbol: PyErr_Print   (./lapack_lite.so)
undefined symbol: PyArg_ParseTuple      (./lapack_lite.so)
undefined symbol: PyErr_NewException    (./lapack_lite.so)

=============================
gcc: _configtest.c
gcc -pthread _configtest.o -L/ips/fd/cm/cmg/rel/csw/oss/lib/ATLAS/
-llapack -lcblas -lf77blas -latlas -o _configtest
ATLAS version 3.6.0 built by bloom on Tue Aug  9 18:36:17 CDT 2005:
   UNAME    : Linux fdx-401 2.4.21-20.0.1.EL #1 Wed Nov 24 20:45:03 EST
2004 i686 i686 i386 GNU/Linux
   INSTFLG  :
   MMDEF    :
/ips/fd/cm/cmg/bld/csw/oss/atlas3_6/ATLAS/CONFIG/ARCHS/P4SSE2/gcc/gemm
   ARCHDEF  :
/ips/fd/cm/cmg/bld/csw/oss/atlas3_6/ATLAS/CONFIG/ARCHS/P4SSE2/gcc/misc
   F2CDEFS  : -DAdd__ -DStringSunStyle
   CACHEEDGE: 1048576
   F77      : /usr/bin/g77, version GNU Fortran (GCC 3.2.3 20030502 (Red
Hat Linux 3.2.3-42)) 3.2.3 20030502 (Red Hat Linux 3.2.3-42)
   F77FLAGS : -fomit-frame-pointer -O
   CC       : /usr/bin/gcc, version gcc (GCC) 3.2.3 20030502 (Red Hat
Linux 3.2.3-42)
   CC FLAGS : -fomit-frame-pointer -O3 -funroll-all-loops
   MCC      : /usr/bin/gcc, version gcc (GCC) 3.2.3 20030502 (Red Hat
Linux 3.2.3-42)
   MCCFLAGS : -fomit-frame-pointer -O
success!


==============================
ldd -r /usr/lib/libblas.so.3
        libm.so.6 => /lib/tls/libm.so.6 (0x00178000)
        libc.so.6 => /lib/tls/libc.so.6 (0x001b1000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00958000)
undefined symbol: e_wsfe        (/usr/lib/libblas.so.3)
undefined symbol: z_abs (/usr/lib/libblas.so.3)
undefined symbol: do_fio        (/usr/lib/libblas.so.3)
undefined symbol: s_stop        (/usr/lib/libblas.so.3)
undefined symbol: c_abs (/usr/lib/libblas.so.3)
undefined symbol: s_wsfe        (/usr/lib/libblas.so.3)




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20061122/234edfca/attachment-0001.html 


More information about the SciPy-user mailing list