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.
The info we were missing was the hdf5 options you used to build hdf5. The relevant errors from the config.log are these: > configure:16955: mpicc -o conftest -I/home/pf4d/local/hdf5-1.10.2/include > > -I/home/pf4d/local/hdf5-1.10.2/include -L/home/pf4d/local/hdf5-1.10.2/lib > > -lhdf5 -lhdf5_hl conftest.c -lhdf5 -lm -lz >&5 > /usr/bin/x86_64-linux-gnu-ld: warning: libsz.so.2, needed by > /home/pf4/local/hdf5-1.10.2/lib/libhdf5.so, not found (try using -rpath or > -rpath link) > /home/pf4d/local/hdf5-1.10.2/lib/libhdf5.so: undefined reference to > `SZ_encoder_enabled' >/home/pf4d/local/hdf5-1.10.2/lib/libhdf5.so: undefined reference to >`SZ_BufftoBuffCompress' They indicate that 1. libz was not found; you may need to specify its location both when compiling hdf5 and when compiling netcdf 2. It appears that hdf5 was compiled with szlib support turned on but szlib was not found when compiling netcdf. > > I'm not sure why this worked, but re-compiling HDF5 seemed to solve the > problem. Attached is the config.log. > > """ > ldd $HDF5_DIR/lib/libhdf5.so.101.1.0 > linux-vdso.so.1 (0x00007fff874d5000) > libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f92688bf000) > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f92686bb000) > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f926831d000) > libmpich.so.0 => /usr/lib/x86_64-linux-gnu/libmpich.so.0 > (0x00007f9267e67000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9267a76000) > /lib64/ld-linux-x86-64.so.2 (0x00007f92690c6000) > libcr.so.0 => /usr/lib/libcr.so.0 (0x00007f926786b000) > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > (0x00007f926764c000) > librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9267444000) > libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f926722c000) > """ > > -Evan > > On Wed, Jul 25, 2018 at 9:24 AM Evan Cummings <address@hidden> > wrote: > > > Hi Dennis, > > > > Thanks for your help. You suggestion didn't work, I've attached the > > config.log. > > > > -E > > > > address@hidden> wrote: > > > >> As an experiment, try changing the LDFLAGS to this instead. > >> LDFLAGS="-L${HDF5_DIR}/lib -lhdf5 -lhdf5_hl" > >> > >> > >> > > >> > Can you provide the config.log file generated when you ran `configure`? > >> It will provide additional information which may be helpful for us to > >> discover what is going wrong. > >> > > >> > Thank you, > >> > > >> > -Ward > >> > > >> > > Hi there, > >> > > > >> > > I have encountered the error: > >> > > > >> > > "configure: error: Can't find or link to the hdf5 library. Use > >> > > --disable-netcdf-4, or see config.log for errors." > >> > > > >> > > when I run configure on version 4.6.1 like so: > >> > > > >> > > """ > >> > > ../configure CC=mpicc \ > >> > > CXX=mpicxx \ > >> > > FC=mpifort \ > >> > > CPPFLAGS="-I${HDF5_DIR}/include" \ > >> > > CFLAGS="-I${HDF5_DIR}/include" \ > >> > > LDFLAGS="-L${HDF5_DIR}/lib" \ > >> > > --prefix=${NETCDF4_DIR}; > >> > > """ > >> > > > >> > > I have compiled HDF5 version 1.10.2 : > >> > > > >> > > """ > >> > > ldd ${HDF5_DIR}/lib/libhdf5.so.101.1.0 > >> > > linux-vdso.so.1 (0x00007fff423fe000) > >> > > libsz.so.2 => not found > >> > > libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc7f3e80000) > >> > > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc7f3c7c000) > >> > > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc7f38de000) > >> > > libmpich.so.0 => /usr/lib/x86_64-linux-gnu/libmpich.so.0 > >> > > (0x00007fc7f3428000) > >> > > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc7f3037000) > >> > > /lib64/ld-linux-x86-64.so.2 (0x00007fc7f4688000) > >> > > libcr.so.0 => /usr/lib/libcr.so.0 (0x00007fc7f2e2c000) > >> > > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > >> > > (0x00007fc7f2c0d000) > >> > > librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc7f2a05000) > >> > > libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 > >> (0x00007fc7f27ed000) > >> > > """ > >> > > > >> > > I have linked HDF5 with zlib, as suggested here: > >> > > > >> > > > >> https://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html > >> > > > >> > > So, I'm stumped! > >> > > > >> > > Can anyone help? Thanks. > >> > > > >> > > -Evan > >> > > > >> > > > >> > > >> > >> =Dennis Heimbigner > >> Unidata > >> > >> > >> Ticket Details > >> =================== > >> Ticket ID: EGO-288225 > >> Department: Support netCDF > >> Priority: Normal > >> Status: Open > >> =================== > >> 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. > >> > >> > >> > > =Dennis Heimbigner Unidata Ticket Details =================== Ticket ID: EGO-288225 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.