Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 786597 - www-client/chromium-91.0.4472.19 fails to build with gcc-11
Summary: www-client/chromium-91.0.4472.19 fails to build with gcc-11
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
Depends on:
Blocks: gcc-11
  Show dependency tree
Reported: 2021-04-29 01:10 UTC by Patrick McLean
Modified: 2021-10-09 16:35 UTC (History)
9 users (show)

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

build.log (build.log.zst,238.21 KB, application/octet-stream)
2021-04-29 01:13 UTC, Patrick McLean
chromium gcc11 patch (chromium-gcc11.patch,5.17 KB, patch)
2021-08-14 14:24 UTC, Mike Lothian
Details | Diff
chromium-VirtualCursor-standard-layout (chromium-VirtualCursor-standard-layout.patch,7.53 KB, patch)
2021-08-14 14:24 UTC, Mike Lothian
Details | Diff
chromium libdav1d (needed for lto) (libdav1d.patch,821 bytes, patch)
2021-08-14 14:25 UTC, Mike Lothian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick McLean gentoo-dev 2021-04-29 01:10:19 UTC
Failure from build log:
FAILED: obj/sql/sql/module.o
tto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/shim_headers/zlib_shim -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pth
read -fcolor-diagnostics -fmerge-all-constants -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -W
no-undefined-var-template -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wmax-tokens -fno-omit-frame-pointer -ftrivial-auto-var-init=pattern -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-o
verlap-compare -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DPROTOBUF_ALLOW_DEPRECATED=1 -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -march=znver2 -pipe -flax-vector-conversions=all -Wno-unknown-warning-option -c ../../sql/recover_module/ -o obj/sql/sql/module.o
In file included from ../../sql/recover_module/
../../sql/recover_module/cursor.h:65:5: error: static_assert failed due to requirement 'std::is_standard_layout<sql::recover::VirtualCursor>::value' "needed for the reinterpret_cast below"
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reproducible: Always
Comment 1 Patrick McLean gentoo-dev 2021-04-29 01:13:16 UTC
Created attachment 703512 [details]

zstd-compressed build.log
Comment 2 Patrick McLean gentoo-dev 2021-04-29 01:14:23 UTC
# emerge --info www-client/chromium
Portage 3.0.18 (python 3.9.4-final-0, default/linux/amd64/17.1, gcc-11.1.0, glibc-2.33, 5.12.0 x86_64)
                         System Settings
System uname: Linux-5.12.0-x86_64-AMD_Ryzen_9_5950X_16-Core_Processor-with-glibc2.33
KiB Mem:    65820436 total,  14364216 free
KiB Swap:   16777212 total,  16184572 free
Timestamp of repository gentoo: Wed, 28 Apr 2021 23:45:01 +0000
Head commit of repository gentoo: 45169ce50aa86c2acef85491690ee3485bd37a85
sh bash 5.1_p4
ld GNU ld (Gentoo 2.36.1 p3) 2.36.1
app-shells/bash:          5.1_p4::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          2.7.18_p8::gentoo, 3.8.9::gentoo, 3.9.4::gentoo, 3.10.0_alpha7::gentoo
dev-lang/rust:            1.51.0-r2::gentoo
dev-util/cmake:           3.20.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r2::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.23::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.36.1-r1::gentoo
sys-devel/gcc:            10.3.0::gentoo, 11.1.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.12::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo

    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://localhost:8730/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -march=znver3 -pipe -g"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/pepper-flash /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=znver3 -pipe -g"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
INSTALL_MASK="/usr/lib/systemd/system /lib/systemd/system /etc/logrotate.d /etc/systemd /var/lib/libvirt/images/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_CA en_GB en_US en"
MAKEOPTS="-j35 -l31"
PORTAGE_COMPRESS_FLAGS="--rm -7 --threads=0 --quiet"
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"
RUSTFLAGS="-C target-cpu=znver2 -v"
USE="X aac acl acpi amd64 apng argyllcms avx bash-completion bluetooth brotli bzip2 cairo caps cli crypt cups curl dbus device-mapper dri dvd egl elogind exif ffmpeg fftw flac fuse gif git gles gmp gnome-keyring gpm gtk iconv ipv6 ithreads jbit jpeg jpeg2k lcms libffi libglvnd libinput libnotify libtirpc lm-sensors lzma lzo mad mmap mmx mmxext mng mp3 mtp multilib ncurses networking nptl ogg openal opencl opengl openmp openssl opus pam pcap pcre pdf png pnm policykit pulseaudio python readline seccomp sndfile speex spell spice split-usr sqlite sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg theora threads tiff truetype udev unicode upower usb usbredir vaapi vdpau vim vim-syntax vorbis vpx vulkan wayland webp x264 x265 xattr xcb xinerama xmp xorg xv zlib zsh-completion zstd" ABI_X86="32 64" ADA_TARGET="gnat_2018" 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 pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" CURL_SSL="openssl" 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 evdev" KERNEL="linux" L10N="en-CA en-GB en-US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU BPF X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8 python3_9 pypy3" RUBY_TARGETS="ruby27 ruby30" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XFCE_PLUGINS="clock" 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"

                        Package Settings

www-client/chromium-90.0.4430.85::gentoo was built with the following:
USE="cups custom-cflags hangouts (pic) proprietary-codecs pulseaudio suid system-ffmpeg system-icu tcmalloc vaapi wayland widevine (-component-build) (-headless) -js-type-check -kerberos -official -screencast (-selinux)" ABI_X86="(64)" L10N="en-GB -am -ar -bg -bn -ca -cs -da -de -el -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW"
CFLAGS="-march=znver2 -pipe"
CXXFLAGS="-march=znver2 -pipe"
Comment 3 Stephan Hartmann gentoo-dev 2021-04-29 06:18:11 UTC
Are you using gcc-11 libstdc++ with clang-12?
Comment 4 Patrick McLean gentoo-dev 2021-04-29 16:08:21 UTC
(In reply to Stephan Hartmann from comment #3)
> Are you using gcc-11 libstdc++ with clang-12?

Yes, I believe that is that would be the current default for ~arch users (at least those that have gcc-11 set as their default compiler).
Comment 5 Stephan Hartmann gentoo-dev 2021-04-29 16:39:54 UTC
Problem is here:

Simple reproducer:

  #include <type_traits>
  #include <memory>

  static_assert(std::is_standard_layout<std::unique_ptr<int>>::value, "");

However, std::unique_ptr<T> is not guaranteed to be standard layout and depends on the __is_standard_layout() intrinsic implementation of the compiler.

Looking what upstream says. For now you can only select <gcc-11 to compile chromium with clang.
Comment 6 Gary E. Miller 2021-07-21 21:14:59 UTC
91.0.4472.164 also fails.
Comment 7 Gary E. Miller 2021-07-29 03:58:00 UTC
I just built  www-client/chromium-92.0.4515.107, no problems with gcc 11.

www-client/chromium-91.0.4472.19 is no longer in the tree.

Maybe time to close this as obsolete?
Comment 8 Sam James archtester gentoo-dev Security 2021-07-29 06:06:14 UTC
(In reply to Gary E. Miller from comment #7)
> I just built  www-client/chromium-92.0.4515.107, no problems with gcc 11.
> www-client/chromium-91.0.4472.19 is no longer in the tree.
> Maybe time to close this as obsolete?

Comment 9 Stephan Hartmann gentoo-dev 2021-08-14 11:42:27 UTC
Reopening. Chromium compiles with gcc-11, but it doesn't compile using clang together with libstdc++ from >=gcc-11.
Comment 10 2021-08-14 12:17:58 UTC
Upstream bug:

Patch for clang 12 with libc++ from gcc 11:

Note that this patch seems not to work on Chromium 94, though I haven't test it yet.

Chromium 91 and 92 should work with this patch.
Comment 11 2021-08-14 12:23:14 UTC
(In reply to from comment #10)

> Patch for clang 12 with libc++ from gcc 11:

My mistake. Should be libstdc++ instead of libc++.

I saw some people said building Chromium and its dependencies with clang and libc++ don't have this problem. I didn't try this way so I can't confirm.
Comment 12 Mike Lothian 2021-08-14 14:23:39 UTC
I'm building Chromium with the following thee patches, which gives a working browsers with Clang 12 & libstdc++ from gcc 11
Comment 13 Mike Lothian 2021-08-14 14:24:10 UTC
Created attachment 732877 [details, diff]
chromium gcc11 patch
Comment 14 Mike Lothian 2021-08-14 14:24:48 UTC
Created attachment 732880 [details, diff]
Comment 15 Mike Lothian 2021-08-14 14:25:33 UTC
Created attachment 732883 [details, diff]
chromium libdav1d (needed for lto)
Comment 16 Andreas K. Hüttel archtester gentoo-dev 2021-09-18 20:10:04 UTC
We want to stabilize gcc-11 now. Is this still an issue?
Comment 17 Stephan Hartmann gentoo-dev 2021-09-18 20:24:31 UTC
(In reply to Andreas K. Hüttel from comment #16)
> We want to stabilize gcc-11 now. Is this still an issue?

Yes. I had no time to work an this.
Comment 18 Stephan Hartmann gentoo-dev 2021-09-18 20:24:40 UTC
(In reply to Andreas K. Hüttel from comment #16)
> We want to stabilize gcc-11 now. Is this still an issue?

Yes. I had no time to work an this.
Comment 19 Andreas K. Hüttel archtester gentoo-dev 2021-10-05 23:02:58 UTC
Ping. Not going to wait much longer.
Comment 20 Mike Lothian 2021-10-06 00:28:37 UTC
It it worth just running with the patch posted in August?