[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #NCE-881982]: 4.1.3 and the --width-hdf5 flag?



Hi David,

> just thought I'd report a possible problem with the new netcdf 4.1.3
> release. When I tried to make it on a clean CentOS machine, specifying the
> --with-hdf5=/path/to/my/hdf5/installation flag to configure did not work. It
> kept complaining that it could not find hdf5. Dropping back to 4.1.2, with
> the exact same configure command, worked fine.

Although the change is not very prominent in our documentation, there was an 
important simplification in the build process with release 4.1.3, as mentioned
at the top of the Release Notes:

  [NCF-20] - use of --with-hdf5= and other such options violates conventions 
and causes build problems

indicating that the "--with-hdf5" configure option was removed and replaced by
the use of environment variables.  The reason for this change to the build 
procedure 
is explained in our Jira database, accessible from the Release notes:

  https://www.unidata.ucar.edu/jira/browse/NCF-20

where, if you click on the "History" tab (!), you can uncover the following:

  Although these options were put in with the best of intentions, and
  following the example of the HDF5 package, they were nonetheless
  misguided, and contributed to many bugs, and many support issues.

  Additionally, since this is not the normal way that packages are
  built, the use of these options caused netCDF to require more
  documentation, and, what's worse, required that each installer read
  the documentation (this is not the usual case with Unix packages,
  which can generally be built without setting any options.)

  More importantly, the use of the --with-hdf5 option (and similar ones
  like --with-zlib, --with-szlib, --with-pnetcdf, --with-hdf4) cause two
  serious bugs: 

    1 - No way for these options to work on platforms that have
        libraries in /lib and /lib64 for 32 and 64 bit builds.

    2 - Caused problem for for cross-compiles link the mingw32 build and
        builds on some supercomputers.

  Ultimately, it is only possible for the builder of the software to
  know what settings to use in the various FLAG environment
  variables. All of our attempts to "help" in this area just result in
  problems for some small (but important) fraction of the user
  base. Therefore I have decided that all these options must go, both in
  netCDF and in libCF. I regret the inconvenience this may cause users
  who have become accustomed to these options.

So try building 4.1.3 using the environment variables CPPFLAGS and LDFLAGS
set to appropriate values, such as

  CPPFLAGS=-I/share/ed/local/spike/include 
  LDFLAGS=-L/share/ed/local/spike/lib

instead of using "--with-hdf5=...".

And thanks for sending in the support report, it indicates we still need to 
improve the documentation and Release Notes information to alert users to the 
change.

--Russ



Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: NCE-881982
Department: Support netCDF
Priority: Normal
Status: Closed