Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Andreas <lists@xxxxxxxxxx> writes: >>> So I tried anyways configuring using >>> >>> --enable-netcdf4 --enable-hdf4 --enable-cxx-4 --enable-shared >>> --with-hdf4=/usr/include/hdf FC=gfortran >>> >>> And, alas, the compilation seems to work :) However, when I then run >>> ``make && make -j1 test``, I get the following error: >>> >> >> Howdy Andreas! >> >> You have hit upon the weak spot of the --with-hdf4 option (and also the >> --with-hdf5, --with-pnetcdf, --with-zlib, --with-szlib options). They >> expect to find lib and include under the same directory. But this is not >> always the case. >> >> The answer is to not use the --with-hdf4 option, but instead, before >> running configure, set CPPFLAGS and LDFLAGS to include the appropriate >> arguments: >> >> CPPFLAGS=-I/usr/include LDFLAGS=-L/usr/lib ./configure --enable-hdf4 && make >> check >> >> Give this a try and let me know if it doesn't work for you. > > Heya, Ed! > > Thanks for your help, this now seems to work. Unfortunately, the build > doesn't successfully finish (yet), as I get the following error: > > configure:25845: cc -o conftest -g -O2 -I/usr/include/hdf -L/usr/lib > conftest.c -lhdf5 -lhdf5_hl -lhdf5 -lm -lz -lhdf5 -lmfhdf -ldf -ljpeg > -lz >&5 > /tmp/ccdQCasV.o: In function `main': > /home/MYHOME/tmp/software/build/libnetcdf4-4.1.1/conftest.c:109: > undefined reference to `H5Z_can_apply_szip' > collect2: ld returned 1 exit status Was this HDF5 built with --enable-szlib? If so, you must configure netCDF with --with-szlib=/location. If not, you must not configure netCDF with --with-szlib. > > In total, there's several 'undefined reference's: > > conftest.c:95: undefined reference to `_doprnt' > conftest.c:97: undefined reference to `strlcat' > conftest.c:109: undefined reference to `MPI_Comm_f2c' > conftest.c:108: undefined reference to `H5Pget_fapl_mpiposix' > conftest.c:108: undefined reference to `H5Pget_fapl_mpio' > conftest.c:109: undefined reference to `H5Z_can_apply_szip' These look like they come from the configure script which outputs results to config.log. The configure script encounters lots of errors and problems as it probes your system. These are nothing to be concerned about. For example, one thing that the configure does is to see if the H5P_get_fapl_mpiposix function is found in the HDF5 library, which will be the case if HDF5 was built with --enable-parallel. If it finds this function, it knows that it is dealing with parallel I/O. If not, then not. So the undefined reference error is expected and desirable if HDF5 was not built with --enable-parallel. This is just configure doing its thing. > Which is strange, because all the libraries the cc links to (using the > -lXXX flags) do exist in /usr/lib ... > > The undefined references to the MPI stuff could be because I have the > libhdf5-serial-1.8.4 package installed, and not the MPI version. And it > might also be that the Ubuntu package is not linked against szip ... Any > ideas? > > Thanks for your insight, > > Andreas. > Focus on the szlib build problem and ignore the errors in config.log. Good luck! Ed -- Ed Hartnett -- ed@xxxxxxxxxxxxxxxx
netcdfgroup
archives: