Updating ITK's HDF5

H5F_LIBVER_NBOUNDS doesn’t exist in 1.8.x :slight_smile:

This is forward and backward compatible:

As soon as it gets merged upstream I’ll submit an upstream rsync for ITK.

PR update against libminc https://github.com/BIC-MNI/libminc/pull/98

1 Like

I have a build using an the system HDF5 (older), it is producing the following error on the dashboard:
https://open.cdash.org/viewBuildError.php?buildid=5491099

/scratch/dashboards/Linux-x86_64-gcc4.8-system/ITK/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx: In member function 'virtual void itk::HDF5ImageIO::WriteImageInformation()':
/scratch/dashboards/Linux-x86_64-gcc4.8-system/ITK/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx:1179:10: error: 'class H5::FileAccPropList' has no member named 'setLibverBounds'
     fapl.setLibverBounds(H5F_LIBVER_V18, H5F_LIBVER_V18);
          ^
/scratch/dashboards/Linux-x86_64-gcc4.8-system/ITK/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx:1179:26: error: 'H5F_LIBVER_V18' was not declared in this scope
     fapl.setLibverBounds(H5F_LIBVER_V18, H5F_LIBVER_V18);
                          ^

If you cannot update the system’s version, we could #ifdef the call to setLibverBounds based on version.

Looks like setLibverBounds was added in 1.8.15:
https://support.hdfgroup.org/HDF5/doc/ADGuide/Changes_1_8_x.html

Probably good to ifdef like this, as I also had to do in libminc:

#if (H5_VERS_MAJOR==1)&&(H5_VERS_MINOR<10)
fapl.setLibverBounds(H5F_LIBVER_V18, H5F_LIBVER_V18);
#endif
1 Like

The current version installed:

Name        : hdf5-devel
Version     : 1.8.12
Release     : 10.el7
Architecture: x86_64
Size        : 16175918
Packager    : Fedora Project
Group       : Development/Libraries
URL         : http://www.hdfgroup.org/HDF5/
Repository  : epel
Summary     : HDF5 development files
Source      : hdf5-1.8.12-10.el7.src.rpm
Description :
HDF5 development headers and libraries.

Man did HDF5 drop the ball on versioning…

We have a further problem, the H5F_LIBVER_V18 feature wasn’t added until 1.10.2, so, 1.10.0 and 1.10.1 don’t have a backwards compatibility setting.

See history at the bottom of this page:
https://portal.hdfgroup.org/display/HDF5/H5P_SET_LIBVER_BOUNDS

Alternatively… we could restrict the API, as seen in H5version.sh:

defined(H5_USE_18_API_DEFAULT) && !defined(H5_USE_18_API)
#define H5_USE_18_API 1
#endif /* H5_USE_18_API_DEFAULT && !H5_USE_18_API */
1 Like

Is this for ITK 4.x or ITK 5.x? If it is for ITK 5.x then can’t we just say that HDF5 1.10.2 is the minimum version required?

We are probably not taking advantage of the new stuff introduced, and being backwards compatible is an advantage.