The netCDF library supports many versions of HDF5, which handles API
compatibility via a set of API-call-specific macros. netCDF uses
H5Literate(), which was versioned in the 1.12.x maintenance line
in order to better support the virtual object layer (VOL).
h5_test/tst_h_files4.c failed to compile with certain compilers when the
HDF5 library was built using pre-VOL versions of the library- e.g., 1.10,
which can be configured with --with-default-api-version=110. This was due
to the API compatibility macros being used to select the 1.10 version of
H5Literate(), but not its callback function, which was set using a
`H5_VERSION_GE()` macro that does not take the compatibility macros into
consideration.
Fixing the problem involved removing the `H5_VERSION_GE()` macro and
letting the compatibility macros handle the versioning, and using the
`H5_USE_XXX_API_DEFAULT` symbols to protect the H5Oopen_by_addr() call
used in the callback (a new call that wasn't versioned, hence the
different protection mechanism).
Tested w/ HDF5's develop branch w/ both 1.14 and 1.10 API bindings
Fixes#2886 (4118 in HDF5's issue tracker)
* main: (209 commits)
Bump Visual Studio appveyor, for the brief period before we swap out to GitHub actions.
Make a change in support of https://github.com/Unidata/netcdf-c/pull/2879
Revert "fix cmake build with ENABLE_HDF4 and hdf requiring jpeg"
removing need for global compile definition
fix cmake build with ENABLE_HDF4 and hdf requiring jpeg
Removed assumption that we are linking against static HDF5 when building a static library. While it's reasonable to provide a mechanism to specify this, it is not necessarily true. We should also perhaps rename the NC_FIND_SHARED option, since LIBS implies it will look for static or shared libraries for all dependencies, but this logic only looks for HDF5. In any case, commenting this out for now until we can rework it.
Re-adding global add-definition for the time being. Its lack introduces an unnecessary roadblock (at the moment). Re-formulated logic for determining what tests to run when. Need to figure out why plugins are turned off when MINGW is true, but that's a different issue. As of this push, all tests succeed on local windows system.
Update cmake-based plugins and test logic.
Modify messages to be more clear.
setting dll export on each target
Correct lingering compilation issue under Visual Studio. Hopefully I haven't broken the Linux build
Addressing a handful of issues encountered in Visual Studio re: linking, setting compiler flags for VC, etc.
removing c++ header file from c header
Corrected a dependencies issue linking against libcurl and finding curl/curl.h using Visual Studio. There's another issue to correct, but this is getting us a lot closer.
Correct(?) syntax with target_compile_options() in top level CMakeLists.txt. Correct the logic flow in libncxml/CMakeLists.txt to not try to include non-existant directory when libxml2 is not found.
removing unused cmake
updating tests to use correct cmake variable
removing possibly redundant cmake for shared library
updating release notes
bumping cmake version
...
Currently, the build fails because jpeg libraries are not linked in.
There is already a HDF4_LIBRARIES that always includes HDF4_MFHDF_LIB and
HDF4_DF_LIB (in cmake/dependencies.cmake), but this is never used.
HDF4_LIBRARIES will also include jpeg libraries, if required.
Fix build by linking against jpeg by linking against HDF4_LIBRARIES instead
of the two more specific variables.