Closed ArchangeGabriel closed 2 years ago
What do you suggest?
#define
?Finally, would you be willing to supply a pull request?
If I’d care only about my use case (packaging for Arch Linux), I’d say 2., but 3. might be generally better.
I’d love to do a PR, but I definitively lack the skills for it (I only have very superficial knowledge of C/C++ and never wrote something else than a simple exercise in either of those languages). So while I can see the issue are changes in some H5 functions arguments, I would not trust my ability to fix them correctly.
@hmeine I fixed a similar issue for csound, it was relatively trivial: https://github.com/csound/csound/pull/1314
As a temporary measure I got it to build passing -DCMAKE_C_FLAGS="-DH5_USE_110_API"
as a cmake
arg. ;)
EDIT: Scratch that, I did not build against 1.12 actually, it still fails as above…
EDIT2: Of course, -DCMAKE_CXX_FLAGS="-DH5_USE_110_API"
in addition seems to work.
diff --git a/src/impex/hdf5impex.cxx b/src/impex/hdf5impex.cxx
index 2c68342e..682e0126 100644
--- a/src/impex/hdf5impex.cxx
+++ b/src/impex/hdf5impex.cxx
@@ -190,7 +190,7 @@ H5O_type_t HDF5_get_type(hid_t loc_id, const char* name)
{
// get information about object
H5O_info_t infobuf;
- H5Oget_info_by_name(loc_id, name, &infobuf, H5P_DEFAULT);
+ H5Oget_info_by_name(loc_id, name, &infobuf, H5O_INFO_BASIC, H5P_DEFAULT);
return infobuf.type;
}
might work, the other alternative is to use
H5Oget_info_by_name1
instead of H5Oget_info_by_name
https://portal.hdfgroup.org/display/HDF5/Migrating+from+HDF5+1.10+to+HDF5+1.12
hdf5 1.12.0 introduces some API changes. This results in build error:
There might be others, see the migrating help.