[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #PLB-249628]: SOS: Error concerning the netcdf configuration with hdf5

Hi Hera,

> I'm trying to attach a hdf5 library (hdf5-1.8.13) to netcdf-4.3.2 for
> the CDO installation.
> Heras-MacBook-Pro-2:netcdf-4.3.2 heragudlaugsdottir$ ./configure
> --with-zlib=/Users/heragudlaugsdottir/Documents/CDO/zlib-1.2.8
> --with-hdf5=/Users/heragudlaugsdottir/Documents
> I have ./configured the hdf5 with zlib, szip & jpeg along with 'make',
> 'make check', 'make install' and it works fine. But when I then configure
> the netcdf-4.3.2 with the hdf5 I get this error:
> configure: error: Can't find or link to the hdf5 library. Use
> --disable-netcdf-4, or see config.log for errors.
> I have tried the hdf5-1.8.8 version but that did not work either. Do I need
> hdf4 so that netcdf-4 recognises it ?

No, HDF4 is optional, and is only useful if you need to access HDF4 SD data 
a netCDF interface.

The problem is probably use of the "--with-hdf5" option to the configure
script for netcdf-4.3.2.  That option is not supported for netCDF builds.  
you need to use CPPFLAGS and LDFLAGS environment variables to specify where
the HDF5 library is installed, as explained here:


For example, you could build like this:

  $ H5DIR=/Users/heragudlaugsdottir/Documents
  $ ZDIR=/Users/heragudlaugsdottir/Documents/CDO/zlib-1.2.8
  $ NCDIR=/Users/heragudlaugsdottir/netcdf
  $ CPPFLAGS="-I${H5DIR}/include -I${ZDIR}/include" LDFLAGS="-L${H5DIR}/lib 
-L${ZDIR}/lib" ../configure --prefix=${NCDIR}
  $ make check
  $ make install

> There is no one around me to assist me so I would be very thankful for your
> help, it's been troubling me for days.
> all the best,
> Hera Gudlaugsdottir
> Iceland
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: PLB-249628
Department: Support netCDF
Priority: Normal
Status: Closed