Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830638 - net-libs/webkit-gtk-2.34.3 compilation error (USE=jumbo-build)
Summary: net-libs/webkit-gtk-2.34.3 compilation error (USE=jumbo-build)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-05 12:35 UTC by Fabio Coatti
Modified: 2022-01-10 23:48 UTC (History)
4 users (show)

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


Attachments
build.log (build.log.gz,275.26 KB, application/gzip)
2022-01-05 12:35 UTC, Fabio Coatti
Details
"undef None" patch (2.34.3-282307_undef_None.patch,1.31 KB, patch)
2022-01-06 22:16 UTC, gen2dev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Coatti 2022-01-05 12:35:04 UTC
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:83:39: note: to match this ‘{’
   83 | enum class DynamicRangeMode : uint8_t {
      |                                       ^
In file included from /usr/include/X11/Xlib.h:44,
                 from /usr/include/X11/Xutil.h:53,
                 from /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/graphics/x11/XUniquePtr.h:31,
                 from /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/graphics/glx/GLContextGLX.h:25,
                 from /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:20,
                 from /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkit-gtk-2.34.3_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-38.cpp:1:
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:84:5: error: expected unqualified-id before numeric constant
   84 |     None,
      |     ^~~~
In file included from /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h:30,
                 from /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.h:30,
                 from /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp:27,
                 from /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkit-gtk-2.34.3_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-38.cpp:4:
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:93:11: error: ‘DynamicRangeMode’ does not name a type
   93 | constexpr DynamicRangeMode preferredDynamicRangeMode(Widget* = nullptr) { return DynamicRangeMode::Standard; }
      |           ^~~~~~~~~~~~~~~~
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:99:47: error: ‘Widget’ was not declared in this scope; did you mean ‘WebCore::Widget’?
   99 | constexpr bool screenSupportsHighDynamicRange(Widget* = nullptr) { return false; }
      |                                               ^~~~~~
      |                                               WebCore::Widget
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:56:7: note: ‘WebCore::Widget’ declared here
   56 | class Widget;
      |       ^~~~~~
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:99:55: error: expected primary-expression before ‘=’ token
   99 | constexpr bool screenSupportsHighDynamicRange(Widget* = nullptr) { return false; }
      |                                                       ^
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:108:30: error: ‘PlatformDisplayID’ was not declared in this scope; did you mean ‘WebCore::PlatformDisplayID’?
  108 | const ScreenData* screenData(PlatformDisplayID screendisplayID);
      |                              ^~~~~~~~~~~~~~~~~
      |                              WebCore::PlatformDisplayID
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:58:7: note: ‘WebCore::PlatformDisplayID’ declared here
   58 | using PlatformDisplayID = uint32_t;
      |       ^~~~~~~~~~~~~~~~~
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:109:16: error: ‘PlatformDisplayID’ does not name a type; did you mean ‘PlatformDisplay_h’?
  109 | WEBCORE_EXPORT PlatformDisplayID primaryScreenDisplayID();
      |                ^~~~~~~~~~~~~~~~~
      |                PlatformDisplay_h
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:161:1: error: expected declaration before ‘}’ token
  161 | } // namespace WebCore
      | ^
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkitgtk-2.34.3/Source/WebCore/platform/PlatformScreen.h:173:5: error: template argument 2 is invalid
  173 |     >;
      |     ^

Reproducible: Always




Last login: Tue Jan  4 22:21:53 CET 2022 on pts/1
root@hobbes ~ # emerge --info
Portage 3.0.30 (python 3.9.9-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-11.2.1, glibc-2.34-r4, 5.15.12-cova x86_64)
=================================================================
System uname: Linux-5.15.12-cova-x86_64-Intel-R-_Core-TM-_i7-6820HQ_CPU_@_2.70GHz-with-glibc2.34
KiB Mem:    65678616 total,  35340396 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Wed, 05 Jan 2022 09:06:55 +0000
Head commit of repository gentoo: aac9e0f2c1036a116a65ae6b223648cbbd704802

sh bash 5.1_p12
ld GNU ld (Gentoo 2.37_p1 p1) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p12::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.0-r6::gentoo
dev-lang/python:           2.7.18_p13::gentoo, 3.8.12_p1::gentoo, 3.9.9::gentoo, 3.10.1-r1::gentoo, 3.11.0_alpha3::gentoo
dev-lang/rust:             1.57.0::gentoo
dev-util/cmake:            3.22.1::gentoo
dev-util/meson:            0.60.3::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          250.1::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r1::gentoo
sys-devel/binutils-config: 5.4::gentoo
sys-devel/clang:           13.0.0::gentoo
sys-devel/gcc:             8.5.0-r1::gentoo, 9.4.0::gentoo, 10.3.1_p20211126::gentoo, 11.2.1_p20211127::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/lld:             13.0.0::gentoo
sys-devel/llvm:            13.0.0::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: yes

kde
    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/kde.git
    masters: gentoo
    priority: 50

local
    location: /usr/overlay
    masters: gentoo
    priority: 51

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/sddm/scripts/Xsetup"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox 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://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="en_IE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -O3 -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="en it de"
MAKEOPTS="-j4"
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="3dnow 3dnowext 3dnowprefetch X \ a52 aac aalib acl acpi activities aim alsa amd64 apng appstream ares asf ati audio audiofile avahi bash-completion bidi bl bluetooth branding bri bzip2 cairo caps cdda cdr cjk cli crypt cups curl dba dbus declarative device-mapper dga divx divx4linux dri dts dv dvb dvd dvdr dvdread eap-sim edl egl emboss encode ethereal evdev exif expat faad fam fame fbcon ffmpeg fftw flac force-cgi-redirect fortran ftp gallium garmin gd gdbm gif gimp gmedia gmp gnutls gphoto2 gpm gps gsm gtk gui h264 h323 iconv icq icu idn ifp ilbc imagemagick imap innodb ipod iproute2 ipv6 ithreads jabber java javascript joystick jpeg kde kipi kontact kvm kwallet lastfm lcms libglvnd libnotify libtirpc libvirtd live lm_sensors lua lvm lxc lzma lzo mad maildir matroska mbox mdnsresponder-compat mhash mime mjpeg mmap mmx mmxext mng mozdevelop mozilla mp3 mp4 mpeg msn mtp multilib mysql ncurses network networkmanager new-hpcups nfsv4 njb nls nptl nptlonly offensive ofx ogg oggvorbis ogm openal openexr opengl openmp oscar pam pango parted pcap pcre pdf phonon php plasma plotutils png policykit ppds pulseaudio qemu qml qt5 readline real rtc ruby samba sasl sdl seccomp semantic-desktop semantic-destkop sha512 sip slang slp smartcard sndfile snmp sox speex spell split-usr srt sse sse2 ssh ssl ssse3 startup-notification svg symlink systemd tcltk telepathy theora threads tiff tk touchpad tremor truetype udev udisks unicode upower usb utempter v4l v4l2 vaapi vcd vde vdpaum vhosts video videos vim-syntax virt-network virtualbox vorbis vulkan wav wayland widgets wifi wmf wmp wps wxwidgets wxwindows x264 xanim xattr xcb xface xft xine xinerama xml xosd xpm xscreensaver xsl xv xvid zeroconf zlib zpm" ABI_X86="64 32" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache 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 popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en it de en_IE" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-1 lua5-4 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8 python3_9" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby26 ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="i965 intel nvidia v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat 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, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Fabio Coatti 2022-01-05 12:35:36 UTC
Created attachment 761361 [details]
build.log
Comment 2 Francois Chenier 2022-01-05 20:34:54 UTC
I got the same issue and it is related to jumbo-build flag not gcc. To compile it, just disable the flag and get ready for a long tea break.
Comment 3 Mart Raudsepp gentoo-dev 2022-01-05 21:36:56 UTC
I think this happening depends on the machine it's ran on in a way - how the webkit cmake unity builds dark magic decides to unify the source files together. A different amount of source files gets unified into a single unified source batch based on machine metrics, I believe.

In other words, I'm flying blind here a bit and seeing from code analysis how it maybe could get mixed up like this somehow...
Comment 4 Mart Raudsepp gentoo-dev 2022-01-05 21:39:54 UTC
I need to see the unified sources from the failure to debug this. Please attach the unified-sources/UnifiedSource-... files that are mentioned in the error messages from the compiler.
/var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkit-gtk-2.34.3_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-38.cpp in case of the original report, but the hash part may change depending on machine and other factors.
Comment 5 Fabio Coatti 2022-01-06 09:23:16 UTC
(In reply to Mart Raudsepp from comment #4)
> I need to see the unified sources from the failure to debug this. Please
> attach the unified-sources/UnifiedSource-... files that are mentioned in the
> error messages from the compiler.
> /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkit-gtk-2.34.3_build/
> WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-38.cpp in case
> of the original report, but the hash part may change depending on machine
> and other factors.

root@hobbes ~ # cat /var/tmp/portage/net-libs/webkit-gtk-2.34.3/work/webkit-gtk-2.34.3_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-38.cpp
#include "platform/graphics/glx/GLContextGLX.cpp"
#include "platform/graphics/gstreamer/ImageGStreamerCairo.cpp"
#include "platform/graphics/gtk/ColorGtk.cpp"
#include "platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp"
#include "platform/graphics/gtk/GdkCairoUtilities.cpp"
#include "platform/graphics/gtk/ImageGtk.cpp"
#include "platform/graphics/iso/ISOBox.cpp"
#include "platform/graphics/iso/ISOOriginalFormatBox.cpp"
Comment 6 gen2dev 2022-01-06 22:16:06 UTC
Created attachment 761460 [details, diff]
"undef None" patch

It looks like upstream has a recurring problem with the jumbo / unified build failing due to name collisions with X11 #defines. There's an open bug where they're still discussing how to handle it (https://bugs.webkit.org/show_bug.cgi?id=229337).

Upstream worked around this particular failure involving "None" three months ago by adding "undef None" to three .h files. It was included in a large unrelated commit (https://trac.webkit.org/changeset/282307/webkit). Separating out just the "None" change gives this small patch. It makes the 2.34.3 jumbo build work for me.
Comment 7 Mart Raudsepp gentoo-dev 2022-01-07 07:17:56 UTC
OK, so for Fabio the unified source started with GLContextGL.cpp, and continued with
#include "platform/graphics/gstreamer/ImageGStreamerCairo.cpp"
#include "platform/graphics/gtk/ColorGtk.cpp"
#include "platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp"

So GLContextGL.cpp brought in in X headers at the very start, and then the remaining three didn't end up including a header that undefs it, until finally that DisplayRefreshMonitorGtk did include a header that ended up including something that uses None, but saw the X one.

Makes some sense now, many thanks for the detective work. I'll adapt something from the upstream commits, now that I know what to look for, or include your patch. How can I credit you properly in the commit, gen2dev? Unsure about including via e-mail when I don't see it exposed in git history yet.
Comment 8 Fabio Coatti 2022-01-07 08:44:44 UTC
(In reply to gen2dev from comment #6)
> Created attachment 761460 [details, diff] [details, diff]
> "undef None" patch
> 
> It looks like upstream has a recurring problem with the jumbo / unified
> build failing due to name collisions with X11 #defines. There's an open bug
> where they're still discussing how to handle it
> (https://bugs.webkit.org/show_bug.cgi?id=229337).
> 
> Upstream worked around this particular failure involving "None" three months
> ago by adding "undef None" to three .h files. It was included in a large
> unrelated commit (https://trac.webkit.org/changeset/282307/webkit).
> Separating out just the "None" change gives this small patch. It makes the
> 2.34.3 jumbo build work for me.

With this patch the compilation succeeds, many thanks!
Comment 9 Marco Genasci 2022-01-08 17:37:26 UTC
Same error and also for me patch solve the problem.
Comment 10 Dan Johansson 2022-01-10 16:29:53 UTC
+1
I also had the same issue and the patch solved the issue.
Comment 11 Larry the Git Cow gentoo-dev 2022-01-10 23:48:40 UTC
The bug has been closed via the following commit(s):

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

commit 84c103ce7c671f0172e84bfc5b1e7b7b74335116
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2022-01-10 23:08:01 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2022-01-10 23:48:17 +0000

    net-libs/webkit-gtk: fix USE=jumbo-build on some machines
    
    Thanks-to: gen2dev
    Closes: https://bugs.gentoo.org/830638
    Package-Manager: Portage-3.0.20, Repoman-3.0.2
    Signed-off-by: Mart Raudsepp <leio@gentoo.org>

 net-libs/webkit-gtk/files/2.34.3-jumbo-fix.patch | 70 ++++++++++++++++++++++++
 net-libs/webkit-gtk/webkit-gtk-2.34.3.ebuild     |  1 +
 2 files changed, 71 insertions(+)