Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942142 - dev-qt/qtwebengine-6.7.3 fails to build (ozone_platform_qt.cpp:9:10: fatal error: media/gpu/buildflags.h: No such file or directory)
Summary: dev-qt/qtwebengine-6.7.3 fails to build (ozone_platform_qt.cpp:9:10: fatal er...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: parallel-make
  Show dependency tree
 
Reported: 2024-10-25 16:44 UTC by jlm
Modified: 2024-11-19 09:05 UTC (History)
3 users (show)

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


Attachments
qtwebengine-6.7.3-missing-gn-deps.patch (qtwebengine-6.7.3-missing-gn-deps.patch,310 bytes, patch)
2024-10-25 17:08 UTC, Ionen Wolkens
Details | Diff
build log showing failure mode of comment #5 (build.log.gz,790.70 KB, application/x-gzip-compressed)
2024-11-14 18:49 UTC, Matt Whitlock
Details
qtwebengine-6.7.3-missing-gn-deps.patch (qtwebengine-6.7.3-missing-gn-deps.patch,771 bytes, patch)
2024-11-14 20:24 UTC, Ionen Wolkens
Details | Diff
qtwebengine-6.7.3-missing-gn-deps.patch (qtwebengine-6.7.3-missing-gn-deps.patch,1.90 KB, patch)
2024-11-15 00:34 UTC, Ionen Wolkens
Details | Diff
qtwebengine-6.7.3-missing-gn-deps.patch (qtwebengine-6.7.3-missing-gn-deps.patch,2.14 KB, patch)
2024-11-15 02:57 UTC, Ionen Wolkens
Details | Diff
qtwebengine-6.7.3-missing-gn-deps.patch (qtwebengine-6.7.3-missing-gn-deps.patch,2.15 KB, patch)
2024-11-15 08:26 UTC, Ionen Wolkens
Details | Diff
qtwebengine-6.7.3-missing-gn-deps.patch (qtwebengine-6.7.3-missing-gn-deps.patch,2.16 KB, patch)
2024-11-15 08:43 UTC, Ionen Wolkens
Details | Diff
more-fixes.patch (more-fixes.patch,301 bytes, patch)
2024-11-18 19:01 UTC, Ionen Wolkens
Details | Diff
more-fixes.patch (more-fixes.patch,551 bytes, patch)
2024-11-18 21:00 UTC, Ionen Wolkens
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jlm 2024-10-25 16:44:32 UTC
when updating qtwebengine :

/var/tmp/portage/dev-qt/qtwebengine-6.7.3/work/qtwebengine-everywhere-src-6.7.3/src/core/ozone/ozone_platform_qt.cpp:9:10: fatal error: media/gpu/buildflags.h: No such file or directory
    9 | #include "media/gpu/buildflags.h"


Reproducible: Always

Steps to Reproduce:
1.# emerge -1 dev-qt/qtwebengine
Actual Results:  
compile error with the above error

Expected Results:  
compilation success

# emerge --info
WARNING: One or more repositories have missing repo_name entries:

        /var/lib/layman/gnunet-overlay/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.


Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/amd64/23.0/split-usr/desktop, gcc-14, glibc-2.40-r5, 6.11.3-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.11.3-gentoo-dist-x86_64-Intel-R-_Core-TM-_i7-6500U_CPU_@_2.50GHz-with-glibc2.40
KiB Mem:    16270500 total,   1386684 free
KiB Swap:   20553720 total,  14203448 free
Timestamp of repository gentoo: Fri, 25 Oct 2024 06:30:00 +0000
Head commit of repository gentoo: a7776d98dfd5cb332e0ffbcfa00d54bd98811a9a
Head commit of repository gnunet-overlay: 90e54abb5fb5264563c70feb0a44704a8753bb06

Head commit of repository brave-overlay: a663e49a7cb51d47ce3884641376f9012f01d3ce

Head commit of repository guru: 25e33f6ba23471c83d447387bceb8c360a1cec17

Head commit of repository science: dd532d98a9305b7920ed08db6670c8e28ab16bd5

Head commit of repository torbrowser: ea175d393890a49fb0f3cda5024d8f4d171a6147

Head commit of repository waebbl: 3e2bd16aec3e607eaf53ae8bc1d3ca9649e2d05d

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p2) 2.43.1
ccache version 4.10.2 [disabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.30.5::gentoo
dev-build/libtool:         2.5.3::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.6.0::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.10_p1::gentoo, 3.12.7_p1::gentoo, 3.13.0::gentoo
dev-lang/rust:             1.82.0::gentoo
dev-util/ccache:           4.10.2-r1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.43-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             14.2.1_p20240921::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            18.1.8-r4::gentoo, 19.1.2::gentoo
sys-kernel/linux-headers:  6.11::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-max-age: 3

gnunet-overlay
    location: /var/lib/layman/gnunet-overlay
    sync-type: git
    sync-uri: https://github.com/jlmxyz/gnunet-overlay
    masters: gentoo
    priority: 1
    volatile: True

brave-overlay
    location: /var/lib/layman/brave-overlay
    sync-type: git
    sync-uri: https://gitlab.com/jason.oliveira/brave-overlay.git
    masters: gentoo
    priority: 50
    volatile: True

guru
    location: /var/lib/layman/guru
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 50
    volatile: True

science
    location: /var/lib/layman/science
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/sci.git
    masters: gentoo
    priority: 50
    volatile: True

torbrowser
    location: /var/lib/layman/torbrowser
    sync-type: git
    sync-uri: https://github.com/MeisterP/torbrowser-overlay.git
    masters: gentoo
    priority: 50
    volatile: True

waebbl
    location: /var/lib/layman/waebbl
    sync-type: git
    sync-uri: https://github.com/waebbl/waebbl-gentoo.git
    masters: gentoo
    priority: 50
    volatile: True

Binary Repositories:

binhost
    priority: 9999
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-request-signature buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles getbinpkg ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.free.fr/mirrors/ftp.gentoo.org/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ ftp://gentoo.mirrors.ovh.net/gentoo-distfiles/ ftp://mirrors.soeasyto.com/distfiles.gentoo.org/ http://mirrors.soeasyto.com/distfiles.gentoo.org/ rsync://mirror.eu.oneandone.net/gentoo/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://mirror.netcologne.de/gentoo/ rsync://mirror.netcologne.de/gentoo/ http://mirror.netcologne.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://ftp-stud.hs-esslingen.de/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 aom avif bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus dri dts dvd dvdr elogind encode eselect-ldso exif flac gdbm gif glamor gpm gtk gui heif iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc mad mng mp3 mp4 mpeg mtp multilib ncurses nls ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qml qt5 qt6 readline sdl seccomp sna sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vaapi vorbis vulkan wayland wxwidgets x264 xattr xcb xft xml xua xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="synaptics libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12 python3_11" RUBY_TARGETS="ruby33" VIDEO_CARDS="intel i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS




===============================================
# equery u dev-qt/qtwebengine
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-qt/qtwebengine-6.7.3:
 U I
 - - accessibility : Add support for accessibility (eg 'at-spi' library)
 + + alsa          : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - bindist       : Flag to enable or disable options for prebuilt (GRP) packages (eg. due to licensing issues)
 - - custom-cflags : Build with user-specified CFLAGS (unsupported)
 - - designer      : Install the QWebEngineView plugin used to add widgets in dev-qt/designer forms that display web pages.
 - - geolocation   : Enable physical position determination
 + + jumbo-build   : Combine source files to speed up build process.
 - - kerberos      : Add kerberos support
 + + opengl        : Add support for OpenGL (3D graphics)
 - - pdfium        : Build the QtPdf module based on chromium's PDFium library
 + + pulseaudio    : Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
 + + qml           : Build QML/QtQuick bindings and imports
 - - screencast    : Enable support for remote desktop and screen cast using PipeWire
 + + system-icu    : Use the system-wide dev-libs/icu instead of bundled.
 - - test          : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can
                     be toggled independently)
 + + vaapi         : Enable Video Acceleration API for hardware decoding
 + + vulkan        : Add support for 3D graphics and computing via the Vulkan cross-platform API
 - - webdriver     : Build tool for automated testing (ChromeDriver equivalent)
 + + widgets       : Enable QtWidgets support
================================================
Comment 1 Ionen Wolkens gentoo-dev 2024-10-25 17:08:17 UTC
Created attachment 906685 [details, diff]
qtwebengine-6.7.3-missing-gn-deps.patch

I can't reproduce but these kind of rare race conditions with qtwebengine have happened before and I can take a guess at at a likely fix.

Could you try the attached patch? Since can't reproduce, can't confirm if it works myself before pushing.

On a side-note, please always attach the full build.log (compress it if too big), it makes it difficult to confirm certain things otherwise (not *only* interested in the error itself from that).
Comment 2 jlm 2024-10-25 18:05:46 UTC
will try it as soon as the current build ends, I'm trying to see if this is a side effect of ccache and jumbo-build USE flag, so I desactivated jumbo-build and trying to rebuild
Comment 3 Ionen Wolkens gentoo-dev 2024-10-25 18:29:49 UTC
(In reply to jlm from comment #2)
> will try it as soon as the current build ends, I'm trying to see if this is
> a side effect of ccache and jumbo-build USE flag, so I desactivated
> jumbo-build and trying to rebuild
Being a race condition, changing things around is likely to workaround it. It may also randomly work again even if you change nothing, so hard to say if a patch really helps but a successful build with same conditions would give hope that might have.

There are such issues that indeed happened only with ccache (because it builds faster, and a thing that need some generated header started building before it was generated), but that doesn't mean the fix was to disable ccache.
Comment 4 Ionen Wolkens gentoo-dev 2024-10-25 18:32:23 UTC
(on a side-note, disabling jumbo-build can increase build time by roughly 50%)
Comment 5 jlm 2024-10-27 17:36:51 UTC
test disabling jumbobuild but keeping ccache : passed
test re-enabling jumbobuild, ccache on, provided patch not applied : same error
test jumbobuild on, ccache on, provided patch applied : error changed (seems to pass previous error)

../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/signin/internal/identity_manager/profile_oauth2_token_service.h:19:10: fatal error: components/signin/public/base/signin_buildflags.h: No such file or directory

seems that signin_buildflags.h has also to be added to generation list?
best resgards
Comment 6 Ionen Wolkens gentoo-dev 2024-10-28 00:28:37 UTC
Interesting, wonder what is causing these to surface? Last time it was a ninja update which affected most users (me included), but unsure here (either way is still a bug given the dependencies do seem to be missing).

I don't have enough information to update the patch though, need to know which file that is including profile_oauth2_token_service.h that it is failing on (ideally the full build.log would make things simpler).

Given chromium "seems" to have the right dependencies, I do think it's coming from Qt's side as well though, probably src/core/pref_service_adapter.cpp? and if so think fix will belong in src/core/configure/BUILD.root.gn.in
Comment 7 jlm 2024-11-05 09:49:18 UTC
seems to have compiled fine with last sync (2024-11-04)
Comment 8 Matt Whitlock 2024-11-12 21:17:01 UTC
(In reply to jlm from comment #0)
> /var/tmp/portage/dev-qt/qtwebengine-6.7.3/work/qtwebengine-everywhere-src-6.
> 7.3/src/core/ozone/ozone_platform_qt.cpp:9:10: fatal error:
> media/gpu/buildflags.h: No such file or directory
>     9 | #include "media/gpu/buildflags.h"

I hit this exact issue just now. Without changing anything but simply resuming the build with `ebuild /var/db/repos/gentoo/dev-qt/qtwebengine/qtwebengine-6.7.3.ebuild merge`, I was apparently able to proceed past it but then got the same error as reported in comment #5:

> ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/
> components/signin/internal/identity_manager/profile_oauth2_token_service.h:
> 19:10: fatal error: components/signin/public/base/signin_buildflags.h: No
> such file or directory

I tried resuming the build yet again but could not proceed past this latter error. Even clearing MAKEOPTS (to disable parallel building) did not resolve the issue.

# emerge -pqv '=dev-qt/qtwebengine-6.7.3::gentoo'
[ebuild   R   ] dev-qt/qtwebengine-6.7.3  USE="alsa jumbo-build opengl qml system-icu vaapi vulkan widgets -accessibility -bindist -custom-cflags -designer -geolocation -kerberos (-pdfium) -pulseaudio -screencast -test -webdriver" 

You'll note that I have previously built this version successfully, so I guess the failure is arising due to a change in some build-time dependency.
Comment 9 Ionen Wolkens gentoo-dev 2024-11-12 21:30:20 UTC
(In reply to Matt Whitlock from comment #8)
> > ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/
> > components/signin/internal/identity_manager/profile_oauth2_token_service.h:
> > 19:10: fatal error: components/signin/public/base/signin_buildflags.h: No
> > such file or directory
As I stated in comment #6, I still need a build.log or at least know which file that is including profile_oauth2_token_service.h it is failing on to be able to patch further something that I cannot reproduce myself without making guesses.
Comment 10 Matt Whitlock 2024-11-13 15:47:47 UTC
With FEATURES="-ccache distcc" MAKEOPTS="", it built to completion, even without the patch from comment #1, so I can't provide a failing build.log from that.

Now I'm testing FEATURES="ccache -distcc" MAKEOPTS="".
Comment 11 Ionen Wolkens gentoo-dev 2024-11-14 09:43:19 UTC
I see, if someone else runs into this, please make sure to keep the build.log of the 2nd failure if run into it.

Could patch the first one either way, but seems like they go hand-in-hand.
Comment 12 Matt Whitlock 2024-11-14 18:49:16 UTC
Created attachment 908706 [details]
build log showing failure mode of comment #5

FEATURES="ccache -distcc" MAKEOPTS="" also built to completion.

However, FEATURES="ccache -distcc" MAKEOPTS="-j5" (with a populated cache from the previous build) failed with the error from comment #5. Build log is attached. If there are any other files from my build tree that you need, I can provide them.
Comment 13 Ionen Wolkens gentoo-dev 2024-11-14 20:24:42 UTC
Created attachment 908717 [details, diff]
qtwebengine-6.7.3-missing-gn-deps.patch

Attaching new patch for both fixes, would appreciate if someone affected could try it in case it either doesn't help or there's a 3rd issue, albeit understand it may or may not be hard to tell whether it really fixed it given it's somewhat random (just knowing it built fine once is good enough for me).

(In reply to Matt Whitlock from comment #12)
> Created attachment 908706 [details]
> build log showing failure mode of comment #5
And interesting, actually didn't fail on the file I thought it was and the fix I had in mind (without seeing the log) wasn't in the right place.

Was scratching my head for a bit given all the deps are there for web_history_service.cc, but then noticed that a bit (added by Qt) *removes* a dependency in src/3rdparty/chromium/components/history/core/browser/BUILD.gn

  if (is_qtwebengine) {
     ...
      deps -= [
          ...
          "//components/signin/public/identity_manager",

If I understand this right, removing identity_manager despite the header being used leads to losing the public dep from src/3rdparty/chromium/components/signin/public/identity_manager/BUILD.gn with "//components/signin/public/base:signin_buildflags"

Given Qt seems to be trying to avoid parts of identity_manager (only selects a few files from it), I "think" the maybe not best but safest fix is to keep it removed and add base:signin_buildflags which is what I did in the above patch.
Comment 14 Matt Whitlock 2024-11-14 20:30:31 UTC
(In reply to Ionen Wolkens from comment #13)
> Created attachment 908717 [details, diff] [details, diff]
> qtwebengine-6.7.3-missing-gn-deps.patch
> 
> Attaching new patch for both fixes, would appreciate if someone affected
> could try it in case it either doesn't help or there's a 3rd issue

Now attempting to build with this patch and FEATURES="ccache -distcc" MAKEOPTS="-j5". Will post back with results.
Comment 15 Ionen Wolkens gentoo-dev 2024-11-14 20:41:52 UTC
(In reply to Matt Whitlock from comment #14)
> (In reply to Ionen Wolkens from comment #13)
> > Created attachment 908717 [details, diff] [details, diff] [details, diff]
> > qtwebengine-6.7.3-missing-gn-deps.patch
> > 
> > Attaching new patch for both fixes, would appreciate if someone affected
> > could try it in case it either doesn't help or there's a 3rd issue
> 
> Now attempting to build with this patch and FEATURES="ccache -distcc"
> MAKEOPTS="-j5". Will post back with results.
Thanks.
Comment 16 Matt Whitlock 2024-11-14 20:59:44 UTC
With the patch from comment #13, it gets further along but still fails:

In file included from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/cross_thread_persistent.h:8,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/third_party/blink/public/platform/web_private_ptr.h:36,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/third_party/blink/public/platform/web_crypto_algorithm.h:35,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/third_party/blink/public/platform/web_crypto.h:36,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/webcrypto/algorithm_dispatch.h:14,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/webcrypto/algorithm_dispatch.cc:5:
../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/persistent.h:8:10: fatal error: third_party/blink/renderer/platform/heap/heap_buildflags.h: No such file or directory
    8 | #include "third_party/blink/renderer/platform/heap/heap_buildflags.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


Let me know if you need the build.log or if the above suffices.
Comment 17 Ionen Wolkens gentoo-dev 2024-11-15 00:34:39 UTC
Created attachment 908721 [details, diff]
qtwebengine-6.7.3-missing-gn-deps.patch

(In reply to Matt Whitlock from comment #16)
> With the patch from comment #13, it gets further along but still fails:
Still more huh... I *think* this one is fixed in Qt 6.8.0 by [1], see no harm in backporting to 6.7.3 in the interim though.

I've attached a new patch that combines everything, hopefully it's the right fix and also doesn't hit a 4th error (many thanks for testing).

[1] https://crrev.com/ac2ad9c9f01bf255fd123785bd37d3b0ec44e410
Comment 18 Matt Whitlock 2024-11-15 02:08:35 UTC
With the patch from comment #17 and FEATURES="ccache -distcc" MAKEOPTS="-j5", the build fails with:

../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/qtwebengine/browser/extensions/api/webrtc_desktop_capture_private/webrtc_desktop_capture_private_api.cc:56:10: fatal error: qtwebengine/common/extensions/api/webrtc_desktop_capture_private.h: No such file or directory
   56 | #include "qtwebengine/common/extensions/api/webrtc_desktop_capture_private.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Comment 19 Ionen Wolkens gentoo-dev 2024-11-15 02:57:24 UTC
Created attachment 908722 [details, diff]
qtwebengine-6.7.3-missing-gn-deps.patch

Well another try, bit different but "think" should be right for that one.
Comment 20 Matt Whitlock 2024-11-15 03:54:28 UTC
The patch from comment #19 leads to the same error:

../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/qtwebengine/browser/extensions/api/webrtc_desktop_capture_private/webrtc_desktop_capture_private_api.cc:56:10: fatal error: qtwebengine/common/extensions/api/webrtc_desktop_capture_private.h: No such file or directory
   56 | #include "qtwebengine/common/extensions/api/webrtc_desktop_capture_private.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I guess that wasn't the fix this time.
Comment 21 Ionen Wolkens gentoo-dev 2024-11-15 08:26:19 UTC
Created attachment 908726 [details, diff]
qtwebengine-6.7.3-missing-gn-deps.patch

Take two, think this one is more straight forward than thought (assuming it works).

Sorry for the wait, got distracted by another issue.
Comment 22 Ionen Wolkens gentoo-dev 2024-11-15 08:29:29 UTC
(In reply to Ionen Wolkens from comment #21)
> Created attachment 908726 [details, diff] [details, diff]
> qtwebengine-6.7.3-missing-gn-deps.patch
No wait, don't bother trying that one, I tried the wrong patch and that one is flat out broken. Looking again for the right fix.
Comment 23 Ionen Wolkens gentoo-dev 2024-11-15 08:43:28 UTC
Created attachment 908728 [details, diff]
qtwebengine-6.7.3-missing-gn-deps.patch

Take three, looked deeper and looks like //qtwebengine/common/extensions/api:api is the right one (didn't really see it given the way it generates it).

Interesting considering Qt has this dependency in its top level, but weird ordering may still be possible to fail? I think anyway... will see if it helps.
Comment 24 Matt Whitlock 2024-11-17 17:09:47 UTC
With the patch from comment #23 and FEATURES="ccache -distcc" MAKEOPTS="-j5", the build ran to completion. I'll repeat it several times with differing degrees of parallelism to confirm.
Comment 25 Larry the Git Cow gentoo-dev 2024-11-18 09:06:14 UTC
The bug has been closed via the following commit(s):

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

commit 956d6a85d63efd962759c9388ddcb86bb0282dcb
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-10-26 02:03:15 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-11-18 09:02:34 +0000

    dev-qt/qtwebengine: quick fix for build race conditions (qt6)
    
    Done as two separate patches given one is a chromium backport
    (fixed in 6.8), and the others are qtwebengine-side issues.
    
    Thanks to Matt Whitlock for testing.
    
    Quite possible there are more issues, but there is no harm in
    fixing the ones we know about so far.
    
    Closes: https://bugs.gentoo.org/942142
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 .../qtwebengine-6.7.3-missing-gn-deps-blink.patch  | 38 ++++++++++++++++++++++
 .../files/qtwebengine-6.7.3-missing-gn-deps.patch  | 33 +++++++++++++++++++
 dev-qt/qtwebengine/qtwebengine-6.7.3.ebuild        |  2 ++
 dev-qt/qtwebengine/qtwebengine-6.8.0.ebuild        |  1 +
 dev-qt/qtwebengine/qtwebengine-6.8.9999.ebuild     |  1 +
 5 files changed, 75 insertions(+)
Comment 26 Matt Whitlock 2024-11-18 18:18:48 UTC
I got another one, this time with MAKEOPTS="-j6":

In file included from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/chrome/common/url_constants.h:24,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/qtwebengine/browser/extensions/api/tabs/tabs_api.cc:50:
../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/chrome/common/webui_url_constants.h:17:10: fatal error: build/config/chromebox_for_meetings/buildflags.h: No such file or directory
   17 | #include "build/config/chromebox_for_meetings/buildflags.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Comment 27 Ionen Wolkens gentoo-dev 2024-11-18 19:01:27 UTC
Created attachment 909264 [details, diff]
more-fixes.patch

Here's another patch.

Given the other fixes are merged, new patch only has the latest fix and meant to be used on the top of the rest. Will merge with the in-tree one later if seems to be working.

(In reply to Matt Whitlock from comment #26)
> tabs_api.cc
Looks like another qtwebengine-specific issue.

src/3rdparty/chromium/chrome/browser/extensions/BUILD.gn:    "api/tabs/tabs_api.cc",
src/3rdparty/chromium/qtwebengine/browser/extensions/api/BUILD.gn:    "tabs/tabs_api.cc",

Seeing how the first BUILD.gn has "//build/config/chromebox_for_meetings:buildflags" in deps, I assume the one failing is the added-by-Qt qtwebengine one below which does not have it.

Qt did add it in their top level BUILD.root.gn.in making it "unlikely" to fail, but unlucky ordering can still happen.
Comment 28 Ionen Wolkens gentoo-dev 2024-11-18 19:06:29 UTC
(In reply to Ionen Wolkens from comment #27)
> assume
well, no need to assume /qtwebengine/ is right there in the error output's path, but it was to compare with what chromium is doing anyway :)
Comment 29 Matt Whitlock 2024-11-18 19:14:02 UTC
(In reply to Ionen Wolkens from comment #27)
> Created attachment 909264 [details, diff] [details, diff]
> more-fixes.patch
> 
> Here's another patch.

Thank you for continuing to crank out the patches. It's rather unbelievable just how bad Qt has been about this. Where is their quality control? It seems like they're completely lacking any rigorous process for declaring intra-build dependencies and are just tossing s#!† over the wall whenever it happens to pass a cursory trial run. Anyway, I know this must be so tiresome for you, so really, thank you for dealing with this mess.

I'm building again now with your latest patch. Will report back if I find any more underspecified deps.
Comment 30 Ionen Wolkens gentoo-dev 2024-11-18 20:07:48 UTC
(In reply to Matt Whitlock from comment #29)
> Anyway, I know this must be so tiresome for you
Not really, given I'm not trying to reproduce (my last build went fine, albeit it was the 6.8.1 branch that I'm preparing for the next bump), I don't bother trying to build it (which is would be the tiresome part :) and just looking at files is pretty quick bare a few more obscure dependency chains.
Comment 31 Matt Whitlock 2024-11-18 20:09:45 UTC
Using the patch from comment #27, got another one:

In file included from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/autofill/core/browser/autofill_field.h:18,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/autofill/core/browser/form_structure.h:19,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/autofill/core/browser/autofill_download_manager.h:25,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/autofill/core/browser/autofill_manager.h:26,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/autofill/core/browser/browser_autofill_manager.h:31,
                 from ../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/autofill/core/browser/autofill_external_delegate.cc:29:
../../../../../qtwebengine-everywhere-src-6.7.3/src/3rdparty/chromium/components/autofill/core/browser/form_parsing/regex_patterns.h:12:10: fatal error: components/autofill/core/browser/form_parsing/buildflags.h: No such file or directory
   12 | #include "components/autofill/core/browser/form_parsing/buildflags.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


Just a question: why aren't all these generated header files generated right at the start of the build before doing anything else?
Comment 32 Ionen Wolkens gentoo-dev 2024-11-18 21:00:41 UTC
Created attachment 909554 [details, diff]
more-fixes.patch

And another.

(In reply to Matt Whitlock from comment #31)
> autofill_external_delegate.cc
This seems introduced by Qt as well. With "is_qtwebengine" it resets sources and deps, and then adds its own more limited set which misses the dependency.

That header is generated by the same BUILD.gn which is normally well aware that it needs its own header.

buildflag_header("buildflags") {
  header = "form_parsing/buildflags.h"
...
   deps = [
    ":buildflags",
...
  if (is_qtwebengine) {
    sources = []
    sources = [
...
      "autofill_external_delegate.cc",
...
    deps = []
    deps = [
... and then this does not have ":buildflags". This new patch adds it which hopefully is right.

> Just a question: why aren't all these generated header files generated right
> at the start of the build before doing anything else?
Well, not all of them are needed or even possible to generate based on other settings / platform and that'd need its own custom set of conditions. At a glance some of these generated headers even have their own dependency strings and could build (possibly unneeded) large components before they have the right information/tools to be generated. So instead it just generate them when something requests it (assuming the dependency is there). Not to say that it couldn't work with the right conditions, but whole thing has gotten pretty complex.
Comment 33 Ionen Wolkens gentoo-dev 2024-11-18 21:06:51 UTC
fwiw most of these issues seem at least unlikely to be hit without ccache, so they probably don't hit that many people that just build it without and move on (like Qt's test builds, or even Qt's developers that just rebuild specific objects after making changes rather than the whole thing).
Comment 34 Ionen Wolkens gentoo-dev 2024-11-18 21:08:41 UTC
(In reply to Ionen Wolkens from comment #33)
> fwiw most of these issues seem at least unlikely to be hit without ccache,
> so they probably don't hit that many people that just build it without and
> move on (like Qt's test builds, or even Qt's developers that just rebuild
> specific objects after making changes rather than the whole thing).
.. not to mention that it also won't hit everyone, I do use ccache a lot for qtwebengine testing myself, but I haven't hit any of these.. go figure.
Comment 35 Matt Whitlock 2024-11-19 08:50:48 UTC
Using the patch from comment #32, it's looking like I am no longer seeing build failures at any degree of build parallelism.
Comment 36 Ionen Wolkens gentoo-dev 2024-11-19 09:01:36 UTC
(In reply to Matt Whitlock from comment #35)
> Using the patch from comment #32, it's looking like I am no longer seeing
> build failures at any degree of build parallelism.
Nice, thanks.
Comment 37 Larry the Git Cow gentoo-dev 2024-11-19 09:05:16 UTC
The bug has been referenced in the following commit(s):

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

commit fd94ed9d933d7b27ddc4a50e76397b136468630c
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-11-18 19:00:06 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-11-19 08:59:02 +0000

    dev-qt/qtwebengine: more race condition fixes (qt6)
    
    Bug: https://bugs.gentoo.org/942142
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 .../files/qtwebengine-6.7.3-missing-gn-deps.patch     | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)