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 Johannes, > I need to build the netcdf tools with support for hdf4. The build process > itself seems to go through without errors, however the test fails > (attached). I tried building without the support for hdf4, which works > (well, the tests run through). I found the gotcha with the header files > for hdf4, so it does not seem to be that one... > Attached are: > buildoutput_configure.txt > the output of > ./configure --prefix=/usr/local --disable-dap --enable-hdf4 > > and > buildoutput_makecheck.txt > the output of > make check > (which also builds the libraries / tools before checking). > > System is Ubuntu 12.04 (LTS) on a netbook (Intel Atom CPU) From the warning messages compiling tst_interops2.c, it appears you have built the HDF4 library with support for netCDF-2 APIs, which causes name clashes in macro definitions: In file included from /usr/include/hdf/hdf.h:21:0, from /usr/include/hdf/mfhdf.h:25, from tst_interops2.c:11: /usr/include/hdf/hlimits.h:197:0: Warnung: »MAX_NC_DIMS« redefiniert [standardmäßig aktiviert] ../include/netcdf.h:1729:0: Anmerkung: dies ist die Stelle der vorherigen Definition /usr/include/hdf/hlimits.h:198:0: Warnung: »MAX_NC_VARS« redefiniert [standardmäßig aktiviert] ../include/netcdf.h:1731:0: Anmerkung: dies ist die Stelle der vorherigen Definition You will have to rebuild the HDF4 library with the configure option --disable-netcdf, as explained here: http://www.unidata.ucar.edu/netcdf/docs/build_hdf4.html Then rebuild the netCDF-4.3.0 library as you have done and it should work. If it doesn't, please send the config.log file from the netCDF-4 build. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: VSI-534627 Department: Support netCDF Priority: Normal Status: Closed