While bringing a machine up to date from a couple months worth of upgrades, I force unmerged old rust-bin:stable (to not tackle the migration, however that was supposed to work) and just installed the new rust-bin-1.83.0 in its place. This went fine, but afterwards no rust using packages were able to successfully compile/link anymore, including dev-lang/rust, but also some other rust packages (e.g. sys-apps/speakersafetyd from asahi overlay). The failure in those cases went like this: = note: ld.lld: error: /tmp/portage/dev-lang/rust-1.83.0-r1/work/rustc-1.83.0-src/build/bootstrap/debug/build/typenum-4d97d8cf1b5d7b02/build_script_main-4d97d8cf1b5d7b02.build_script_main.73fa9b6944af06f7-cgu.0.rcgu.o: Invalid attribute group entry (Producer: 'LLVM19.1.1-rust-1.83.0-stable' Reader: 'LLVM 18.1.8') This was solved by just getting around to upgrading lld to 19 as well, but this wasn't enforced by the ebuild in any way and Kangie asked me to file a bug about it.
Note that lld is my system linker (and clang is my system compiler) `emerge --info` rust after successfully installing it with USE="rust-analyzer rust-src rustfmt system-llvm" after lld upgrade: Portage 3.0.64 (python 3.12.5-final-0, default/linux/arm64/23.0/desktop/gnome/systemd, gcc-14, glibc-2.40-r7, 6.11.2-asahi-1 aarch64) ================================================================= System Settings ================================================================= System uname: Linux-6.11.2-asahi-1-aarch64-with-glibc2.40 KiB Mem: 198992032 total, 182198304 free KiB Swap: 0 total, 0 free Head commit of repository asahi: a8a184c9c7d6bed8dafe7efa8cd1896d7647a832 sh bash 5.2_p26 ld GNU ld (Gentoo 2.42 p6) 2.42.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p26::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo, 1.17-r1::gentoo dev-build/cmake: 3.28.2::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.5.1::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 3.12.5_p1::gentoo dev-lang/rust: 1.83.0-r1::gentoo dev-lang/rust-bin: 1.83.0::gentoo llvm-core/clang: 18.1.8::gentoo, 19.1.6::gentoo llvm-core/lld: 18.1.8::gentoo, 19.1.6::gentoo llvm-core/llvm: 18.1.8-r4::gentoo, 19.1.6::gentoo sys-apps/baselayout: 2.15::gentoo sys-apps/sandbox: 2.39::gentoo sys-apps/systemd: 254.17::gentoo sys-devel/binutils: 2.41-r5::gentoo, 2.42-r2::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 14.2.1_p20240817::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r7::gentoo Repositories: gentoo location: /home/leio/gentoo/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: True sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 3 sync-rsync-verify-metamanifest: yes asahi location: /var/db/repos/asahi sync-type: git sync-uri: https://github.com/chadmed/asahi-overlay.git masters: gentoo volatile: False Binary Repositories: gentoobinhost priority: 1 sync-uri: https://gentoo.osuosl.org/releases/arm64/binpackages/23.0/arm64 ACCEPT_KEYWORDS="arm64 ~arm64" ACCEPT_LICENSE="@FREE" AR="llvm-ar" CBUILD="aarch64-unknown-linux-gnu" CC="clang" CFLAGS="-mcpu=apple-m2 -O3 -pipe -mbranch-protection=standard -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-default-version=4 -gdwarf-4 -Werror=odr -Werror=strict-aliasing -frecord-gcc-switches -flto=thin" CHOST="aarch64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/php/apache2-php8.3/ext-active/ /etc/php/cgi-php8.3/ext-active/ /etc/php/cli-php8.3/ext-active/ /etc/php/fpm-php8.3/ext-active/ /etc/php/phpdbg-php8.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXX="clang++" CXXFLAGS="-mcpu=apple-m2 -O3 -pipe -mbranch-protection=standard -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-default-version=4 -gdwarf-4 -Werror=odr -Werror=strict-aliasing -frecord-gcc-switches -flto=thin" DISTDIR="/home/distfiles" 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="-mcpu=apple-m2 -O3 -pipe -mbranch-protection=standard -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-default-version=4 -gdwarf-4 -Werror=odr -Werror=strict-aliasing -frecord-gcc-switches" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-mcpu=apple-m2 -O3 -pipe -mbranch-protection=standard -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-default-version=4 -gdwarf-4 -Werror=odr -Werror=strict-aliasing -frecord-gcc-switches" GENTOO_MIRRORS="https://mirror.netcologne.de/gentoo/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://ftp.halifax.rwth-aachen.de/gentoo/" LANG="C.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-zpack-relative-relocs -flto=thin -Wl,--defsym=__gentoo_check_ldflags__=0" LEX="flex" LINGUAS="en et et_EE pl de" MAKEOPTS="-j26" OBJCOPY="llvm-objcopy" 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" RANLIB="llvm-ranlib" RUSTFLAGS="-C linker-plugin-lto -C opt-level=3 -C target-cpu=apple-m2 -C link-arg=-Wl,-z,pack-relative-relocs" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa arm64 bluetooth branding brotli bzip2 cairo cdda cdr clang colord crypt cups dbus dri dts dvdr eds encode evo exif flac flatpak gdbm gdk-pixbuf gif gnome gnome-keyring gnome-online-accounts gnome-shell gpm gstreamer gtk gui iconv icu introspection ipv6 jpeg keyring kf6compat lcms libnotify libtirpc mad mng mp3 mp4 mpeg nautilus ncurses networkmanager nls ogg opengl openmp opus pam pango pcre pdf pipewire png policykit ppds pulseaudio qml readline screencast sdl seccomp sound spell ssl startup-notification svg sysprof systemd test-rust tiff tracker truetype udev udisks unicode upower usb vorbis vulkan wayland wxwidgets x264 xattr xcb xft xml xv zlib" ADA_TARGET="gcc_13" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en et" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-3" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby33" VIDEO_CARDS="fbdev asahi dummy honeykrisp" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS ================================================================= Package Settings ================================================================= dev-lang/rust-1.83.0-r1::gentoo was built with the following: USE="rust-analyzer rust-src rustfmt system-llvm (-big-endian) -clippy -debug -dist -doc (-llvm-libunwind) (-lto) (-miri) -nightly (-parallel-compiler) -test -verify-sig -wasm" LLVM_SLOT="(19)" LLVM_TARGETS="(AArch64) -AMDGPU -ARC -ARM -AVR -BPF -CSKY -DirectX -Hexagon -Lanai -LoongArch -M68k -MSP430 -Mips -NVPTX -PowerPC -RISCV -SPIRV -Sparc -SystemZ -VE -WebAssembly -X86 -XCore -Xtensa" CFLAGS="-mcpu=apple-m2 -O3 -pipe -mbranch-protection=standard -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-default-version=4 -gdwarf-4 -Werror=odr -Werror=strict-aliasing -frecord-gcc-switches" CXXFLAGS="-mcpu=apple-m2 -O3 -pipe -mbranch-protection=standard -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-default-version=4 -gdwarf-4 -Werror=odr -Werror=strict-aliasing -frecord-gcc-switches" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-zpack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0"
How can we fix this issue? Currently, we don't mark lld as a required dependency for rust and rust-bin (except when the wasm use flag is enabled).
(In reply to norbiros from comment #2) > How can we fix this issue? Currently, we don't mark lld as a required > dependency for rust and rust-bin (except when the wasm use flag is enabled). I don't think that there is a fix for this issue, tbh. lld is _not_ a required dependency for dev-lang/rust{,-bin}, and users that have ended up in this position have explicitly opted in to using clang/lld system-wide. I'll update the dev-lang/rust ebuild so that _it_ will fail descriptively if ld == lld and has_version does not find a match for LLVM_COMPAT. It's not worth doing this in every other ebuild though. I'll think about whether the eclass could/should be doing this detection. Realistically, running a world upgrade for systems using clang/lld in make.conf will pull in clang/lld/llvm 19 anyway, so this is only an issue for outdated systems where lld is used as the system linker; the error message is pretty straightforward - most users should be capable of reading that and identifying that they need to update lld/llvm to continue.