[Numpy-discussion] numarray, BLAS, LAPACK and MacOS X

Luc Bourhis Luc_J_Bourhis at mac.com
Wed Feb 25 12:50:06 CST 2004

MacOS X (at least 10.2 and 10.3) comes with BLAS and LAPACK already 
installed. However the hooks in addons.py (i.e. setting the environment 
variable USE_LAPACK and then filling the lists lapack_libs and 
lapack_dirs) don't work because it will typically pass the arguments 
-llapack,  -lblas to the linker although Apple does not supply any 
liblapack.a or libblas.a. Instead Apple uses the standard MacOS X 
distribution scheme: a framework (vecLib is the name). So the correct 
way to compile numarray with the native blas and lapack on MacOS X is 
to fix the addons.py as follow:

               include_dirs = ["Packages/LinearAlgebra2/Src", 
               extra_objects = ["-bundle", "-framework", "vecLib",]),

I checked it worked (but the -bundle may not be necessary)

HtH somebody,
Luc Bourhis
Chemical Crystallography Laboratory
University of Durham

More information about the Numpy-discussion mailing list