This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
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 through 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. Instead you need to use CPPFLAGS and LDFLAGS environment variables to specify where the HDF5 library is installed, as explained here: http://www.unidata.ucar.edu/netcdf/docs/getting_and_building_netcdf.html#building 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 --Russ > 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