[Pkg-cmake-team] Bug#959493: cmake: ignores CXXFLAGS when building CMakeCXXCompilerABI.cpp, causes blhc error

nicoo nicoo at debian.org
Sun May 3 00:09:15 BST 2020


Package: src:cmake
Version: 3.16.3-2
Severity: important
Tags: upstream
Control: clone -1 -2
Control: reassign -2 debhelper
Control: retitle  -2 debhelper: Do not set CMAKE_AUTOGEN_VERBOSE=NO
Control: severity -2 normal
Control: found -2 12.10
Control: found -2 13
Control: affects -1 debhelper

Dear maintainers,


CMake compiles /usr/share/cmake-*/Modules/CMakeCXXCompilerABI.cpp during the
build of a C++ projects, several times, and ignoring the CXXFLAGS.
This behaviour is likely defined in
 /usr/share/cmake-*/Modules/{CMakeTestCXXCompiler,Compiler/{Intel,GNU,QCC}}.cmake

In addition to being a (presumably benign?) correctness issue, this is about to
become a notable inconvenience for maintainers of C++ packages in Debian whose
buildsystem is CMake:
- starting in debhelper 12.10 (uploaded 2020-03-24), CMAKE_AUTOGEN_VERBOSE=ON
  is set by default for all packages that use CMake ;
- CMake then logs the compiler invocations for CMakeCXXCompilerABI.cpp;
- blhc (build log hardening checker) raises (correctly so) an error,
  as C++ code was built without the required flags.
- the blhc failure is surfaced to the maintainer in many places:
  Salsa CI, tracker.d.o, qa.d.o, ...

After discussion with nthykier, he suggested rolling back the change in dh
(commit 2f88a603001a32b596389b8b031489960e30a9e9) until this issue is fixed
in CMake.  As such I am leaving a copy of this bug report against dh.


Many thanks to Andreas Noteng, whose package scantailor-advanced (which I
am sponsoring) is where I first encountered the issue, and who bissected
the problem down to that specific commit in debhelper.


Best,

  nicoo

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.5.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cmake depends on:
ii  cmake-data    3.16.3-2
ii  libarchive13  3.4.0-2
ii  libc6         2.30-4
ii  libcurl4      7.68.0-1
ii  libexpat1     2.2.9-1
ii  libgcc-s1     10-20200418-1
ii  libjsoncpp1   1.7.4-3.1
ii  librhash0     1.3.9-1
ii  libstdc++6    10-20200418-1
ii  libuv1        1.35.0-2
ii  procps        2:3.3.16-4
ii  zlib1g        1:1.2.11.dfsg-2

Versions of packages cmake recommends:
ii  gcc   4:9.2.1-3.1
ii  make  4.2.1-1.2

Versions of packages cmake suggests:
pn  cmake-doc    <none>
ii  ninja-build  1.10.0-1

-- no debconf information



More information about the Pkg-cmake-team mailing list