Debian Bug report logs - #986206
qmake drops options passed from QMAKE_CXXFLAGS_RELEASE and QMAKE_CXXFLAGS_DEBUG

version graph

Package: src:guymager; Maintainer for src:guymager is Debian Security Tools <[email protected]>;

Reported by: Matthias Klose <[email protected]>

Date: Wed, 31 Mar 2021 15:33:02 UTC

Severity: important

Tags: bookworm, bullseye, sid, trixie

Found in version guymager/0.8.12-1

Reply or subscribe to this bug.

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


Report forwarded to [email protected], Debian Qt/KDE Maintainers <[email protected]>:
Bug#986206; Package qt5-qmake. (Wed, 31 Mar 2021 15:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Matthias Klose <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian Qt/KDE Maintainers <[email protected]>. (Wed, 31 Mar 2021 15:33:03 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Matthias Klose <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: qmake drops options passed from QMAKE_CXXFLAGS_RELEASE and QMAKE_CXXFLAGS_DEBUG
Date: Wed, 31 Mar 2021 17:30:17 +0200
Package: qt5-qmake
Version: 5.15.2+dfsg-5
Severity: serious
Tags: sid bullseye

seen when building guymager, adding to the rules file:

export DEB_CXXFLAGS_MAINT_APPEND = --param ggc-min-expand=0 --param
ggc-min-heapsize=0


The generated Makefile isn't correctly generated. The "# Command" line shows the
passed args, which are correct, however the "^CXXFLAGS" line shows that the
flags are expanded twice, and the first time, the second --param option is
omitted, but not the parameter following that option.

Feel free to reassign to guymager and lowering the severity, if that is not a
generic qmake issue.


$ fgrep -- --param Makefile
# Command: /usr/lib/qt5/bin/qmake -o Makefile guymager.pro
'QMAKE_CFLAGS_RELEASE=-g -O2 -ffile-prefix-map=/packages/tmp/guymager-0.8.12=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2' 'QMAKE_CFLAGS_DEBUG=-g -O2
-ffile-prefix-map=/packages/tmp/guymager-0.8.12=. -fstack-protector-strong
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2'
'QMAKE_CXXFLAGS_RELEASE=-g -O2 -ffile-prefix-map=/packages/tmp/guymager-0.8.12=.
-fstack-protector-strong -Wformat -Werror=format-security --param
ggc-min-expand=0 --param ggc-min-heapsize=0 -Wdate-time -D_FORTIFY_SOURCE=2'
'QMAKE_CXXFLAGS_DEBUG=-g -O2 -ffile-prefix-map=/packages/tmp/guymager-0.8.12=.
-fstack-protector-strong -Wformat -Werror=format-security --param
ggc-min-expand=0 --param ggc-min-heapsize=0 -Wdate-time -D_FORTIFY_SOURCE=2'
QMAKE_LFLAGS_RELEASE=-Wl,-z,relro QMAKE_LFLAGS_DEBUG=-Wl,-z,relro QMAKE_STRIP=:
PREFIX=/usr 'DEFINES+=SPLASH_DIR=\'\''\"/usr/share/guymager\"\'\''
LANGUAGE_DIR=\'\''\"/usr/share/guymager\"\'\''
LANGUAGE_DIR_QT=\'\''\"/usr/share/qt5/translations\"\'\'''
CXXFLAGS      = -pipe -g -O2 -ffile-prefix-map=/packages/tmp/guymager-0.8.12=.
-fstack-protector-strong -Wformat -Werror=format-security --param
ggc-min-expand=0 ggc-min-heapsize=0 -fmessage-length=0 -fno-strict-aliasing
-flto -g -ffile-prefix-map=/packages/tmp/guymager-0.8.12=.
-fstack-protector-strong -Wformat -Werror=format-security --param
ggc-min-expand=0 --param ggc-min-heapsize=0 -Wdate-time -D_FORTIFY_SOURCE=2 -O3
-ggdb -std=gnu++1y -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES)
        $(QMAKE) -o Makefile guymager.pro 'QMAKE_CFLAGS_RELEASE=-g -O2
-ffile-prefix-map=/packages/tmp/guymager-0.8.12=. -fstack-protector-strong
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2'
'QMAKE_CFLAGS_DEBUG=-g -O2 -ffile-prefix-map=/packages/tmp/guymager-0.8.12=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_RELEASE=-g -O2
-ffile-prefix-map=/packages/tmp/guymager-0.8.12=. -fstack-protector-strong
-Wformat -Werror=format-security --param ggc-min-expand=0 --param
ggc-min-heapsize=0 -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_DEBUG=-g -O2
-ffile-prefix-map=/packages/tmp/guymager-0.8.12=. -fstack-protector-strong
-Wformat -Werror=format-security --param ggc-min-expand=0 --param
ggc-min-heapsize=0 -Wdate-time -D_FORTIFY_SOURCE=2'
QMAKE_LFLAGS_RELEASE=-Wl,-z,relro QMAKE_LFLAGS_DEBUG=-Wl,-z,relro QMAKE_STRIP=:
PREFIX=/usr 'DEFINES+=SPLASH_DIR=\'\''\"/usr/share/guymager\"\'\''
LANGUAGE_DIR=\'\''\"/usr/share/guymager\"\'\''
LANGUAGE_DIR_QT=\'\''\"/usr/share/qt5/translations\"\'\'''
        @$(QMAKE) -o Makefile guymager.pro 'QMAKE_CFLAGS_RELEASE=-g -O2
-ffile-prefix-map=/packages/tmp/guymager-0.8.12=. -fstack-protector-strong
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2'
'QMAKE_CFLAGS_DEBUG=-g -O2 -ffile-prefix-map=/packages/tmp/guymager-0.8.12=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_RELEASE=-g -O2
-ffile-prefix-map=/packages/tmp/guymager-0.8.12=. -fstack-protector-strong
-Wformat -Werror=format-security --param ggc-min-expand=0 --param
ggc-min-heapsize=0 -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_DEBUG=-g -O2
-ffile-prefix-map=/packages/tmp/guymager-0.8.12=. -fstack-protector-strong
-Wformat -Werror=format-security --param ggc-min-expand=0 --param
ggc-min-heapsize=0 -Wdate-time -D_FORTIFY_SOURCE=2'
QMAKE_LFLAGS_RELEASE=-Wl,-z,relro QMAKE_LFLAGS_DEBUG=-Wl,-z,relro QMAKE_STRIP=:
PREFIX=/usr 'DEFINES+=SPLASH_DIR=\'\''\"/usr/share/guymager\"\'\''
LANGUAGE_DIR=\'\''\"/usr/share/guymager\"\'\''
LANGUAGE_DIR_QT=\'\''\"/usr/share/qt5/translations\"\'\'''
        g++ -pipe -g -O2 -ffile-prefix-map=/packages/tmp/guymager-0.8.12=.
-fstack-protector-strong -Wformat -Werror=format-security --param
ggc-min-expand=0 ggc-min-heapsize=0 -fmessage-length=0 -fno-strict-aliasing
-flto -g -ffile-prefix-map=/packages/tmp/guymager-0.8.12=.
-fstack-protector-strong -Wformat -Werror=format-security --param
ggc-min-expand=0 --param ggc-min-heapsize=0 -Wdate-time -D_FORTIFY_SOURCE=2 -O3
-ggdb -std=gnu++1y -Wall -Wextra -dM -E -o moc/moc_predefs.h
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp



Information forwarded to [email protected], Debian Qt/KDE Maintainers <[email protected]>:
Bug#986206; Package qt5-qmake. (Wed, 31 Mar 2021 16:57:02 GMT) (full text, mbox, link).


Acknowledgement sent to Dmitry Shachnev <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Qt/KDE Maintainers <[email protected]>. (Wed, 31 Mar 2021 16:57:02 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Dmitry Shachnev <[email protected]>
To: Matthias Klose <[email protected]>, [email protected]
Subject: Re: Bug#986206: qmake drops options passed from QMAKE_CXXFLAGS_RELEASE and QMAKE_CXXFLAGS_DEBUG
Date: Wed, 31 Mar 2021 19:56:04 +0300
Control: reassign -1 src:guymager 0.8.12-1
Control: severity -1 important

Hi Matthias!

On Wed, Mar 31, 2021 at 05:30:17PM +0200, Matthias Klose wrote:
> seen when building guymager, adding to the rules file:
>
> export DEB_CXXFLAGS_MAINT_APPEND = --param ggc-min-expand=0 --param
> ggc-min-heapsize=0
>
> The generated Makefile isn't correctly generated. The "# Command" line shows the
> passed args, which are correct, however the "^CXXFLAGS" line shows that the
> flags are expanded twice, and the first time, the second --param option is
> omitted, but not the parameter following that option.

This happens because guymager.pro line 150 has this:

  QMAKE_CXXFLAGS *= $$system(dpkg-buildflags --get CXXFLAGS)

The *= operator is for adding unique values (as opposed to +=). The --param
flag appears twice, so it keeps only the first instance:

https://doc.qt.io/qt-5/qmake-language.html#adding-unique-values

You can use --param=ggc-min-expand=0 --param=ggc-min-heapsize=0, then there
will be no such problem.

Also there is no need at all to call dpkg-buildflags from the .pro file.
debhelper passes all needed flags via command line arguments.

> Feel free to reassign to guymager and lowering the severity, if that is not
> a generic qmake issue.

Doing so.

Dear guymager maintainer(s): please consider removing lines 150 and 151 from
guymager.pro, or at least replacing *= with +=.

--
Dmitry Shachnev



Bug reassigned from package 'qt5-qmake' to 'src:guymager'. Request was from Dmitry Shachnev <[email protected]> to [email protected]. (Wed, 31 Mar 2021 16:57:02 GMT) (full text, mbox, link).


No longer marked as found in versions qtbase-opensource-src/5.15.2+dfsg-5. Request was from Dmitry Shachnev <[email protected]> to [email protected]. (Wed, 31 Mar 2021 16:57:03 GMT) (full text, mbox, link).


Marked as found in versions guymager/0.8.12-1. Request was from Dmitry Shachnev <[email protected]> to [email protected]. (Wed, 31 Mar 2021 16:57:03 GMT) (full text, mbox, link).


Severity set to 'important' from 'serious' Request was from Dmitry Shachnev <[email protected]> to [email protected]. (Wed, 31 Mar 2021 16:57:04 GMT) (full text, mbox, link).


Added tag(s) bookworm. Request was from Sebastian Ramacher <[email protected]> to [email protected]. (Mon, 16 Aug 2021 07:08:55 GMT) (full text, mbox, link).


Added tag(s) trixie. Request was from Sebastian Ramacher <[email protected]> to [email protected]. (Sun, 11 Jun 2023 15:43:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 12:32:25 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General 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.