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 Bin, > There are several hdf5 libraries installed in the Linux system . How could I > let the NetCDF compiled with one set of hdf5 library? If you are using configure to build the netCDF-C library from source, you have to rebuild netCDF using the CPPFLAGS and LDFLAGS environment variables (or configure flags) when you rerun configure. For example $ H5DIR=/your/path/to/hdf5 $ CPPFLAGS="-I${H5DIR}/include" $ LDFLAGS="-L${H5DIR}/lib" $ ./configure --prefix= ... Here's some documentation: http://www.unidata.ucar.edu/netcdf/docs/getting_and_building_netcdf.html --Russ > > On May 27, 2014, at 16:43, "Unidata netCDF Support" <address@hidden> wrote: > > > > Hi Bin, > > > >> I tried to build netcdf library with support of HDF 4 files. Following the > >> instruction on the webpage: > >> http://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html#build_hdf4 > >> I got the compiling error in make check step. Here is the cotent of > >> ncdump/test-suite.log: > >> ========================================= > >> netCDF 4.3.2: ncdump/test-suite.log > >> ========================================= > >> > >> # TOTAL: 39 > >> # PASS: 36 > >> # SKIP: 0 > >> # XFAIL: 0 > >> # FAIL: 3 > >> # XPASS: 0 > >> # ERROR: 0 > >> > >> .. contents:: :depth: 2 > >> > >> FAIL: tst_h_scalar > >> ================== > >> > >> HDF5-DIAG: Error detected in HDF5 (1.8.6) thread 0: > >> #000: H5T.c line 1597 in H5Tcreate(): unable to create type > >> major: Datatype > >> minor: Unable to initialize object > >> #001: H5T.c line 2985 in H5T_create(): type class is not appropriate - use > >> H5Tcopy() > >> major: Datatype > >> minor: Feature is unsupported > >> > >> *** Create file with datasets & attributes that have scalar > >> dataspaces...Sorry! Unexpected result, tst_h_scalar.c, line: 123 > >> > >> FAIL: tst_h_scalar.sh > >> ===================== > > > > You have to use a more recent version of HDF5, 1.8.8 or later, with netCDF > > 4.2 or later. > > > > There was a bug in HDF5-1.8.7 that we didn't test for in the corresponding > > netCDF version 4.1.3. Recent netCDF versions detect the HDF5 bug when built > > with HDF5-1.8.7 or earlier, but build fine with HDF5 versions 1.8.8 and > > later. > > If you have to rebuild HDF5 from source anyway, I would recommend just using > > the latest version 1.8.13, as that's what we're testing with now. > > > > We need to document more prominently that HDF5-1.8.7 and earlier don't work > > well with current versions of the netCDF C library. > > > > --Russ > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: CPW-270700 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: CPW-270700 Department: Support netCDF Priority: Normal Status: Closed