It seems something hapened to pgo-enabled gcc14 between pre20231022-r1 and pre20231029; since pre20231029 I've not been able to go to the next pre-release when having pgo enabled. Recompiling pre20231029 with USE="-pgo" it can compile the next pre-release just fine. Reproducible: Always Steps to Reproduce: This is the version I try to go to from sys-devel/gcc-14.0.0_pre20231029 (with pgo) ns ~ # emerge -pva1 =sys-devel/gcc-14.0.0_pre20231105 These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 1.19 s (backtrack: 0/20). [ebuild U *] sys-devel/gcc-14.0.0_pre20231105:14::gentoo [14.0.0_pre20231029:14::gentoo] USE="(cxx) (default-stack-clash-protection) (default-znow) graphite hardened lto nls nptl openmp pgo (pie) sanitize (ssp) vtv zstd -ada -cet (-custom-cflags) -d -debug -doc (-fixed-point) -fortran -go (-ieee-long-double) -jit (-libssp) -modula2 (-multilib) -objc -objc++ -objc-gc (-pch) -rust -systemtap -test -valgrind -vanilla" 0 KiB Actual Results: And it fails with this: make[3]: Entering directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' build/genoutput /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-14-20231105/gcc/common.md /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-14-20231105/gcc/config/i386/i386.md \ insn-conditions.md > tmp-output.cc build/genoutput: error while loading shared libraries: cannot apply additional memory protection after relocation: Cannot allocate memory make[3]: *** [Makefile:2591: s-output] Error 127 make[3]: Leaving directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' make[3]: *** Waiting for unfinished jobs.... make[3]: Entering directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' build/genattrtab /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-14-20231105/gcc/common.md /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-14-20231105/gcc/config/i386/i386.md insn-conditions.md \ -Atmp-attrtab.cc -Dtmp-dfatab.cc -Ltmp-latencytab.cc make[3]: Leaving directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' make[3]: Entering directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' /bin/sh /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-14-20231105/gcc/../move-if-change tmp-attrtab.cc insn-attrtab.cc make[3]: Leaving directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' make[3]: Entering directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' /bin/sh /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-14-20231105/gcc/../move-if-change tmp-dfatab.cc insn-dfatab.cc make[3]: Leaving directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' make[3]: Entering directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' /bin/sh /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-14-20231105/gcc/../move-if-change tmp-latencytab.cc insn-latencytab.cc make[3]: Leaving directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' make[3]: Entering directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' echo timestamp > s-attrtab make[3]: Leaving directory '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build/gcc' rm gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod make[2]: *** [Makefile:5012: all-stage1-gcc] Error 2 make[1]: *** [Makefile:25307: stage1-bubble] Error 2 make: *** [Makefile:25655: bootstrap-lean] Error 2 * ERROR: sys-devel/gcc-14.0.0_pre20231105::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-devel/gcc-14.0.0_pre20231105::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-14.0.0_pre20231105::gentoo'`. * The complete build log is located at '/var/log/portage/sys-devel:gcc-14.0.0_pre20231105:20231116-155619.log'. * For convenience, a symlink to the build log is located at '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/temp/build.log'. * The ebuild environment file is located at '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/temp/environment'. * Working directory: '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/build' * S: '/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-14-20231105' * * Please include /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-build-logs.tar.xz in your bug report. * ns ~ # emerge --info Portage 3.0.55 (python 3.11.5-final-0, default/linux/amd64/17.1/no-multilib/hardened, gcc-14, glibc-2.37-r7, 6.1.62-gentoo-x86_64 x86_64) ================================================================= System uname: Linux-6.1.62-gentoo-x86_64-x86_64-12th_Gen_Intel-R-_Core-TM-_i7-1270P-with-glibc2.37 KiB Mem: 6084152 total, 3470044 free KiB Swap: 6291452 total, 6243836 free Timestamp of repository guru: Tue, 14 Nov 2023 14:16:55 +0000 Head commit of repository guru: d1c334406fb8396c9bcf6ca558155883f7df5a77 Timestamp of repository gentoo: Thu, 16 Nov 2023 00:30:01 +0000 Head commit of repository gentoo: 53b4fa20842aa56d2b3d61dc4bdbdcde26b60bea sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-lang/perl: 5.38.0-r1::gentoo dev-lang/python: 3.11.5::gentoo dev-lang/rust-bin: 1.71.1::gentoo dev-util/cmake: 3.26.5-r2::gentoo dev-util/meson: 1.2.2-r1::gentoo sys-apps/baselayout: 2.14::gentoo sys-apps/openrc: 0.48::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/autoconf: 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 13.2.1_p20230826::gentoo, 14.0.0_pre20231029::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r7::gentoo Repositories: local location: /var/db/repos/local masters: gentoo priority: -1 volatile: False guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: 1 volatile: False sync-rsync-verify-max-age: 3 sync-rsync-verify-metamanifest: no sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -flto=2 -fuse-linker-plugin -fno-fat-lto-objects -ftree-vectorize" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind /var/spool/munin-async/.ssh" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -flto=2 -fuse-linker-plugin -fno-fat-lto-objects -ftree-vectorize -flifetime-dse=1" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --buildpkg-exclude 'virtual/* sys-kernel/*-sources sys-apps/pkgcore'" 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 -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -flto=2 -fuse-linker-plugin -fno-fat-lto-objects -ftree-vectorize" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync 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 -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -flto=2 -fuse-linker-plugin -fno-fat-lto-objects -ftree-vectorize" GENTOO_MIRRORS="http://gentoo.mirrors.ovh.net/gentoo-distfiles/ https://ftp.uni-hannover.de/gentoo/ https://ftp.agdsn.de/gentoo" LANG="en_US.utf8" LDFLAGS="-fuse-ld=mold -Wl,-O1 -Wl,--as-needed -O2 -pipe -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -flto=2 -fuse-linker-plugin -fno-fat-lto-objects -ftree-vectorize -flifetime-dse=1 -Wl,--defsym=__gentoo_check_ldflags__=0" LEX="flex" LINGUAS="en" MAKEOPTS="-j2" 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="/var/tmp" SHELL="/bin/bash" USE="acl amd64 berkdb bzip2 caps cli crypt dri fortran hardened iconv idn ipv6 libtirpc lto ncurses nls nptl openmp pam pcre pgo pie readline seccomp split-usr ssl ssp syslog test-rust udev unicode usb verify-sig xattr xml xtpax zlib zstd" ABI_X86="64" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, 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
Created attachment 874892 [details] gcc14 build.log
sys-devel/gcc-14_pre20231015-r1 seems to have problems, too. Can build sys-devel/gcc-14_pre20231015 with/without pgo from my stable pgo-enabled gcc13. Cannot build sys-devel/gcc-14_pre20231015-r1 with/without pgo from my stable pgo-enabled gcc13. Can build sys-devel/gcc-14_pre20231022 with/without pgo from my stable pgo-enabled gcc13. Can build sys-devel/gcc-14_pre20231022-r1 with/without pgo from my stable pgo-enabled gcc13. Can build sys-devel/gcc-14_pre20231029 with/without pgo from my stable pgo-enabled gcc13. Can build sys-devel/gcc-14_pre20231105 with/without pgo from my stable pgo-enabled gcc13. Can build sys-devel/gcc-14_pre20231112 with/without pgo from my stable pgo-enabled gcc13.
Original report was on forums at https://forums.gentoo.org/viewtopic-t-1165840.html. I might need you to try bisect given I've no immediate guesses. Not looked into it yet, but I can't reproduce either.
Well - don't know if this should be marked invalid? I decided to rebuild libtool/glibc/binutils and a few other packages, went from gcc13 stable to gcc-14.0_pre20231112 pgo, and then to _pre20231119 and now to _pre20231126 without issues.
Weird. Given nobody else has reported it, let's call it WORKSFORME. Let us know if it returns.
Having hit this myself today, I now know it was caused by mold. The recent 2.4.0 release works though.
It is very likely the same as https://github.com/rui314/mold/issues/1151, which is fixed in mold 2.4.0, so please use mold 2.4.0. Sorry for the trouble.