# Updating ITK's HDF5

**URL:** https://discourse.itk.org/t/updating-itks-hdf5/472
**Category:** Engineering
**Created:** [December 1, 2017, 12:18am UTC](https://discourse.itk.org/t/updating-itks-hdf5/472 "2017-12-01T00:18:35Z")
**Posts on this page:** 11
**Page:** 3

<div class="post-metadata">

### Author: ![gdevenyi](https://discourse.itk.org/user_avatar/discourse.itk.org/gdevenyi/32/355_2.png) [@gdevenyi](https://discourse.itk.org/u/gdevenyi)
#### Post date: [August 9, 2018, 3:26pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/41 "2018-08-09T15:26:38Z")

</div>

H5F\_LIBVER\_NBOUNDS doesn’t exist in 1.8.x 🙂

This is forward and backward compatible:

> <https://github.com/gdevenyi/libminc/blob/fix_hdf1.10/libsrc2/volume.c#L36-L38>

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

---

<div class="post-metadata">

### Author: ![gdevenyi](https://discourse.itk.org/user_avatar/discourse.itk.org/gdevenyi/32/355_2.png) [@gdevenyi](https://discourse.itk.org/u/gdevenyi)
#### Post date: [August 9, 2018, 4:25pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/42 "2018-08-09T16:25:38Z")

</div>

PR update against libminc [https://github.com/BIC-MNI/libminc/pull/98](https://github.com/BIC-MNI/libminc/pull/98)

---

<div class="post-metadata">

### Author: ![gdevenyi](https://discourse.itk.org/user_avatar/discourse.itk.org/gdevenyi/32/355_2.png) [@gdevenyi](https://discourse.itk.org/u/gdevenyi)
#### Post date: [August 9, 2018, 6:05pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/43 "2018-08-09T18:05:04Z")

</div>

> <https://github.com/InsightSoftwareConsortium/ITK/pull/53>

---

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [August 10, 2018, 1:32pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/44 "2018-08-10T13:32:47Z")

</div>

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](https://open.cdash.org/viewBuildError.php?buildid=5491099)

```auto
/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);
                          ^

```

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [August 10, 2018, 1:35pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/45 "2018-08-10T13:35:47Z")

</div>

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

---

<div class="post-metadata">

### Author: ![gdevenyi](https://discourse.itk.org/user_avatar/discourse.itk.org/gdevenyi/32/355_2.png) [@gdevenyi](https://discourse.itk.org/u/gdevenyi)
#### Post date: [August 10, 2018, 1:44pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/46 "2018-08-10T13:44:58Z")

</div>

Looks like setLibverBounds was added in 1.8.15:  
[https://support.hdfgroup.org/HDF5/doc/ADGuide/Changes\_1\_8\_x.html](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:

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

```

---

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [August 10, 2018, 1:47pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/47 "2018-08-10T13:47:39Z")

</div>

The current version installed:

```auto
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.

```

---

<div class="post-metadata">

### Author: ![gdevenyi](https://discourse.itk.org/user_avatar/discourse.itk.org/gdevenyi/32/355_2.png) [@gdevenyi](https://discourse.itk.org/u/gdevenyi)
#### Post date: [August 10, 2018, 1:49pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/48 "2018-08-10T13:49:32Z")

</div>

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](https://portal.hdfgroup.org/display/HDF5/H5P_SET_LIBVER_BOUNDS)

---

<div class="post-metadata">

### Author: ![gdevenyi](https://discourse.itk.org/user_avatar/discourse.itk.org/gdevenyi/32/355_2.png) [@gdevenyi](https://discourse.itk.org/u/gdevenyi)
#### Post date: [August 10, 2018, 1:57pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/49 "2018-08-10T13:57:58Z")

</div>

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

```auto
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 */

```

---

<div class="post-metadata">

### Author: ![imikejackson](https://discourse.itk.org/user_avatar/discourse.itk.org/imikejackson/32/35_2.png) [@imikejackson](https://discourse.itk.org/u/imikejackson)
#### Post date: [August 10, 2018, 2:51pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/50 "2018-08-10T14:51:41Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [August 10, 2018, 6:37pm UTC](https://discourse.itk.org/t/updating-itks-hdf5/472/51 "2018-08-10T18:37:47Z")

</div>

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

[Previous page](https://discourse.itk.org/t/updating-itks-hdf5/472.md?page=2)
