[Numpy-discussion] Can Numpy use static libraries from LAPACK?

James Jong ribonucleico at gmail.com
Sun Apr 21 13:35:12 EDT 2013


Note: I started a thread in StackOverflow a few days ago with this
question, but I have not received any response yet (the link is:
http://stackoverflow.com/questions/16093910/numpy-and-scipy-static-vs-dynamic-loading
)

The question is the following:

Say that I build ATLAS with LAPACK as follows:

wget http://sourceforge.net/projects/math-atlas/files/Stable/3.10.1/atlas3.10.1.tar.bz2/download
wget http://www.netlib.org/lapack/lapack-3.4.2.tgz
tar -jxvf atlas3.10.1.tar.bz2
mkdir BUILD
cd BUILD
../ATLAS/configure -b 64 -Fa alg -fPIC \
    --with-netlib-lapack-tarfile=../lapack-3.4.2.tgz \
    --prefix=<ATLAS_INSTALL_PATH>
make
cd lib
make shared
make ptshared
cd ..
make install

Note that I did *not *pass the flag  --shared in .my call to configure.

I end up with the following files under BUILD/lib:

Make.inc@
Makefile

the following  .a files:

libatlas.a
libcblas.a
libf77blas.a
libptf77blas.a
libtstatlas.a
liblapack.a
libf77refblas.a
libptlapack.a
libptcblas.a

and the following .so files:

libsatlas.so*
libtatlas.so*

Finally, if I define:

BLAS=/path_to_BUILD/lib/libcblas.a
LAPACK=/path_to_BUILD/lib/liblapack.a
ATLAS=/path_to_BUILD/lib/libatlas.a

and add /path_to_BUILD/lib to LD_LIBRARY_PATH and to the library_dirs variable
within thesite.cfg file in NumPy.

Would NumPy and SciPy use my libraries? (even though they all seem to be
static?).

Thanks,

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130421/8eb16cdf/attachment.html>


More information about the NumPy-Discussion mailing list