This appears to be caused by ebuild repository commit cf8a6a845b68b578772f2ae0d2703f203c6dec33. The commit adds AMDGPU_TARGETS as USE_EXPAND variable. AMDGPU_TARGETS is used in the rccl ebuild (and some other ROCm packages). It appears that AMDGPU_TARGETS is unavailable inside the ebuild if it is specified as a USE_EXPAND variable. This causes rccl to be configured with -DAMDGPU_TARGETS= i.e. no targets specified, which causes the attached linker error. When manually building rccl, it can be observed, that the build completes fine when -DAMDGPU_TARGETS is omitted altogether or when -DAMDGPU_TARGETS=gfx803 (or some other valid target) is specified. When the option is specified but left empty (i.e. configuring with -DAMDGPU_TARGETS= like it is the case in the attached build log), the exact same linker error can be reproduced in a manual build. I have not performed in-depth testing with other ROCm packages, however I suspect, that the mentioned commit also causes issues with other packages. Some packages likely just ignore the empty value of AMDGPU_TARGETS and needlessly compile against all targets (which causes a significant slowdown at compile time). Output of "emerge --info dev-libs/rccl" (redacted to remove URLs as posting was not allowed with URLs): Portage 3.0.30 (python 3.10.6-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-11.3.0, glibc-2.35-r8, 5.15.59-gentoo-x86_64 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.15.59-gentoo-x86_64-x86_64-AMD_Ryzen_5_5600X_6-Core_Processor-with-glibc2.35 KiB Mem: 32795100 total, 24933472 free KiB Swap: 16777212 total, 16777212 free Timestamp of repository gentoo: Tue, 13 Sep 2022 10:00:01 +0000 Head commit of repository gentoo: 8d70c17557e854d21d7d5bed5b669fab3acac3c2 Head commit of repository aclex-pytorch: c67f6e95cd45517f1ddd14daa791c3da474edbd0 Timestamp of repository guru: Mon, 12 Sep 2022 19:25:33 +0000 Head commit of repository guru: 7b473f679361debfc541d751143cffb21d98da90 Timestamp of repository pentoo: Mon, 12 Sep 2022 21:55:15 +0000 Head commit of repository pentoo: 4a74349f51f4dd7a798cbbebb67e50789be10b18 Timestamp of repository science: Mon, 12 Sep 2022 19:25:34 +0000 Head commit of repository science: 184ac2049a8c26192f31740e511b579ad461a3da Timestamp of repository steam-overlay: Wed, 07 Sep 2022 08:26:00 +0000 Head commit of repository steam-overlay: 78208ca83614c4cc031ca8f8ec9b023a5c9c3b1e sh bash 5.1_p16-r1 ld GNU ld (Gentoo 2.38 p4) 2.38 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r1::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.1-r3::gentoo dev-lang/python: 3.9.13_p6::gentoo, 3.10.6_p4::gentoo dev-lang/rust-bin: 1.62.1::gentoo dev-util/cmake: 3.23.3::gentoo dev-util/meson: 0.62.2::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/sandbox: 2.29::gentoo sys-apps/systemd: 251.3::gentoo sys-devel/autoconf: 2.13-r2::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.38-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 14.0.6-r1::gentoo sys-devel/gcc: 11.3.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/lld: 14.0.6::gentoo sys-devel/llvm: 14.0.6-r2::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.35-r8::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 aclex-pytorch location: /var/db/repos/aclex-pytorch sync-type: git masters: gentoo guru location: /var/db/repos/guru sync-type: git masters: gentoo local location: /var/db/repos/local masters: gentoo pentoo location: /var/db/repos/pentoo sync-type: git masters: gentoo science location: /var/db/repos/science sync-type: git masters: gentoo steam-overlay location: /var/db/repos/steam-overlay sync-type: git masters: gentoo crossdev location: /var/db/repos/crossdev masters: gentoo priority: 10 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -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="-march=native -O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live 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="-march=native -O2 -pipe" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j12" 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/zsh" USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups dbus dri dts dvd dvdr eds encode evo exif flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gui iconv icu introspection ipv6 jpeg lcms libglvnd libnotify libsecret libtirpc mad mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline screencast sdl seccomp spell split-usr ssl startup-notification svg sysprof systemd tiff tracker truetype udev udisks unicode upower usb vaapi vorbis vulkan vulkan-overlay wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" AMDGPU_TARGETS="gfx803" 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" 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" L10N="de" 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-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_9 python3_10" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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, LINGUAS, 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 804973 [details] build.log
When AMDGPU_TARGETS is removed from USE_EXPAND in /var/db/repos/gentoo/profiles/base/make.defaults manually, the build error is resolved.
Obsolete bug