[From nobody Sat Sep 12 18:21:07 2026
Received: (at submit) by bugs.debian.org; 8 Sep 2026 16:19:24 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-18.9 required=4.0 tests=BAYES_00,
 BODY_INCLUDES_PACKAGE,FOURLA,HAS_PACKAGE,NO_RELAYS,XMAILER_REPORTBUG
 autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 36; hammy, 150; neutral, 200; spammy,
 0. spammytokens: hammytokens:0.000-+--XDebbugsCc,
 0.000-+--X-Debbugs-Cc, 0.000-+--python3, 0.000-+--H*Ad:N*Bug,
 0.000-+--HTo:N*Debian
Return-path: &lt;manik.bhattacharjee@univ-grenoble-alpes.fr&gt;
Received: via submission by buxtehude.debian.org with esmtp (Exim 4.96)
 (envelope-from &lt;manik.bhattacharjee@univ-grenoble-alpes.fr&gt;)
 id 1x3yXa-00AFaT-23 for submit@bugs.debian.org;
 Tue, 08 Sep 2026 16:19:24 +0000
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Manik Bhattacharjee &lt;manik.bhattacharjee@univ-grenoble-alpes.fr&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: vtk9: CMake project using VTK and ITK fails configure: both want HDF5
 but VTK uses older FindHDF5.cmake
Message-ID: &lt;178888435959.49347.1039380726985636146.reportbug@4e4647f9ddb1&gt;
X-Mailer: reportbug 13.2.0+nmu1
Date: Tue, 08 Sep 2026 18:19:19 +0200
Delivered-To: submit@bugs.debian.org

Package: vtk9
Version: 9.6.2+dfsg1-5
Severity: normal
X-Debbugs-Cc: manik.bhattacharjee@univ-grenoble-alpes.fr

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 (&quot;cmake -S . --build build&quot;) in the directory
with this CMakeLists.txt generates an error identical to the one in our package:

-- Found HDF5: /usr/lib/x86_64-linux-gnu/libhdf5_serial.so (found version &quot;2.2.0&quot;) found components: C
CMake Error at /usr/share/cmake-4.3/Modules/FindHDF5.cmake:1257 (message):
  HDF5 was found, but a different variable was set which contains the
  location of the `hdf5::hdf5` library.
Call Stack (most recent call first):
  /usr/share/cmake-4.3/Modules/CMakeFindDependencyMacro.cmake:93 (find_package)
  /usr/share/cmake-4.3/Modules/CMakeFindDependencyMacro.cmake:125 (__find_dependency_common)
  /usr/lib/x86_64-linux-gnu/cmake/LIBMINC/LIBMINCConfig.cmake:54 (find_dependency)
  /usr/lib/x86_64-linux-gnu/cmake/ITK-5.4/Modules/ITKMINC.cmake:15 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/ITK-5.4/ITKModuleAPI.cmake:86 (include)
  /usr/lib/x86_64-linux-gnu/cmake/ITK-5.4/ITKModuleAPI.cmake:31 (itk_module_load)
  /usr/lib/x86_64-linux-gnu/cmake/ITK-5.4/ITKModuleAPI.cmake:143 (_itk_module_config_recurse)
  /usr/lib/x86_64-linux-gnu/cmake/ITK-5.4/ITKConfig.cmake:89 (itk_module_config)
  sdk/cmake/modules/macros/camitk/CamiTKLibrary.cmake:205 (find_package)
  imaging/libraries/itktemplates/CMakeLists.txt:76 (camitk_library)


-- Found NetCDF headers: /usr/include
-- Found NetCDF library: /usr/lib/x86_64-linux-gnu/libnetcdf.so
-- Found Python3: /usr/bin/python3 (found suitable version &quot;3.14.7&quot;, minimum required is &quot;3.14&quot;) found components: Interpreter Development.Module Development.Embed
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version &quot;2.15.3&quot;)
-- Found HDF5: /usr/lib/x86_64-linux-gnu/libhdf5_serial.so (found version &quot;2.2.0&quot;) found components: C HL
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/vtk-9.6/patches/99/FindHDF5.cmake:1123 (message):
  HDF5 was found, but a different variable was set which contains the
  location of the `hdf5::hdf5_hl` library.

The reason I am posting this to the VTK9 package is that it is using a
specific FindHDF5.cmake
I am not sure why VTK may need a specific patch version of
FindHDF5.cmake, but the current one is based on an older version
than the one on the standard path in my sid image:

 /usr/lib/x86_64-linux-gnu/cmake/vtk-9.6/patches/99/FindHDF5.cmake
 /usr/share/cmake-4.3/Modules/FindHDF5.cmake

Is there a way to fix this in the VTK9 package ?

Best regards, 

Manik Bhattacharjee.

-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.8.0-136-generic (SMP w/20 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages vtk9 depends on:
ii  libc6       2.43-5
ii  libgcc-s1   16.2.0-2
ii  libstdc++6  16.2.0-2
ii  libvtk9.6   9.6.2+dfsg1-5

vtk9 recommends no packages.

Versions of packages vtk9 suggests:
pn  vtk9-doc       &lt;none&gt;
pn  vtk9-examples  &lt;none&gt;

-- no debconf information
]