#1145144 camitk: FTBFS: HDF5 was found, but a different variable was set which contains the location of the `hdf5::hdf5_hl` library.

Package:
src:camitk
Source:
src:camitk
Submitter:
Santiago Vila
Date:
2026-09-08 17:09:02 UTC
Severity:
normal
Tags:
#1145144#5
Date:
2026-08-23 10:05:17 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202608/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:camitk, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
-- Found HDF5: /usr/lib/x86_64-linux-gnu/libhdf5_serial.so (found version "2.2.0") 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)

#1145144#10
Date:
2026-09-08 17:06:18 UTC
From:
To:
Thank you for the bug report.
After some investigation we found out this is due to a change in the
latest ITK and VTK packages that now require HDF5 in two incompatible ways.
ITK uses the standard path of FindHDF5.cmake, VTK a custom patch based
on an older version.

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

A minimal CMakeLists.txt file can reproduce the issue without camitk:

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)

Calling "cmake -S . -B build" in the directory containing this file will show the conflict.

Bug #1147167 has been posted to VTK9 package to explain the issue in more detail : https://bugs.debian.org/1147167

A workaround is being implemented as a patch to the package but there are still some issues with it that will hopefully be resolved soon.

M%anik Bhattacharjee