Compiling numpy with lapack and atlas

Robert Kern robert.kern at
Sun Nov 12 01:34:53 CST 2006

Abhishek Roy wrote:
> Hello,
>       I am trying to compile Numpy with lapack & atlas. In site.cfg I put,
> [atlas]
> library_dirs = /usr/local/lib/atlas/
> atlas_libs = cblas, lapack, f77blas, atlas
> and installation seems to go well. It says,
>   FOUND:
>     libraries = ['cblas', 'lapack', 'f77blas', 'atlas']
>     library_dirs = ['/usr/local/lib/atlas/']
>     language = c
>     include_dirs = ['/usr/local/lib/atlas']
> and the lines with gcc <something> -lcblas -llapack don't give an error. But
> afterwards running,
> $ ldd ~/numpy-1.0/build/lib.linux-i686-2.4/numpy/linalg/
> =>  (0xffffe000)
> => /lib/ (0x40238000)
> => /lib/ (0x4028b000)
> /lib/ (0x80000000)
> which I think means libcblas and libatlas are not linked. Can someone tell me
> what's going wrong here?

Are your ATLAS libraries shared or static (i.e., are they or
libatlas.a)? ldd(1) only lists the shared libraries that are linked. ATLAS is
usually installed as static libraries.

Does that module import? If so, then you have no problems. If not, then copy the
message here. It should tell you one of the symbols that are missing.

Note that libraries should be listed in the order in which they depend on each
other. lapack depends on f77blas and cblas which both depend on atlas.


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

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo

More information about the Numpy-discussion mailing list