Building sys-devel/binutils-2.37_p1-r1 using 'gold' in USE flags (to ensure that ld.gold gets installed) with sys-devel/gcc-9.4.0 and sys-libs/glibc-2.33-r7 fails (tested on amd64, arm64, ppc64le) with: aarch64-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/binutils-2.37/gold -I/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/binutils-2.37/gold -I/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/binutils-2.37/gold/../include -I/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/binutils-2.37/gold/../elfcpp -DLOCALEDIR="\"/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/usr/share/binutils-data/aarch64-unknown-linux-gnu/2.37_p1/locale\"" -DBINDIR="\"/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/usr/aarch64-unknown-linux-gnu/binutils-bin/2.37_p1\"" -DTOOLBINDIR="\"/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/usr/aarch64-unknown-linux-gnu/bin\"" -DTOOLLIBDIR="\"/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/usr/aarch64-unknown-linux-gnu/lib\"" -W -Wall -Wstack-usage=262144 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=main.o -pthread -O2 -O2 -pipe -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o /cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/binutils-2.37/gold/main.cc ... /cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/binutils-2.37/gold/main.cc: In function 'int main(int, char**)': /cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/binutils-2.37/gold/main.cc:294:24: error: variable 'main(int, char**)::mallinfo2 m' has initializer but incomplete type 294 | struct mallinfo2 m = mallinfo2(); | ^ /cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/binutils-2.37/gold/main.cc:294:38: error: invalid use of incomplete type 'struct main(int, char**)::mallinfo2' 294 | struct mallinfo2 m = mallinfo2(); | ^ /cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/binutils-2.37/gold/main.cc:294:14: note: forward declaration of 'struct main(int, char**)::mallinfo2' 294 | struct mallinfo2 m = mallinfo2(); | ^~~~~~~~~ mv -f .deps/dynobj.Tpo .deps/dynobj.Po make[4]: *** [Makefile:1134: main.o] Error 1 Reproducible: Always $ emerge --info binutils Portage 3.0.21-prefix (python 3.9.6-final-0, default/linux/arm64/17.0/prefix/kernel-3.2+, gcc-9.4.0, unavailable, 4.18.0-305.el8.aarch64 aarch64) ================================================================= System Settings ================================================================= System uname: Linux-4.18.0-305.el8.aarch64-aarch64-with-glibc2.28 sh bash 5.1_p12 ld GNU ld (Gentoo 2.37_p1 p1) 2.37 app-shells/bash: 5.1_p12::gentoo sys-devel/binutils: 2.37_p1-r1::gentoo sys-devel/gcc: 9.4.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo Repositories: gentoo location: /cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo/gentoo.git priority: 1 sync-git-pull-extra-opts: --quiet ACCEPT_KEYWORDS="arm64 ~arm64 ~arm64-linux" ACCEPT_LICENSE="@FREE" CBUILD="aarch64-unknown-linux-gnu" CFLAGS="-O2 -O2 -pipe" CHOST="aarch64-unknown-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/gentoo-release /etc/terminfo" CXXFLAGS="-O2 -O2 -pipe" DISTDIR="/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/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" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged" FFLAGS="-O2" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j32" PKGDIR="/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/tmp/var/cache/binpkgs" PORTAGE_CONFIGROOT="/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/tmp/" 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="/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/tmp/var/tmp" USE="arm64 bootstrap bzip2 clang cli crypt dri iconv internal-glib ipv6 libglvnd libtirpc ncurses nptl openmp prefix seccomp split-usr ssl unicode zlib" 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_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" 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" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev dummy 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: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS ================================================================= Package Settings ================================================================= sys-devel/binutils-2.37_p1-r1::gentoo was built with the following: USE="gold plugins (prefix) (-cet) (-default-gold) -doc -multitarget -nls -static-libs -test -vanilla" FEATURES="unprivileged parallel-fetch multilib-strict binpkg-multi-instance unmerge-orphans merge-sync pid-sandbox sfperms force-prefix network-sandbox config-protect-if-modified ipc-sandbox unmerge-logs strict assume-digests binpkg-docompress ebuild-locks protect-owned qa-unresolved-soname-deps distlocks preserve-libs binpkg-dostrip unknown-features-warn fixlafiles binpkg-logs" LDFLAGS="-L/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/tmp/usr/lib -Wl,-rpath=/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/tmp/usr/lib"
Created attachment 757080 [details] build.log for failing sys-devel/binutils-2.37_p1-r1
Related binutils bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26585 From $EPREFIX/var/tmp/portage/sys-devel/binutils-2.37_p1-r1/work/build/gold/config.log: configure:9973: checking for mallinfo configure:9973: aarch64-unknown-linux-gnu-g++ -o conftest -O2 -O2 -pipe -L/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/usr/lib64 -Wl,--dynamic-linker=/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/lib64/ld-linux-aarch64.so.1 conftest.cpp -ldl >&5 configure:9973: $? = 0 configure:9973: result: yes configure:9973: checking for mallinfo2 configure:9973: aarch64-unknown-linux-gnu-g++ -o conftest -O2 -O2 -pipe -L/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/usr/lib64 -Wl,--dynamic-linker=/cvmfs/pilot.eessi-hpc.org/versions/2021.12/compat/linux/aarch64/lib64/ld-linux-aarch64.so.1 conftest.cpp -ldl >&5 configure:9973: $? = 0 So the configure (correctly) detects that both mallinfo2 and mallinfo are supported, since mallinfo was deprecated in glibc 2.33 (cfr. NEWS file in glibc).
This is definitely more complicated, since the linked upstream bug is for 2.36 and should be long fixed here. Do you have better results with 2.37_p1 or with 2.37_p1-r2 ? Could you test 2.38 please?