NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Andreas <lists@xxxxxxxxxx> writes: > Thanks for your comment! > >> The option --enable-hdf4 only tells it to compile to use hdf4, it does not >> tell it where that resides, and /usr/include/hdf must not be in your search >> paths. I forget the exact form of the option that tells it that but it is >> something like: >> >> --with-hdf4= > > Yes, I know about that. And I didn't try using it because ``./configure > --help`` says: > > --with-hdf4=<directory> Specify location of HDF4 library. Configure > will expect to find subdirs include and lib. > > And as I wrote, the libs are in /usr/lib, the headers in /usr/include/hdf. > > 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. Thanks! Ed -- Ed Hartnett -- ed@xxxxxxxxxxxxxxxx
netcdfgroup
archives: