Debian Bug report logs - #959493
cmake: ignores CXXFLAGS when building CMakeCXXCompilerABI.cpp, causes blhc error

version graph

Package: cmake; Maintainer for cmake is Debian CMake Team <pkg-cmake-team@lists.alioth.debian.org>; Source for cmake is src:cmake (PTS, buildd, popcon).

Affects: debhelper

Reported by: nicoo <nicoo@debian.org>

Date: Sat, 2 May 2020 23:12:02 UTC

Severity: normal

Tags: upstream

Merged with 653916, 667941

Found in versions cmake/2.8.5-1, cmake/2.8.7-3

Done: Timo Röhling <roehling@debian.org>

Bug is archived. No further changes may be made.

Forwarded to https://gitlab.kitware.com/cmake/cmake/-/issues/20631

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, andreas@noteng.no, Debian CMake Team <pkg-cmake-team@lists.alioth.debian.org>:
Bug#959493; Package src:cmake. (Sat, 02 May 2020 23:12:04 GMT) (full text, mbox, link).


Acknowledgement sent to nicoo <nicoo@debian.org>:
New Bug report received and forwarded. Copy sent to andreas@noteng.no, Debian CMake Team <pkg-cmake-team@lists.alioth.debian.org>. (Sat, 02 May 2020 23:12:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: nicoo <nicoo@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: cmake: ignores CXXFLAGS when building CMakeCXXCompilerABI.cpp, causes blhc error
Date: Sun, 03 May 2020 01:09:15 +0200
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



Bug 959493 cloned as bug 959494 Request was from nicoo <nicoo@debian.org> to submit@bugs.debian.org. (Sat, 02 May 2020 23:12:04 GMT) (full text, mbox, link).


Added indication that 959493 affects debhelper Request was from nicoo <nicoo@debian.org> to submit@bugs.debian.org. (Sat, 02 May 2020 23:12:09 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian CMake Team <pkg-cmake-team@lists.alioth.debian.org>:
Bug#959493; Package src:cmake. (Sat, 22 May 2021 09:21:02 GMT) (full text, mbox, link).


Acknowledgement sent to Raul Tambre <raul@tambre.ee>:
Extra info received and forwarded to list. Copy sent to Debian CMake Team <pkg-cmake-team@lists.alioth.debian.org>.

Your message did not contain a Subject field. They are recommended and useful because the title of a Bug is determined using this field. Please remember to include a Subject field in your messages in future.

(Sat, 22 May 2021 09:21:02 GMT) (full text, mbox, link).


Message #14 received at 959493@bugs.debian.org (full text, mbox, reply):

From: Raul Tambre <raul@tambre.ee>
To: 959493@bugs.debian.org
Date: Sat, 22 May 2021 12:08:20 +0300
Has an upstream issue been filed for this?



Message sent on to nicoo <nicoo@debian.org>:
Bug#959493. (Tue, 14 Sep 2021 15:51:08 GMT) (full text, mbox, link).


Message #17 received at 959493-submitter@bugs.debian.org (full text, mbox, reply):

From: Timo Röhling <roehling@debian.org>
To: 959493-submitter@bugs.debian.org
Subject: Re: cmake: ignores CXXFLAGS when building CMakeCXXCompilerABI.cpp, causes blhc error
Date: Tue, 14 Sep 2021 17:39:25 +0200
[Message part 1 (text/plain, inline)]
On Sun, 03 May 2020 01:09:15 +0200 nicoo <nicoo@debian.org> wrote:
> 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, ...
Are you sure you have diagnosed this issue correctly?

According to the CMake manual:
> CMAKE_AUTOGEN_VERBOSE
>
> Sets the verbosity of AUTOMOC, AUTOUIC and AUTORCC. A positive
> integer value or a true boolean value lets the AUTO* generators
> output additional processing information.
>
> Setting CMAKE_AUTOGEN_VERBOSE has the same effect as setting the
> VERBOSE environment variable during generation (e.g. by calling
> make VERBOSE=1). The extra verbosity is limited to the AUTO*
> generators though.

So this variable has no effect as debhelper sets VERBOSE=1 anyway,
and even if it had, it would not affect the internal compiler test
builds.

Cheers
Timo

-- 
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian CMake Team <pkg-cmake-team@lists.alioth.debian.org>:
Bug#959493; Package src:cmake. (Wed, 15 Sep 2021 10:48:05 GMT) (full text, mbox, link).


Acknowledgement sent to Timo Röhling <roehling@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian CMake Team <pkg-cmake-team@lists.alioth.debian.org>. (Wed, 15 Sep 2021 10:48:05 GMT) (full text, mbox, link).


Message #22 received at 959493@bugs.debian.org (full text, mbox, reply):

From: Timo Röhling <roehling@debian.org>
To: 959493@bugs.debian.org
Subject: Re: cmake: ignores CXXFLAGS when building CMakeCXXCompilerABI.cpp, causes blhc error
Date: Wed, 15 Sep 2021 12:34:18 +0200
[Message part 1 (text/plain, inline)]
Control: severity 959493 normal
Control: reassign 959493 cmake
Control: forcemerge 959493 653916

On Tue, 14 Sep 2021 17:39:25 +0200 Timo =?utf-8?Q?R=C3=B6hling?= <roehling@debian.org> wrote:
> On Sun, 03 May 2020 01:09:15 +0200 nicoo <nicoo@debian.org> wrote:
> Are you sure you have diagnosed this issue correctly?
> 
> According to the CMake manual:
> > CMAKE_AUTOGEN_VERBOSE
> >
> > Sets the verbosity of AUTOMOC, AUTOUIC and AUTORCC. A positive
> > integer value or a true boolean value lets the AUTO* generators
> > output additional processing information.
> >
> > Setting CMAKE_AUTOGEN_VERBOSE has the same effect as setting the
> > VERBOSE environment variable during generation (e.g. by calling
> > make VERBOSE=1). The extra verbosity is limited to the AUTO*
> > generators though.
> 
> So this variable has no effect as debhelper sets VERBOSE=1 anyway,
> and even if it had, it would not affect the internal compiler test
> builds.

I think this issue is a duplicate of #653916.


-- 
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯
[signature.asc (application/pgp-signature, inline)]

Severity set to 'normal' from 'important' Request was from Timo Röhling <roehling@debian.org> to 959493-submit@bugs.debian.org. (Wed, 15 Sep 2021 10:48:05 GMT) (full text, mbox, link).


Bug reassigned from package 'src:cmake' to 'cmake'. Request was from Timo Röhling <roehling@debian.org> to 959493-submit@bugs.debian.org. (Wed, 15 Sep 2021 10:48:06 GMT) (full text, mbox, link).


No longer marked as found in versions cmake/3.16.3-2. Request was from Timo Röhling <roehling@debian.org> to 959493-submit@bugs.debian.org. (Wed, 15 Sep 2021 10:48:06 GMT) (full text, mbox, link).


Marked as found in versions cmake/2.8.7-3 and cmake/2.8.5-1. Request was from Timo Röhling <roehling@debian.org> to 959493-submit@bugs.debian.org. (Wed, 15 Sep 2021 10:48:07 GMT) (full text, mbox, link).


Merged 653916 667941 959493 Request was from Timo Röhling <roehling@debian.org> to 959493-submit@bugs.debian.org. (Wed, 15 Sep 2021 10:48:09 GMT) (full text, mbox, link).


Set Bug forwarded-to-address to 'https://gitlab.kitware.com/cmake/cmake/-/issues/20631'. Request was from Timo Röhling <roehling@debian.org> to control@bugs.debian.org. (Wed, 15 Sep 2021 10:57:03 GMT) (full text, mbox, link).


Message #35 received at 653916-done@bugs.debian.org (full text, mbox, reply):

From: Timo Röhling <roehling@debian.org>
To: 653916-done@bugs.debian.org
Subject: CPPFLAGS will not be supported by upstream
Date: Mon, 18 Oct 2021 16:36:55 +0200
[Message part 1 (text/plain, inline)]
Control: tag -1 + wontfix

Upstream has stated that CPPFLAGS will not be supported because of
its ill-defined use with different compilers for different languages:

https://gitlab.kitware.com/cmake/cmake/-/issues/20631#note_757166

Cheers
Timo


-- 
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 16 Nov 2021 07:25:32 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Sep 19 23:19:02 2022; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.