Kyng Chaos
“The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects.”
- the wisdom of Tarzan

NetCDF Build

version: 4.x
source: http://www.unidata.ucar.edu/downloads/netcdf/

parallel: OK

Netcdf builds as a static library only by default. The configure options below are for a v3-style build needed by GDAL, without fancy extras (HDF, DAP, libcf).

Snow Leopard

In the netcdf source:

configure

export MACOSX_DEPLOYMENT_TARGET=10.6
./configure --disable-dependency-tracking --enable-c-only --disable-dap --without-libcf --enable-utilities \
CFLAGS="-Os -arch i386 -arch x86_64 -D_FILE_OFFSET_BITS=64"

edit config.h

After configuration, edit config.h and add at the end:

#undef SIZEOF_LONG
#ifdef __LP64__
#define SIZEOF_LONG 8
#else
#define SIZEOF_LONG 4
#endif
#undef SIZEOF_SIZE_T
#ifdef __LP64__
#define SIZEOF_SIZE_T 8
#else
#define SIZEOF_SIZE_T 4
#endif

make & install

make
sudo make install

Leopard

In the netcdf source:

configure

export MACOSX_DEPLOYMENT_TARGET=10.5
./configure --disable-dependency-tracking --enable-c-only --disable-dap --without-libcf --enable-utilities \
CFLAGS="-Os -arch ppc -arch i386 -arch ppc64 -arch x86_64 -D_FILE_OFFSET_BITS=64"

edit config.h

After configuration, edit config.h and add at the end:

#undef SIZEOF_LONG
#ifdef __LP64__
#define SIZEOF_LONG 8
#else
#define SIZEOF_LONG 4
#endif
#undef SIZEOF_SIZE_T
#ifdef __LP64__
#define SIZEOF_SIZE_T 8
#else
#define SIZEOF_SIZE_T 4
#endif

make & install

make
sudo make install

Tiger

In the netcdf source:

configure

export MACOSX_DEPLOYMENT_TARGET=10.4
./configure --disable-dependency-tracking --enable-c-only --disable-dap --without-libcf \\
CFLAGS="-Os -arch ppc -arch i386 -D_FILE_OFFSET_BITS=64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
make
sudo make install
macosx/build/netcdf.txt · Last modified: 2010/07/28 09:39 by kyngchaos
Copyright © 2004-2010 William Kyngesburye Driven by DokuWiki Recent changes RSS feed