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 Edin, Your latest email from last night did not get sent to our support system, for some reason. even though I assume you sent it to "address@hidden". I got your email sent to me this afternoon, but you should continue sending responses to the support-netcdf address instead, if possible, because that way they get into our support tracking system and someone else will see them in case I'm away from my email. We are also trying to develop software, so sometimes it may takes several days to respond to support questions. From the output you sent, it appears that you are sometimes giving up on the configure followed by make steps and instead manually editing a Makefile. In general this is a bad way to proceed, as the automake system requires the Makefiles to be generated by the configure script, never manually edited. If you make a change to a Makefile, it doesn't show up in the shell output you attach, so we have no way of knowing whether the change was consistent with the rest of the Makefile. In general, you will have better luck specifying all the configuration information you need on the command line to configure or in environment variables. If that doesn't work, just send in the output indicating the problem rather than modifying a Makefile. > *** Checking HDF5 variable with unlimited dimension...ok. > HDF5-DIAG: Error detected in HDF5 (1.8.1) thread 0: > #000: H5Z.c line 1268 in H5Zget_filter_info(): Filter not defined > major: Invalid arguments to routine > minor: Bad value > #001: H5Z.c line 918 in H5Z_find(): required filter is not registered > major: Data filters > minor: Object not found > *** Checking HDF5 deflate filter setting and getting...Sorry! Unexpected > result, tst_h_vars.c, line: 228 > 1 failures This is an HDF5 failure, having nothing to do with netCDF-4, and indicates the zlib compression library, libz, is not being found. From your configure line: dhcp-235:netcdf-4.0 edo$ ./configure --enable-netcdf-4 --with-hdf5=/usr/local/ --with-zlib=/usr/local/ --prefix=/usr/local/ CFLAGS=-m64 CXXFLAGS=-m64 CC=gcc you are saying that zlib is installed in /usr/local/, which means the following library and include files must exist: /usr/local/lib/libz.a /usr/local/include/zlib.h Looking at your shell log, I see: > dhcp-235:zlib-1.2.3 edo$ ./configure --prefix=/usr/local CC=gcc CFLAGS=-m64 > unknown option: CC=gcc > ./configure --help for help > dhcp-235:zlib-1.2.3 edo$ emacs Makefile > dhcp-235:zlib-1.2.3 edo$ emacs Makefile > dhcp-235:zlib-1.2.3 edo$ ./configure --prefix=/usr/local so I have no idea how you edited the Makefile that configure should have generated. In the HDF5 make check output, I see: > Testing zip_perf > Finished testing zip_perf > ============================ > zip_perf Test Log > ============================ > No compression IO performance because zlib was not configured > 0.00 real 0.00 user 0.00 sys so that confirms that the HDF5 installation won't be able to do compression using zlib. In one of the attempts to build netcdf-4, I see: > configure: error: Can't find the hdf5 header and/or library, or can't link a program to it. HDF5 must be built with zlib; the location of zlib must be specified for netCDF-4 with the --with-zlib option. If HDF5 was also built with szlib, then the location of szlib must also be specified with the --with-slib option. > dhcp-235:netcdf-4.0 edo$ emacs Makefile > dhcp-235:netcdf-4.0 edo$ sudo ./configure --enable-netcdf-4 --with-hdf5=/usr/local/ --with-zlib=/usr/local/include --prefix=/usr/local/ CFLAGS=-m64 indicating an error finding zlib, probably because it was installed in /usr/local/ but the configure option --with-zlib=/usr/local/include is indicating the wrong location. Editing the Makefile may appear to fix this problem, but may cause other problems if it doesn't match what configure would generate when the correct location is specified. Sorry, but that's about all I can tell from the output you sent. Be careful with extra spaces, as they aren't allowed in configure arguments. Attempts to set the CXXFLAGS to "-m64" for configure should leave out the spaces. you must use CXXFLAGS=-m64 not CXXFLAGS= -m64 and not CXXFLAGS = -m64 Also be careful to specify the configure flags you intend: > dhcp-235:netcdf-4.0 edo$ sudo ./configure --enable-netcdf-4 --with-hdf5=/usr/local/ --with-zlib=/usr/local/include --prefix=/usr/local/ CFLAGS=-m64 CXX=-m64 fails because it attempts to set C++ compiler flags using CXX=-m64 but ends up setting the C++ compiler to "-m64". You must instead use CXXFLAGS=-m64 Finally, when specifying library paths, with the --with-hdf5 or --with-zlib options, you should specify a directory that contains lib/ and include/ subdirectories with the needed library and header files. At one point you had installed HDF5 under /usr/local/hdf5/ but were trying --with-hdf5=/usr/local/ or --with-hdf5=/usr/local/include/, when you needed --with-hdf5=/usr/local/hdf5/. Now it appears you have installed HDF5 under /usr/local/ and you're giving the correct location --with-hdf5=/usr/local/. --Russ --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: LKB-522731 Department: Support netCDF Priority: Normal Status: Closed