[Pkg-cmake-team] Bug#1150412: file utility needed for --find-package command-line option on some 64-bit archs

Sébastien Villemot sebastien at debian.org
Fri Oct 9 11:22:53 BST 2026


Package: cmake
Version: 4.3.4-1
Severity: normal
X-Debbugs-Cc: sebastien at debian.org

Dear Maintainer,

When running cmake on the command-line with the --find-package option, a
heuristic is used to determine CMAKE_SIZEOF_VOID_P without using a compiler
(see /usr/share/cmake-<version>/Modules/CMakeFindPackageMode.cmake).

If /usr/lib64 exists, then a size of 8 bytes is assumed. But some of our
architectures (riscv64 and s390x at least) don’t have that directory. In that
case, CMake falls back to a detection using the file utility, and if that
utility is not present on the system, a size of 4 bytes is assumed.

This means that cmake --find-package will detect the wrong pointer size on
riscv64 and s390x in a minimal chroot such as one used in autopkgtest (which is
what happened to me with the tasmanian package, where testing of the CMake
config-file package works on amd64 but fails on s390x in version 8.2-3).

This tends to suggest that the file package should be added as a dependency of
cmake, to avoid such a situation.

Thanks for your work,

--
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  https://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀  https://www.debian.org


More information about the Pkg-cmake-team mailing list