When trying to compile x11-libs/vte-0.66.2 with gcc-9.4.0, the build breaks with this messages: Host machine cpu: x86_64 Compiler for C supports arguments -std=gnu11: YES meson.build:137: WARNING: Consider using the built-in option for language standard version instead of using "-std=gnu11" . Compiler for C++ supports arguments -std=gnu++20: NO meson.build:144:0: ERROR: Assert failed: option -std=gnu++20 not supported by gcc Reproducible: Always Steps to Reproduce: 1. gcc-config x86_64-pc-linux-gnu-9.4.0 2. emerge -1 =x11-libs/vte-0.66.2 3. Actual Results: Build is broken. Expected Results: Probably: build trying to build a sufficiently recent gcc first. Or: vte being skipped because of missing dependencies. Portage 3.0.30 (python 3.9.9-final-0, default/linux/amd64/17.1/systemd, gcc-9.4.0, glibc-2.33-r13, 5.4.179-gentoo x86_64) ================================================================= System uname: Linux-5.4.179-gentoo-x86_64-AMD_Phenom-tm-_II_X3_740_Processor-with-glibc2.33 KiB Mem: 7897728 total, 5177316 free KiB Swap: 4193620 total, 4192852 free Timestamp of repository gentoo: Thu, 10 Mar 2022 18:30:01 +0000 Head commit of repository gentoo: f31297ae743c99a3e73f89a1be7209185719362e sh bash 5.1_p16 ld GNU ld (Gentoo 2.37_p1 p2) 2.37 app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p16::gentoo dev-lang/perl: 5.34.0-r6::gentoo dev-lang/python: 3.9.9-r1::gentoo dev-lang/rust: 1.58.1::gentoo dev-util/cmake: 3.22.2::gentoo dev-util/meson: 0.60.3::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/sandbox: 2.25::gentoo sys-apps/systemd: 249.9::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.4::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo sys-devel/binutils-config: 5.4::gentoo sys-devel/clang: 11.1.0::gentoo sys-devel/gcc: 9.4.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/lld: 11.1.0-r1::gentoo sys-devel/llvm: 11.1.0::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10-r2::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r13::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 3 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" 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="-O2 -march=native -pipe" DISTDIR="/var/cache/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 buildpkg-live cgroup 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" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="de de_DE en" MAKEOPTS="-j3" PKGDIR="/var/cache/binpkgs" 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="/tmp" SHELL="/bin/bash" USE="X alsa amd64 bzip2 cairo cli crypt dbus dri exif ffmpeg flac fortran gdbm gtk3 iconv icu jpeg libglvnd libnotify libtirpc mp3 multilib ncurses nls nptl ogg opengl openh264 openmp pam pcre png policykit qt5 readline seccomp split-usr ssl svg system-png system-sqlite systemd truetype udev udisks unicode vorbis x264 xpm zlib" ABI_X86="64" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" 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="pc" INPUT_DEVICES="libinput evdev" KERNEL="linux" L10N="de de-DE de-1901 en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU NVPTX" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu r600 radeon" 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
We can't really depend on a new enough GCC per se because it'll force GCC on systems without it like Clang. Best we can do is complain in pkg_pretend really. Note that 9.x is about to be EOL.
(In reply to Sam James from comment #1) > We can't really depend on a new enough GCC per se because it'll force GCC on > systems without it like Clang. > > Best we can do is complain in pkg_pretend really. Note that 9.x is about to > be EOL. Thank you for your quick response. I thought portage would allow for dependencies on >gcc-x.y || >clang-p.q or similar. (But i am not sure if this is feasible, are there many alternative C compilers?) The workaround is obviously to upgrade gcc.
(In reply to Thomas from comment #2) > Thank you for your quick response. I thought portage would allow for > dependencies on >gcc-x.y || >clang-p.q or similar. (But i am not sure if > this is feasible, are there many alternative C compilers?) The other issue is that it's not necessarily the compiler that's used e.g. you could have both gcc9 and gcc11 installed, and have gcc9 selected, and the dependency would think everything is fine given you have gcc11. People that don't depclean much tend to keep this state for a long time unintentionally too.
(In reply to Ionen Wolkens from comment #3) > > The other issue is that it's not necessarily the compiler that's used > > e.g. you could have both gcc9 and gcc11 installed, and have gcc9 selected, > and the dependency would think everything is fine given you have gcc11. True. But the other (probably more common) situation, not having any working compiler installed at all, would be noticed by such a dependency.
(In reply to Thomas from comment #4) > (In reply to Ionen Wolkens from comment #3) > > > > The other issue is that it's not necessarily the compiler that's used > > > > e.g. you could have both gcc9 and gcc11 installed, and have gcc9 selected, > > and the dependency would think everything is fine given you have gcc11. > > True. But the other (probably more common) situation, not having any > working compiler installed at all, would be noticed by such a dependency. Note that if we did || ( ) with clang + gcc, it may well end up just suggesting clang/pulling it in if newer GCC versions masked (which is likely the case for you). In general nobody should be masking new GCC versions. At most, requiring stable instead: sys-devel/gcc -~amd64 or similar.
(In reply to Sam James from comment #5) > > Note that if we did || ( ) with clang + gcc, it may well end up just > suggesting clang/pulling it in if newer GCC versions masked (which is likely > the case for you). Good point. In my case it would probably be even happy with finding a matching clang -- which is not used here. > In general nobody should be masking new GCC versions. At most, requiring > stable instead: Newer versions of gcc have a tendency to be slower and more memory hungry without giving any benefit on the compiled binaries. BTW: there is even an unmasked gcc-8 in the reop. ;-)
I am not sure if we want to add those checks at present time :/ Currently all gcc versions lower than 10 are hardmasked