[Numpy-discussion] Da Blas

David H. Marimont marimont at nxpdata.com
Tue Jan 2 09:06:06 CST 2001


I have a problem that seems related to the one below.  I'm trying to build and
install Numeric 17.2.0 using the lapack and blas libraries under Python 2.0 on
Red Hat 6.2 with the  The build and install go fine, but when I run python and
import LinearAlgebra, I get the following
message:

Python 2.0 (#1, Nov 13 2000, 14:15:52) 
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from Numeric import *
>>> from LinearAlgebra import *
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.0/site-packages/Numeric/LinearAlgebra.py", line 8, in ?
    import lapack_lite
ImportError: /usr/local/lib/python2.0/site-packages/Numeric/lapack_lite.so: undefined symbol: dgesvd_
>>> 

I did try relinking with g77, as Scott's earlier message suggested:

[root at harmony LALITE]# g77 -shared build/temp.linux-i686-2.0/Src/lapack_litemodule.o -L/usr/lib/lapack -o build/lib.linux-i686-2.0/lapack_lite.so 
ld: cannot open crtbeginS.o: No such file or directory
[root at harmony LALITE]# 

But I don't know much about g77 (or gcc, for that matter), so I didn't know
how to diagnose the error.  I'm also not sure I'd know what to do next if the
link step had worked!

I'd sure appreciate some help with this...  Thanks!

   David


"Scott M. Ransom" wrote:
> 
> Frank Horowitz wrote:
> >
> > However, when I
> > coerced the distutils system to get around that bug (by specifying
> > "/usr/lib " with a trailing blank for the BLASLIBDIR and LAPACKLIBDIR
> > variables in setup.py) the same problem (i.e. an "ImportError:
> > /usr/lib/liblapack.so.3: undefined symbol: e_wsfe" in importing
> > lapack_lite) ultimately manifested itself.
> 
> This problem is easily fixed (at least on linux) by performing the link
> of lapack_lite.so with g77 instead of gcc (this is required because the
> lapack and/or blas libraries are based on fortran object files...).
> 
> For instance the out-of-box link command on my machine (Debian 2.2) is:
> 
> gcc -shared build/temp.linux2/Src/lapack_litemodule.o -L/usr/local/lib
> -L/usr/lib -llapack -lblas -o build/lib.linux2/lapack_lite.so
> 
> Simply change the 'gcc' to 'g77' and everything works nicely.
> 
> Not sure if this is specific to Linux or not...
> 
> Scott
> 
> --
> Scott M. Ransom                   Address:  Harvard-Smithsonian CfA
> Phone:  (617) 495-4142                      60 Garden St.  MS 10
> email:  ransom at cfa.harvard.edu              Cambridge, MA  02138
> GPG Fingerprint: 06A9 9553 78BE 16DB 407B  FFCA 9BFA B6FF FFD3 2989
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/numpy-discussion




More information about the Numpy-discussion mailing list