Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 930107 - dev-qt/qtwebengine:* fails to build with dev-build/ninja-1.12.0 (spellcheck_buildflags.h: No such file or directory)
Summary: dev-qt/qtwebengine:* fails to build with dev-build/ninja-1.12.0 (spellcheck_b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://bugreports.qt.io/browse/QTBUG...
Whiteboard:
Keywords: PATCH
: 930190 930245 930465 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-04-16 11:22 UTC by Oleksa
Modified: 2024-04-29 23:51 UTC (History)
15 users (show)

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


Attachments
qtwebengine-6.7.0-spellcheck-race.patch (qtwebengine-6.7.0-spellcheck-race.patch,388 bytes, patch)
2024-04-16 12:29 UTC, Ionen Wolkens
Details | Diff
qtwebengine-6.7.0 build log (error) (qtwebengine-6.7.0_Error_Build_Log.bz2,985.23 KB, application/x-bzip)
2024-04-16 14:29 UTC, Oleksa
Details
ninja1.12-displaykey.patch (ninja1.12-displaykey.patch,724 bytes, patch)
2024-04-16 20:17 UTC, Ionen Wolkens
Details | Diff
patch for qt-5 (qtwebengine-5.15.2-ninja1.12.patch,699 bytes, patch)
2024-04-21 10:06 UTC, Vova
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleksa 2024-04-16 11:22:41 UTC
It is error while compile dev-qt/qtwebengine-6.7.0

Looks like today was released some update for another package(s), because this is new error 

../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/content/public/browser/browser_context.h:20:10: fatal error: components/spellcheck/spellcheck_buildflags.h: No such file or directory
   20 | #include "components/spellcheck/spellcheck_buildflags.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Please investigate and fix.

Thanks!
Comment 1 Ionen Wolkens gentoo-dev 2024-04-16 11:50:11 UTC
Can't reproduce, but probably a race condition that's the same as $URL.
Comment 2 Ionen Wolkens gentoo-dev 2024-04-16 12:29:04 UTC
Created attachment 890945 [details, diff]
qtwebengine-6.7.0-spellcheck-race.patch

Could you try the attached patch? It takes the suggestion from the upstream bug (hopefully did this right, I hardly know Gn).

Albeit if it's a race condition it'll be hard to say if it really helped even if it builds.
Comment 3 Ionen Wolkens gentoo-dev 2024-04-16 12:41:34 UTC
(also, if it fails again, please provide the full compressed build.log)
Comment 4 Ionen Wolkens gentoo-dev 2024-04-16 12:46:25 UTC
Ah, upstream issue now points out it may be due to ninja-1.12.0 -- odds are the patch won't work then.

Downgrading ninja will most likely solve you problem as a temporary workaround.

No wonder I can't reproduce given I'm using samurai instead.
Comment 5 Ionen Wolkens gentoo-dev 2024-04-16 12:52:06 UTC
CC'ing dev-build/ninja maintainers as a fyi, will likely set a temporary upper bound while it's being looked at.
Comment 6 Ionen Wolkens gentoo-dev 2024-04-16 13:16:00 UTC
(In reply to Ionen Wolkens from comment #5)
> CC'ing dev-build/ninja maintainers as a fyi, will likely set a temporary
> upper bound while it's being looked at.
... but seeing how the patch is sufficient for Qt5 (but there's more to fix for Qt6), odds are this is the Gn dependencies that are wrong rather than ninja.

Maybe will try to fix it properly instead, albeit it'll take a bit due to reset ccache.
Comment 7 Oleksa 2024-04-16 13:31:48 UTC
(In reply to Ionen Wolkens from comment #6)
> (In reply to Ionen Wolkens from comment #5)
> > CC'ing dev-build/ninja maintainers as a fyi, will likely set a temporary
> > upper bound while it's being looked at.
> ... but seeing how the patch is sufficient for Qt5 (but there's more to fix
> for Qt6), odds are this is the Gn dependencies that are wrong rather than
> ninja.
> 
> Maybe will try to fix it properly instead, albeit it'll take a bit due to
> reset ccache.

Ionen, thank You very much for patch!

Firstly, I've reverted (downgraded) ninja to 1.11.1-r5, but error was live

Seems only patch helped - system "jumped over" error and qtwebengine-6.7.0 still compile - still to process ~5428 files, I'll report soon about final result.
Comment 8 Oleksa 2024-04-16 14:24:25 UTC
(In reply to Oleksa from comment #7)
> (In reply to Ionen Wolkens from comment #6)
> > (In reply to Ionen Wolkens from comment #5)
> > > CC'ing dev-build/ninja maintainers as a fyi, will likely set a temporary
> > > upper bound while it's being looked at.
> > ... but seeing how the patch is sufficient for Qt5 (but there's more to fix
> > for Qt6), odds are this is the Gn dependencies that are wrong rather than
> > ninja.
> > 
> > Maybe will try to fix it properly instead, albeit it'll take a bit due to
> > reset ccache.
> 
> Ionen, thank You very much for patch!
> 
> Firstly, I've reverted (downgraded) ninja to 1.11.1-r5, but error was live
> 
> Seems only patch helped - system "jumped over" error and qtwebengine-6.7.0
> still compile - still to process ~5428 files, I'll report soon about final
> result.


Unfortunately, compilation failed again, but with another error
I am not sure has this error the same root of reason or no.

-----

In file included from ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/ui/gl/gl_surface.h:28,
                 from ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/ui/gl/gl_context.h:24,
                 from ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/tools/v8_context_snapshot/qt_overrides.cc:10:
../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/ui/gl/gl_display.h:89:3: error: ‘DisplayKey’ does not name a type
   89 |   DisplayKey display_key() const { return display_key_; }
      |   ^~~~~~~~~~
../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/ui/gl/gl_display.h:104:13: error: ‘DisplayKey’ has not been declared
  104 |             DisplayKey display_key,
      |             ^~~~~~~~~~
../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/ui/gl/gl_display.h:108:3: error: ‘DisplayKey’ does not name a type
  108 |   DisplayKey display_key_ = DisplayKey::kDefault;
      |   ^~~~~~~~~~
ninja: build stopped: subcommand failed.
FAILED: src/core/RelWithDebInfo/x86_64/webenginedriver src/core/RelWithDebInfo/x86_64/webenginedriver_group /var/tmp/notmpfs/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0_build/src/core/RelWithDebInfo/x86_64/webenginedriver /var/tmp/notmpfs/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0_build/src/core/RelWithDebInfo/x86_64/webenginedriver_group
cd /var/tmp/notmpfs/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0_build/src/core && /usr/bin/ninja -j10 -l0 -v -C /var/tmp/notmpfs/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0_build/src/core/RelWithDebInfo/x86_64 webenginedriver_group
ninja: build stopped: subcommand failed.
Comment 9 Oleksa 2024-04-16 14:29:46 UTC
Created attachment 890946 [details]
qtwebengine-6.7.0 build log (error)

I've attached qtwebengine-6.7.0 build log (with error)
Comment 10 Ionen Wolkens gentoo-dev 2024-04-16 14:33:35 UTC
(In reply to Oleksa from comment #8)
> ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/ui/gl/
> gl_display.h:108:3: error: ‘DisplayKey’ does not name a type
>   108 |   DisplayKey display_key_ = DisplayKey::kDefault;
>       |   ^~~~~~~~~~
> ninja: build stopped: subcommand failed.
I recognize that error, I hit it when I was testing USE=webdriver with (upcoming) qt 6.7.1 but hadn't hit it last time I tested 6.7.0.

Thought it was a 6.7.1 regression but maybe there's something else that caused it to start failing (not ninja anyhow, I hit that even with samurai).
Comment 11 Ionen Wolkens gentoo-dev 2024-04-16 14:49:00 UTC
(In reply to Ionen Wolkens from comment #10)
> (In reply to Oleksa from comment #8)
> > ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/ui/gl/
> > gl_display.h:108:3: error: ‘DisplayKey’ does not name a type
> >   108 |   DisplayKey display_key_ = DisplayKey::kDefault;
> >       |   ^~~~~~~~~~
> > ninja: build stopped: subcommand failed.
> I recognize that error, I hit it when I was testing USE=webdriver with
> (upcoming) qt 6.7.1 but hadn't hit it last time I tested 6.7.0.
> 
> Thought it was a 6.7.1 regression but maybe there's something else that
> caused it to start failing (not ninja anyhow, I hit that even with samurai).
Either way it's most likely just a missing:

    #include "ui/gl/gpu_preference.h"

I'll have a look at same time.
Comment 12 Ionen Wolkens gentoo-dev 2024-04-16 15:18:35 UTC
Haven't tried it but pretty sure Qt5 is affected too from other reports (chromium itself is too wrt bug #930112), adjusting summary. Albeit I'll only be looking at Qt6.
Comment 13 Oleksa 2024-04-16 17:16:58 UTC
Another error occur:

In file included from ./../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/extensions/browser/api/web_request/web_request_api_helpers.cc:31,
                 from gen/extensions/browser/browser_sources_jumbo_8.cc:11:
../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/components/web_cache/browser/web_cache_manager.h:20:10: fatal error: components/web_cache/public/mojom/web_cache.mojom.h: No such file or directory
   20 | #include "components/web_cache/public/mojom/web_cache.mojom.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Comment 14 Ionen Wolkens gentoo-dev 2024-04-16 17:27:32 UTC
Yeah I know that one, already updated the patch and just waiting for build tests to finish.
Comment 15 Ionen Wolkens gentoo-dev 2024-04-16 17:31:29 UTC
(In reply to Ionen Wolkens from comment #14)
> Yeah I know that one, already updated the patch and just waiting for build
> tests to finish.
Which failed because there's yet another error after that :)
Comment 16 Ionen Wolkens gentoo-dev 2024-04-16 20:17:48 UTC
Created attachment 890950 [details, diff]
ninja1.12-displaykey.patch

(In reply to Ionen Wolkens from comment #15)
> (In reply to Ionen Wolkens from comment #14)
> > Yeah I know that one, already updated the patch and just waiting for build
> > tests to finish.
> Which failed because there's yet another error after that :)
Or actually think may be running into something unrelated and need to do a build without ccache to confirm (so be a while).

Attaching the updated (pretty simple) patch meanwhile in case anyone wants to try it.
Comment 17 Ionen Wolkens gentoo-dev 2024-04-16 22:17:24 UTC
The last error I been getting inconsistently is:

    devtools_file_helper.cc:31:10: fatal error: chrome/grit/generated_resources.h: No such file or directory

Seems to happen more often when using filed ccache (aka fast build), but not sure.

...and I don't quite get that one:

1. the dependency *is* present, //chrome:strings -> //chrome/app:generated_resources, adding an explicit app:generated changes nothing

2. the file exists... either it's looking in the wrong location somehow, or it was created right after ninja attempted to use it (possible ninja bug?)

3. May be overlooking something but fwics devtools_file_helper.cc shouldn't even be used due to being behind:

  if (!is_android && !is_qtwebengine) {
    sources += [
      "devtools_file_helper.cc",

And qtwebengine does set is_qtwebengine=true, not that I checked if this is new.

I'll probably push the patch anyway if I can get at least one successful build but well.
Comment 18 Larry the Git Cow gentoo-dev 2024-04-17 00:15:59 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=289d48f871d477edab5f750d307b6cb5eb632331

commit 289d48f871d477edab5f750d307b6cb5eb632331
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-04-16 15:26:02 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-04-17 00:15:23 +0000

    dev-qt/qtwebengine: fix webdriver build under some configurations
    
    Unknown what is causing this to fail exactly, 6.7.0's USE=webdriver
    did build fine with all USE enabled last time tested so it could
    be related to disabling something while relying on transitive headers.
    
    Bug: https://bugs.gentoo.org/930107
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 .../files/qtwebengine-6.7.0-displaykey-header.patch          | 12 ++++++++++++
 dev-qt/qtwebengine/qtwebengine-6.7.0.ebuild                  |  1 +
 dev-qt/qtwebengine/qtwebengine-6.7.9999.ebuild               |  1 +
 3 files changed, 14 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bdf521869a34c0534c644932444435842e8b92a

commit 4bdf521869a34c0534c644932444435842e8b92a
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-04-16 15:20:20 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-04-17 00:15:23 +0000

    dev-qt/qtwebengine: "improve" build with ninja-1.12 (Qt6)
    
    Most likely more issues, but should hopefully work in most cases
    until figure out the rest. Users really having issues may want to
    go back to ~ninja-1.11.1 or even app-alternatives/ninja[samurai]
    which is known to work for this.
    
    (if issues are widespread, may set a ninja upper bound if don't
    find a proper fix at least before the next Qt bump)
    
    Bug: https://bugs.gentoo.org/930107
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 .../files/qtwebengine-6.7.0-ninja1.12.patch        | 26 ++++++++++++++++++++++
 dev-qt/qtwebengine/qtwebengine-6.7.0.ebuild        |  1 +
 dev-qt/qtwebengine/qtwebengine-6.7.9999.ebuild     |  1 +
 3 files changed, 28 insertions(+)
Comment 19 GalCiv 2024-04-17 06:15:23 UTC
I just wanted to point out that the bug is also present in qtwebengine-5.15.13_p20240322, the error is the same. The patched qtwebengine-6.7.0 built correctly.
Comment 20 Ionen Wolkens gentoo-dev 2024-04-17 09:32:17 UTC
(In reply to Ionen Wolkens from comment #17)
> 3. May be overlooking something but fwics devtools_file_helper.cc shouldn't
> even be used due to being behind:
> 
>   if (!is_android && !is_qtwebengine) {
>     sources += [
>       "devtools_file_helper.cc",
> 
Ok, had a second look and this makes more sense now. I was only looking at chromium's BUILD.gn file and forgot to look higher up for qtwebengine's own that have:

    src/core/configure/BUILD.root.gn.in:
        "//chrome/browser/devtools/devtools_file_helper.cc",

Presume that this is where that the dependency is missing while chromium itself has it right. Should be an easy fix.
Comment 21 Ionen Wolkens gentoo-dev 2024-04-17 09:54:06 UTC
Un-CC'ing ninja maintainers, all signs point that this is not a problem with ninja itself and probably does not need further attention.
Comment 22 Larry the Git Cow gentoo-dev 2024-04-17 10:16:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=865b42c15b520af89040fd4a6e6e6c4cd54125c2

commit 865b42c15b520af89040fd4a6e6e6c4cd54125c2
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-04-17 09:47:57 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-04-17 10:16:04 +0000

    dev-qt/qtwebengine: add one more race fix for ninja-1.12 (Qt6)
    
    Bug: https://bugs.gentoo.org/930107
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-qt/qtwebengine/files/qtwebengine-6.7.0-ninja1.12.patch | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
Comment 23 Ionen Wolkens gentoo-dev 2024-04-17 10:16:57 UTC
(In reply to GalCiv from comment #19)
> I just wanted to point out that the bug is also present in
> qtwebengine-5.15.13_p20240322, the error is the same. The patched
> qtwebengine-6.7.0 built correctly.
Yes, dropped a short note in comment #12 too albeit got drowned in other comments, not that I really handle Qt5 myself.

Not tested but afaik it only need one line like noted in [1]. Unsure if other things I ran into with Qt6 affect it without looking at the source (the devtools/generated_resources one might, albeit that one is more random).

[1] https://github.com/ninja-build/ninja/issues/2417#issuecomment-2059047539
Comment 24 Attila Tóth 2024-04-17 11:16:52 UTC
qtwebengine-5.15 is also affected. The last hunk must be removed, because that file does not exist in case of 5.15.
Thanks: Dw.
Comment 25 Jan Essert 2024-04-18 08:30:53 UTC
*** Bug 930190 has been marked as a duplicate of this bug. ***
Comment 26 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-18 08:33:57 UTC
(In reply to Attila Tóth from comment #24)

Yes, that was already noted above.
Comment 27 Ionen Wolkens gentoo-dev 2024-04-19 12:13:53 UTC
*** Bug 930245 has been marked as a duplicate of this bug. ***
Comment 28 Vova 2024-04-21 10:06:44 UTC
Created attachment 891259 [details, diff]
patch for qt-5

qt:5 requires similar patch adding spellcheck component to buildflags

qtwebengine-5.15.13_p20240322.ebuild:

PATCHES+=(
  "${FILESDIR}"/${PN}-5.15.2-ninja1.12.patch
)
Comment 29 Ionen Wolkens gentoo-dev 2024-04-23 14:21:30 UTC
*** Bug 930465 has been marked as a duplicate of this bug. ***
Comment 30 Michael G Madden 2024-04-24 13:41:54 UTC
I found the reverting to the previous ninja ,it built ok
Comment 31 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-29 23:45:53 UTC
I guess I'll chuck in the patch and see if anything else falls out, then.
Comment 32 Larry the Git Cow gentoo-dev 2024-04-29 23:51:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e209990c6d94a01863c46f3285cdd18d0ec98201

commit e209990c6d94a01863c46f3285cdd18d0ec98201
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-29 23:50:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-29 23:50:49 +0000

    dev-qt/qtwebengine: fix build w/ ninja-1.12 for qt5
    
    Same as Ionen's patch for qt6 but with a hunk removed.
    
    Closes: https://bugs.gentoo.org/930107
    Signed-off-by: Sam James <sam@gentoo.org>

 .../qtwebengine-5.15.13_p20240322-ninja1.12.patch  | 23 ++++++++++++++++++++++
 .../qtwebengine-5.15.13_p20240322.ebuild           |  5 ++++-
 2 files changed, 27 insertions(+), 1 deletion(-)