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 Mark, I was able to reproduce the problem with ncgen3 getting unrecognized externals and finally figured out the problem. When you build HDF4, you have to use the "--disable-netcdf" configure option, to prevent it from building its own version of the netCDF-2 library which conflicts with the version built by our netCDF software. Specifically, here's what worked for me: First I built and installed HDF5 with --prefix=${H5DIR}. Then I built and installed HDF4 with ./configure --enable-shared --disable-netcdf --disable-fortran --prefix=${H4DIR} make make install Then for netCDF-4.1.3 (and this probably works for later versions as well), I used CPPFLAGS="-I${H5DIR}/include -I${H4DIR}/include -I/opt/include" LDFLAGS="-L${H5DIR}/lib -L${H4DIR}/lib -L/opt/lib" ./configure --disable-shared --enable-hdf4 --enable-hdf4-file-tests and make check completed with no errors. It also worked fine with "--disable-dap", but I had the necessary libcurl previously installed in /opt/lib, so I verified that it works with DAP client access. The HDF-4 file tests also completed successfully. I'm adding the need to specify "--disable-netcdf" when building HDF4 to the document http://www.unidata.ucar.edu/netcdf/docs/build_hdf4.html as it seems to be necessary to get this working. Thanks for reporting the probem! --Russ > My install of netcdf-4.1.3 keeps failing during "make", when it gets to > the ncgen3 compile with the HDF4 libraries. > I've included the output of ./configure (configure.out), make (make.out) > and make check (check.out) and config.log. > > I've also tried netcdf-4.2.1.1 and netcdf-4.3.0-rc1 but with the same error. > (The last version I have working was with hdf-4.2.9, hdf5-1.8.10-patch1 > and netcdf-4.1.1) > > Here are the versions of HDF4, HDF5, and netCDF I'm trying to use: > hdf-4.2.9 > hdf5-1.8.10-patch1 > netcdf-4.1.3 > > This is my "configure" command line: > ./configure --prefix=/usr/local/new2 --disable-shared --enable-netcdf-4 > --enable-hdf4 --disable-dap > & configure.out > > Other info: > > CentOS release 6.3 (Final) 64-bit > Linux xrain.atmos.colostate.edu 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue > Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux > icc version 13.0.0 (gcc version 4.4.6 compatibility) > ifort version 13.0.0 > zlib-1.2.3-27.el6.x86_64 > libjpeg-6b-46.el6.x86_64 > libxml2-2.7.6-8.el6_3.4.x86_64 > > I'm installing in directories: > /usr/local/new2 > /usr/local/new2/bin > /usr/local/new2/lib > /usr/local/new2/include > /usr/local/new2/hdf-4.2.9 > /usr/local/new2/hdf5-1.8.10-patch1 > /usr/local/new2/hdf/netcdf-4.1.3 > > Environmental Variables I set: > HDF_INC=/usr/local/new2/include > HDF_LIB=/usr/local/new2/lib > NETCDF_INC=/usr/local/new2/include > NETCDF_LIB=/usr/local/new2/lib > HDF4_INC=/usr/local/new2/include > HDF4_LIB=/usr/local/new2/lib > HDF5DIR=/usr/local/new2 > HDF5_INC=/usr/local/new2/include > HDF5_LIB=/usr/local/new2/lib > FORTRAN=ifort > F77=ifort > FC=ifort > FORTC=ifort > F90=ifort > F9X=ifort > F95=ifort > CC=icc > CFLAGS=-O3 -xSSSE3 -ip > FFLAGS=-O3 -xSSSE3 -ip > CXX=icpc > CPP=icc -E > CXXCPP=icpc -E > CXXFLAGS=-O3 -xSSSE3 -ip > CPPFLAGS=-I/usr/local/new2/include -I/usr/include > LDFLAGS=-L/usr/local/new2/lib -ldf -lmfhdf -lhdf5 -lhdf5_hl -L/usr/lib64 -lz > LD_LIBRARY_PATH=/usr/lib64:/usr/local/new2/lib:/usr/local/intel/composer_xe_2013.0.079/compiler/lib/intel64 > > Thank you for any help with this! > mark > > Mark Ringerud > Research Associate > Atmospheric Science > Colorado State University > Fort Collins, Colorado > (970) 491-8502 > address@hidden > > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: VOG-153523 Department: Support netCDF Priority: Normal Status: Closed