Friday, March 4, 2005

Compiling NetCDF on Mac OS X

Based on this script, I compiled NetCDF 3.6.0 on my Mac, using xlf.

export CC=/usr/bin/cc
export CPPFLAGS="-O -DNDEBUG -DIBMR2Fortran"
export CFLAGS="-O"
export CXX=/usr/bin/c++
export CXXFLAGS="-O"


export FC=xlf
export F77=xlf
export F90=xlf90
export FFLAGS="-O5 -qtune=auto -qarch=auto -qhot -qinitauto -qsave"
export F90FLAGS=-qsuffix=f=f90:cpp=F90

./configure - -prefix=/usr/local

make
make test
make install


This configuration also compiled udunits.

I also, finally, got nco to work using

./configure - -disable-regex - -disable-shared

It was also recommended to use the latest version of bison, but it seems that the version that ships with the latest Apple developer tools was fine.

No comments:

Post a Comment