#1147167 vtk9: CMake project using VTK and ITK fails configure: both want HDF5 but VTK uses older FindHDF5.cmake

Package:
vtk9
Source:
vtk9
Description:
Binaries for VTK9
Submitter:
Manik Bhattacharjee
Date:
2026-09-29 08:35:03 UTC
Severity:
normal
Tags:
#1147167#5
Date:
2026-09-08 16:19:19 UTC
From:
To:
Dear Maintainer,

our package CamiTK does not build since the update to ITK 5.4.7. While
troubleshooting the issue, we noticed that this is caused by VTK and ITK
requesting the same library: HDF5.

VTK uses a custom, older FindHDF5.cmake, while ITK uses the system one.
The CMake variables defined by the two FindHDF5.cmake are different,
which leads to an error at the configure step about not finding HDF5.

Our package does not require HDF5 except through VTK and ITK.
The curent workaround we are considering is to require it before asking
for VTK and ITK in our CMake files.

Here is a minimal example of a CMakeLists.txt file that shows the issue:

cmake_minimum_required(VERSION 3.28)
project(HDF5Issue)
# FIX: find_package(HDF5 COMPONENTS C HL)
find_package(VTK REQUIRED COMPONENTS CommonCore)
find_package(ITK REQUIRED)


Configuring the project ("cmake -S . --build build") in the directory
with this CMakeLists.txt generates an error identical to the one in our package:

#1147167#10
Date:
2026-09-12 17:18:49 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
vtk9, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1147167@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dominique Belhachemi <domibel@debian.org> (supplier of updated vtk9 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 12 Sep 2026 09:35:02 -0400
Source: vtk9
Architecture: source
Version: 9.6.2+dfsg1-6
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Changed-By: Dominique Belhachemi <domibel@debian.org>
Closes: 1147167
Changes:
 vtk9 (9.6.2+dfsg1-6) unstable; urgency=medium
 .
   * Team upload.
   * Drop unused 121_add_support_for_loong64.patch
   * Do not install VTK's bundled FindHDF5.cmake (Closes: #1147167)
Checksums-Sha1:
 249091d86403e4e80352a8222cd49b9d371c33e6 3801 vtk9_9.6.2+dfsg1-6.dsc
 54a21c646093975ad515e130ffc39fb73f01306d 27284 vtk9_9.6.2+dfsg1-6.debian.tar.xz
 9c4affd4620892b4418f6997e2d4d440246f5d57 29449 vtk9_9.6.2+dfsg1-6_source.buildinfo
Checksums-Sha256:
 c1b6ec3dd64146cfd3df18abdd9ad4f2660ea19bd11ec6784fed460e99bdceff 3801 vtk9_9.6.2+dfsg1-6.dsc
 8c49aa6b00a1a01ae7eb6fd857625df49856314b3438473175c633cb57a021c6 27284 vtk9_9.6.2+dfsg1-6.debian.tar.xz
 8486036ce75e2c33153dd1cadbd74a94cae8e642b2be0047c95bd3e8ecd535ae 29449 vtk9_9.6.2+dfsg1-6_source.buildinfo
Files:
 d0612b1c630c027706c96d60c2fddc01 3801 graphics optional vtk9_9.6.2+dfsg1-6.dsc
 47ad92b1217706f32153fc62bb67f6e6 27284 graphics optional vtk9_9.6.2+dfsg1-6.debian.tar.xz
 c479d2a6bd48630bd2d150e77b806c19 29449 graphics optional vtk9_9.6.2+dfsg1-6_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJHBAEBCgAxFiEE6kgtUJkuk2zr2l/SGbXmyGIZEAEFAmqlg1ATHGRvbWliZWxA
ZGViaWFuLm9yZwAKCRAZtebIYhkQAUcdD/97Vp5C7iGqLcNEaapBEwFy0rQL25p3
U69lHwceoWYUt276mmGMxyaJwvUZrxBT8GqKoI+sSCMAN5aZTujqzKhh8vu04EWy
2BLNCG9m8f0tKmOhY/AUoDGa5NXDzh8dNif5I7WhI5IBaBK0YlsuI0l1T8vJEBdc
10Es6jtt64z+sqOqiXG86mGh+zaVLD/fpWCo/bjJ0zB4BjEuP9uFhh45SEEiyaAq
60/5+w/lG3kRczb2RMioVGI6GDaM9u3X568FdatAD6ocez3EPBzt8ZVSAMLUtanQ
07QzCNoD0ostKYK4m6Y2Wmjg4nwG+bK7nP8PDG3vUPfGfxZNeu5oJZazKs4m7ULm
R/Z4fKANldIC4Xke8EsAwZ7+KazWz5NaM2R7kKkB3LGckYTZvD+4Oo+Unk0/PRgC
ftyCbe58EF/WiNYU2b2i+PJO3AX/Ksudr5HWQiidalbFnqcMEVnb+jPVy/n9QBgX
30p+A1NXGRtTMgMlleeDw+UjrKJQdWzBeNA2FlOilBRAMhdUSFUsTNJ0ktgdI5SH
uz5kj0u+ocyQIZ5Q2L840Wcbenzq0sl9odPzt9kWCirRqqhg4CIjcP7wZYW/uUXg
VufATenwi2ib32sEKsfp2yYv2+U3CtY4KA0Vucii3rx5JQpTn9b0UII0Y/iMF0Xt
Gpt44ElQoOg0zw==
=pqai
-----END PGP SIGNATURE-----

#1147167#15
Date:
2026-09-13 05:52:33 UTC
From:
To:
Hi,
this does not seem to be fixed.

In src:vmtk I have the following patch as a work-around
https://salsa.debian.org/science-team/vmtk/-/blob/master/debian/patches/build_explicit_find_hdf5.diff

I tried removing it after seeing that this was marked as done, but I still get the same cmake error as in the opening message.

Francesco

#1147167#20
Date:
2026-09-21 00:07:59 UTC
From:
To:
Are you still able to reproduce it?

vmtk builds for me in unstable with build_explicit_find_hdf5.diff disabled.

cu
Adrian

#1147167#39
Date:
2026-09-29 08:32:40 UTC
From:
To:
Package: vtk9
Followup-For: Bug #1147167
X-Debbugs-Cc: bunk@debian.org

Hi Adrian,
I can confirm that I can now build vmtk without the patch. I've done a new
upload without it.

Thanks,
Francesco