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: 3.6.3
source: http://www.unidata.ucar.edu/downloads/netcdf/

Make sure to get at least version 3.6.2, as it has a much simpler configuration. Untested with v4.

Netcdf builds as a static library only.

Leopard

In the netcdf source:

configure

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

Unless you need the C++ library, use the c-only option above (GDAL is C++, but uses the C library). The FILE_OFFSET_BITS option is from habit, and may not be needed now.

config.h

After configuration, edit config.h and replace lines:

– the SIZEOF_LONG line with:

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

– the SIZEOF_SIZE_T line with:

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

– the WORDS_BIGENDIAN line with:

#ifdef __BIG_ENDIAN__
  #define WORDS_BIGENDIAN 1
#else
  #undef WORDS_BIGENDIAN
#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 \\
CFLAGS="-Os -arch ppc -arch i386 -D_FILE_OFFSET_BITS=64"

config.h

Edit config.h and replace lines:

– the WORDS_BIGENDIAN line with:

#ifdef __BIG_ENDIAN__
  #define WORDS_BIGENDIAN 1
#else
  #undef WORDS_BIGENDIAN
#endif

make & install

make
sudo make install

Panther

In the netcdf source:

./configure --disable-dependency-tracking --enable-c-only \\
CFLAGS="-Os -D_FILE_OFFSET_BITS=64"
make
sudo make install
macosx/build/netcdf.txt (1020 views) · Last modified: 2009/02/26 07:21 by kyngchaos
Copyright © 2004-2009 William Kyngesburye Driven by DokuWiki Recent changes RSS feed