[SciPy-user] BLAS and srotgm

Donna Calhoun calhoun@amath.washington....
Fri Sep 14 05:55:14 CDT 2007

Robert Kern <robert.kern <at> gmail.com> writes:

>> .............(lots cut out here)..........................

> >> line 14, in <module>
> >>      from scipy.linalg import fblas
> >> ImportError: 
> >> /usr/local/Python-2.5-with_tk/lib/python2.5/site-packages/scipy/linalg/
> > fblas.so: 
> >> undefined symbol: srotmg_
> >> ----------------------------------------------------------------------------

> Can you give us the contents of your site.cfg, the locations of all of the
> libblas's on your system, the output from your build, and the g77 command that
> worked? That might help us to explain the problem at least, if not fix it.

Yes, here is the short answer to your question.  Here is the offending g77
command : 

# Original command :

long_dir  = build/temp.linux-i686-2.5/build/src.linux-i686-2.5

g77 -shared -L/usr/lib -lutil -lc -lpthread -L/usr/local/tk/lib -ltk8.4
-L/usr/local/tcl/lib -ltcl8.4
-L/usr/local/lapack-3.1.1 -L/usr/local/Python-2.5-with_tk/lib
-Lbuild/temp.linux-i686-2.5 -lblas -lblas -lpython2.5 -lz -lg2c -o

I have several 'libblas' on my system (and most of them are old)


and the scipy build found the first one.  This is first in the g77 command, and
so g77 quit looking for any other libraries.  That library didn't have 
'srotmg' in it.    (As to WHY I had libc, etc in my link path, that will have
to wait for a longer post!)  

I removed the library flags to libc, and libutil and the build picked up the
correct blas library. 

My site.cfg file was (I believe, although I don't have exactly the one I used) 

    library_dirs = /usr/local/Python-2.5/lib
    libraries = python2.5

    include_dirs = /usr/local/fftw-3.1.2/include
    library_dirs = /usr/local/fftw-3.1.2/lib
    libraries = fftw3

    library_dirs = /usr/local/lapack-3.1.1
    libraries = blas

    library_dirs = /usr/local/lapack-3.1.1
    libraries = lapack

scipy found the libraries : 

          libraries = ['lapack', 'lapack']
          library_dirs = ['/usr/local/lapack-3.1.1']
          language = f77

           libraries = ['blas', 'blas']
           library_dirs = ['/usr/local/lapack-3.1.1']
           language = f77

but they just ended up in the wrong place in the g77 command. 

Thanks again for your help, 


More information about the SciPy-user mailing list