[SciPy-user] BLAS and srotgm

Robert Kern robert.kern at gmail.com
Fri Sep 14 12:00:27 EDT 2007


Donna Calhoun wrote:
> 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
> $long_dir/build/src.linux-i686-2.5/Lib/lib/blas/fblasmodule.o
> $long_dir/fortranobject.o
> $long_dir/Lib/lib/blas/fblaswrap.o
> $long_dir/build/src.linux-i686-2.5/Lib/lib/blas/fblas-f2pywrappers.o
> -L/usr/local/lapack-3.1.1 -L/usr/local/Python-2.5-with_tk/lib
> -L/usr/local/Python-2.5-with_tk/lib/python2.5/lib-dynload
> -Lbuild/temp.linux-i686-2.5 -lblas -lblas -lpython2.5 -lz -lg2c -o
> build/lib.linux-i686-2.5/scipy/lib/blas/fblas.so
> 
> I have several 'libblas' on my system (and most of them are old)
> 
> /usr/lib/libblas.a
> /usr/lib/libblas.so
> /usr/lib/libblas.so.3
> /usr/lib/libblas.so.3.0
> /usr/lib/libblas.so.3.0.3
> /usr/local/lapack-3.1.1/libblas.a
> /usr/local/lapack-3.1.1/libblas.so
> 
> 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. 

I'm curious as to why you had -L/usr/lib in there. Did it come from Python's
build or do you have an LDFLAGS environment variable sitting around that's
interfering?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco



More information about the SciPy-User mailing list