Linking against BLAS/LAPACK and optimized BLAS - ATLAS (was Re: Migration tips for gfortran42)

NAKATA Maho chat95 at
Thu Jan 11 00:49:39 UTC 2007

Hi here is some tips again

* Linking blas/lapack or atlas
.if exists(${LOCALBASE}/lib/ && !defined(WITH_BLAS)
WITH_ATLAS=     yes
.if defined(WITH_ATLAS)
LIB_DEPENDS+=   atlas.2:${PORTSDIR}/math/atlas
BLAS=		-lf77blas -latlas
LAPACK=		-lalapack
LIB_DEPENDS+=   blas.2:${PORTSDIR}/math/blas
LIB_DEPENDS+=   lapack.4:${PORTSDIR}/math/lapack
BLAS_LIBS=      -lblas
LAPACK=		-lalapack

atlas build is very fragile and CPU/platform dependent. and
pointyhat doesn't build usually and I think atlas from packagecluster
can also be unusbale or low performance
for some cases (if you have 4 CPU and if package cluster have 2 CPU)  
using LAPACK/BLAS is good for package building for casual users.

-- NAKATA, Maho (maho at

More information about the freebsd-ports mailing list