Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

[netcdfgroup] Build notes: NetCDF-4 on Mac OS X

Hello all,

I've managed to build the latest snapshot of netcdf-4 (2008022102) on Mac OS X 10.4 (PPC) with gcc4.0.1 and IBM XL Fortran 8.1. There were a few tricks required to get this to work, so here are my build notes:

1. Download and install HDF5 1.8.0 (it is only necessary to compile and install the C libraries)
2. Download latest snapshot version of netcdf-4
3. set the following environment variables:

F77=xlf
FC=xlf90
CPPFLAGS=-DIBMR2Fortran

4. ./configure --enable-netcdf-4 --with-hdf5=/usr/local (or wherever you have it installed)

5. For some reason the libtool created in the previous step by configure does not contain a tag for compiling f90 programs (tag=FC). Thus the build will crash out on the very first step. This took me a long time to figure out. Once I did, I was able to copy the tag section for FC from the netcdf-4-beta1 release of netcdf which creates the FC tag in libtool correctly.

5. make; make check; make install

Building shared libraries does not work on my hardware/software setup. While creating the netcdff (separate fortran library) the linker complains about missing symbols, mainly from the netcdf C library (nc_*). Could this be a build order problem, or possibly a case of missing dependencies? Unfortunately I am not familiar enough with automake to track this one down.

Cheers, Jed



 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690