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.
> Full Name: Darrin Sharp > Email Address: address@hidden > Organization: Oregon Climate Change Research Inst. > Package Version: netcdf.1.2 > Operating System: Linux CentOS 5 64b > Hardware: > Description of problem: > > I know this has come up before, but it's not clear which, if any, of > the fixes in the archive will work for me. I've tried a couple of them > to no avail. > > I've built hdf5 (with zlib) and am now trying to configure netCDF4.1.2. > > ./configure --with-hdf5=/usr/local --with-zlib=/usr/local --prefix=/usr/local > --enable-netcdf-4 > > But I get the following error: > > . > . > . > checking whether we should try to build netCDF-4... yes > checking for deflate in -lz... yes > checking for H5Fflush in -lhdf5... no > configure: error: Can't find or link to the hdf5 library. Configure with > --with-hdf5, or use --disable-netcdf-4, or see config.log for errors. > > I checked and libhdf5.a exists in /usr/local/lib: > > # ls -l /usr/local/lib/libhdf5.a > -rw-r--r-- 1 root root 5509138 Jun 9 11:31 /usr/local/lib/libhdf5.a > > Any suggestions? > > Thx, > Darrin Sharp > > Howdy Darrin! Firstly, I suggest you get the release candidate for the 4.1.3 release and try that: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.1.3-rc1.tar.gz Build it slightly differently than 4.1.2 - you must set CPPFLAGS and LDFLAGS instead of using --with-hdf5 and --with-zlib. Instructions are here: http://www.unidata.ucar.edu/software/netcdf/docs_snapshot/netcdf-install.html#Quick-Instructions Whenever something in the configure is not working, look for the part of the config.log that contains the output of those tests and see what the compiler is telling you about linking to HDF5. If it was statically linked and other libraries were linked in, you might have to add them to LIBS. Good luck, Ed Ticket Details =================== Ticket ID: WNF-359557 Department: Support netCDF Priority: Normal Status: Closed