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.
Hello Lina, It appears that, when specifying your CPPFLAGS, you are using a single quote. This prevents the environmental variables (H5DIR, ZDIR, etc) from being expanded. Try replacing the single quotes with double quotes and let us know if this changes the result. e.g., $ CPPFLAGS="-I${H5DIR}/include -I${ZDIR}/include" LDFLAGS="-L${H5DIR}/lib -L${ZDIR}/lib" ./configure --prefix=${NCDIR} I hope this helps, have a great day, -Ward > checking for library containing H5Fflush... no > configure: error: Can't find or link to the hdf5 library. Use > --disable-netcdf-4, or see config.log for errors. > > For compilation, I followed exactly (hopefully) the line given in > https://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html#build_default, > Building with netCDF-4 and the Remote Data Client. I used > zlib-1.2.11.tar.gz, hdf5-1.8.20.tar.gz and netcdf-c-4.6.0.tar.gz. > > I compiled zlib without any problems with: > $ # Build and install zlib > $ ZDIR=/home/me/netcdf > $ ./configure --prefix=${ZDIR} > $ make check > $ make install > > When compiling hdf5 I encoutered numerous warnings, but ended up with some > libhdf5.a, libhdf5_hl.a, libhdf5.so.10.3.1 and libhdf5_hl.so.10.2.1: > # Build and install HDF5 > $ H5DIR=/home/me/netcdf > $ ./configure --with-zlib=${ZDIR} --prefix=${H5DIR} --enable-hl > $ make check > $ make install > > Please find attached the corresponding config_hdf5.log. > > Then I set export LD_LIBRARY_PATH=/home/me/netcdf/lib and tried: > $ # Build and install netCDF-4 > $ NCDIR=/home/me/netcdf > $ CPPFLAGS='-I${H5DIR}/include -I${ZDIR}/include' LDFLAGS='-L${H5DIR}/lib > -L${ZDIR}/lib' ./configure --prefix=${NCDIR} > > and ended up with the error on H5Fflush. Please find attached the > corresponding config_netcdf2.log. Do you have any idea what's going wrong? > > Ticket Details =================== Ticket ID: KMY-601675 Department: Support netCDF Priority: Normal Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.