Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 652172 - dev-qt/qtwebengine:5 CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS not respected for most of the build
Summary: dev-qt/qtwebengine:5 CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS not respected for mos...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
Keywords: PullRequest
: 697594 748237 (view as bug list)
Depends on: 649420 630834
Blocks: cflags tc-directly ldflags
  Show dependency tree
Reported: 2018-04-01 22:37 UTC by Alexander Miller
Modified: 2023-10-20 13:44 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Miller 2018-04-01 22:37:38 UTC
Here are some numbers obtained by grepping the build log:

First, for gn bootstrapping, ninja doesn't run in verbose mode, so I can't see the command lines. I count 308 + 16 invocations of CXX + CC and I think they respect the flags.

Then, gn is rebuilt using itself, and again ninja isn't verbose. There are 533 + 73 invocations of CXX + CC, but this time I believe they don't respect the flags. (I looked at one object file in each case for clues.)

During the main ninja run, there are 12277 and 667 invocations of /usr/bin/x86_64-pc-linux-gnu-g++ and /usr/bin/x86_64-pc-linux-gnu-gcc, respectively. With CXX and CC, there should be no path. More importantly, only 91 and zero use the proper *FLAGS values. 13 g++ invocations do linking and none of them respects LDFLAGS.

Finally there are 82 invocations of x86_64-pc-linux-gnu-g++ directly from make which do respect all flags. 7 of them do linking.

In summary, only a tiny fraction of the files get built with the correct *FLAGS. Almost everything generated with gn doesn't respect them. All the stuff inherited from chromium doesn't. Interestingly, there are a few qt-specific files with the *FLAGS applied in the gn generated batch; they could give a clue how the flags could be handled for the rest.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2018-04-03 03:43:28 UTC
(In reply to Alexander Miller from comment #0)
> for gn bootstrapping, ninja doesn't run in verbose mode, so I can't
> see the command lines.

Patch #1 from patchset in bug #630834 should increase verbosity.
Comment 2 Andreas Sturmlechner gentoo-dev 2019-10-13 13:59:11 UTC
*** Bug 697594 has been marked as a duplicate of this bug. ***
Comment 3 Agostino Sarubbo gentoo-dev 2021-03-24 13:27:10 UTC
*** Bug 748237 has been marked as a duplicate of this bug. ***
Comment 4 Agostino Sarubbo gentoo-dev 2023-06-14 07:29:26 UTC
ci has reproduced this issue with version 6.5.1 - Updating summary.
Comment 5 Agostino Sarubbo gentoo-dev 2023-07-25 07:21:00 UTC
ci has reproduced this issue with version 6.5.2 - Updating summary.
Comment 6 Larry the Git Cow gentoo-dev 2023-09-05 13:05:46 UTC
The bug has been referenced in the following commit(s):

commit d1b8e8ef131c26a47369bf8d03f372714a535308
Author:     Ionen Wolkens <>
AuthorDate: 2023-08-31 21:09:34 +0000
Commit:     Ionen Wolkens <>
CommitDate: 2023-09-05 13:01:10 +0000

    dev-qt/qtwebengine: refactor qt6 ebuild, various fixes incl. musl
    Essentially a rewrite, so only have a not exhaustive summary
    of changes rather than split commits.
    Bugs addressed:
    * respect *FLAGS wrt bug #652172 (fwics should be no issues left)
    * hopefully fixed musl/libcxx (tested with llvm-musl) wrt bug #876520
    (not planning to review Qt5's myself, so no changes on that end)
    IUSE changes:
    * enable alsa by default, finding that you have no audio options
      only after building is not great and alsa is cheap
    * enable widgets by default, needed by both falkon and qutebrowser
    * add custom-cflags, if going to use *FLAGS then should strip-flags
      like chromium's ebuild
    * add opengl, unfortunately littered in QT_CONFIG(opengl) and need
      qtbase[opengl=] to avoid ABI/automagic issues
    * add vulkan, has its own feature so should only need qtbase[vulkan?]
    * add qml similarly to other packages
    * support EXTRA_GN like qtwebengine:5 and chromium (Gentoo-specific)
    * build dir went from >9GB to ~6.3GB by dropping -g1
    * drop estack+extglob, setting extglob is technically not needed for
      use in bash [[ ]] tests which is-flagq does
    * drop INCLUDEPATH, tried to sed qmake files but this is using cmake
    * respect NINJA env var to allow samu (NINJA_PATH was a no-op)
    * use get_NINJAOPTS for NINJAFLAGS and ignore environment (NINJAOPTS
      is the var to set for this, while NINJAFLAGS is a private
      qtwebengine var, ninja does not actually use this directly)
    * drop icu's bundling check for simplicity (and consistency with other
      system libraries), bug #630834 prompted adding this but does not
      seem so fragile anymore (plus iwdevtools would report lib misuse,
      albeit not headers)
    * switch to bundled re2 to be spared headaches (see github PR#32281)
    * optfeature on chrome-binary-plugins for widevine support
    * cleanup/reduce QT_FEATURE and old comments
    * fix designer automagic
    * various dependencies adjustments, wrt re2c that is only needed if
      we build ninja
    * do not redefine _FORTIFY_SOURCE (use gentoo's defaults), upstream
      actually switched to =3 in chromium-118 (albeit only for ChromeOS)
      and "hopefully" is fine for this older version (tests pass at least)
    Also moved patches to a tarball (like qt5). It is simple small patches
    mostly adjusting macros rather than add actual code, but was beginning
    to add up.
    Considered reducing RAM requirements a little bit (generally *seems*
    not so bad), but there is rather bad spikes and I do not think it can
    be considered safe unless we assume everyone is not using RAM for
    anything else. Plus usage will likely keep growing with versions.
    Signed-off-by: Ionen Wolkens <>

 dev-qt/qtwebengine/Manifest                    |   1 +
 dev-qt/qtwebengine/metadata.xml                |   1 +
 dev-qt/qtwebengine/qtwebengine-6.5.2-r1.ebuild | 267 +++++++++++++++++++++++++
 dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild | 252 ++++++++++++-----------
 dev-qt/qtwebengine/qtwebengine-6.9999.ebuild   | 252 ++++++++++++-----------
 5 files changed, 517 insertions(+), 256 deletions(-)