Rust uses llvm 11 while I have the llvm 12 installed. Consequently, Firefox cannot compile with rust as it sees that lld is version 12 while llvm version of rust is 11. Reproducible: Always Actual Results: Firefox Fails to compile: * Package: www-client/firefox-88.0 * Repository: gentoo * Maintainer: mozilla@gentoo.org * USE: abi_x86_64 amd64 clang dbus elibc_glibc gmp-autoupdate hwaccel kernel_linux l10n_el l10n_eu lto openh264 pgo pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp userland_GNU wayland * FEATURES: ccache network-sandbox preserve-libs sandbox userpriv usersandbox * Checking for at least 13500 MiB disk space at "/var/tmp/portage/www-client/firefox-88.0/temp" ... [ ok ] * Using LLVM slot 12 to build * Rust is using LLVM version 11 but ld.lld version belongs to LLVM version 12. * You will be unable to link www-client/firefox. To proceed you have the following options: * - Manually switch rust version using 'eselect rust' to match used LLVM version * - Switch to dev-lang/rust[system-llvm] which will guarantee matching version * - Build www-client/firefox without USE=lto * ERROR: www-client/firefox-88.0::gentoo failed (setup phase): * LLVM version used by Rust (11) does not match with ld.lld version (12)! * * Call stack: * ebuild.sh, line 125: Called pkg_setup * firefox-88.0.ebuild, line 427: Called die * The specific snippet of code: * die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" * * If you need support, post the output of `emerge --info '=www-client/firefox-88.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=www-client/firefox-88.0::gentoo'`. * The complete build log is located at '/var/tmp/portage/www-client/firefox-88.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-88.0/temp/die.env'. * Working directory: '/var/tmp/portage/www-client/firefox-88.0/homedir' * S: '/var/tmp/portage/www-client/firefox-88.0/work/firefox-88.0' * Messages for package www-client/firefox-88.0: * Rust is using LLVM version 11 but ld.lld version belongs to LLVM version 12. * You will be unable to link www-client/firefox. To proceed you have the following options: * - Manually switch rust version using 'eselect rust' to match used LLVM version * - Switch to dev-lang/rust[system-llvm] which will guarantee matching version * - Build www-client/firefox without USE=lto * ERROR: www-client/firefox-88.0::gentoo failed (setup phase): * LLVM version used by Rust (11) does not match with ld.lld version (12)! * * Call stack: * ebuild.sh, line 125: Called pkg_setup * firefox-88.0.ebuild, line 427: Called die * The specific snippet of code: * die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" * * If you need support, post the output of `emerge --info '=www-client/firefox-88.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=www-client/firefox-88.0::gentoo'`. * The complete build log is located at '/var/tmp/portage/www-client/firefox-88.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-88.0/temp/die.env'. * Working directory: '/var/tmp/portage/www-client/firefox-88.0/homedir' * S: '/var/tmp/portage/www-client/firefox-88.0/work/firefox-88.0' sys-devel/llvm-10.0.1::gentoo was built with the following: USE="libffi ncurses xml -abi_riscv_lp64 -abi_riscv_lp64d -debug -doc -exegesis -gold -libedit -test -xar -z3" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 (-ARC) -ARM (-AVR) -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -WebAssembly -XCore" CFLAGS="-march=native -O2 -pipe" CXXFLAGS="-march=native -O2 -pipe" FEATURES="fixlafiles multilib-strict config-protect-if-modified unknown-features-warn xattr ebuild-locks ipc-sandbox protect-owned usersync sandbox sfperms news usersandbox strict unmerge-logs binpkg-dostrip unmerge-orphans userfetch distlocks assume-digests pid-sandbox binpkg-docompress qa-unresolved-soname-deps network-sandbox userpriv merge-sync parallel-fetch preserve-libs binpkg-logs" LDFLAGS="-march=native -O2 -pipe -Wl,--hash-style=gnu" sys-devel/llvm-11.1.0::gentoo was built with the following: USE="libffi ncurses xml -debug -doc -exegesis -gold -libedit -test -xar -z3" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 (-ARC) -ARM -AVR -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ (-VE) -WebAssembly -XCore" CFLAGS="-march=native -O2 -pipe" CXXFLAGS="-march=native -O2 -pipe" FEATURES="ccache ebuild-locks strict sandbox parallel-fetch config-protect-if-modified usersync binpkg-dostrip ipc-sandbox sfperms preserve-libs xattr userfetch protect-owned qa-unresolved-soname-deps fixlafiles userpriv distlocks multilib-strict network-sandbox unmerge-logs unknown-features-warn unmerge-orphans binpkg-docompress pid-sandbox assume-digests usersandbox news merge-sync binpkg-logs" LDFLAGS="-march=native -O2 -pipe -Wl,--hash-style=gnu" sys-devel/llvm-12.0.0::gentoo was built with the following: USE="libffi ncurses xml -debug -doc -exegesis -gold -libedit -test -xar -z3" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARC -ARM -AVR (-CSKY) -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore" CFLAGS="-march=native -O2 -pipe" CXXFLAGS="-march=native -O2 -pipe" FEATURES="distlocks merge-sync assume-digests ccache strict xattr network-sandbox ebuild-locks qa-unresolved-soname-deps binpkg-docompress binpkg-logs unmerge-logs parallel-fetch news userpriv binpkg-multi-instance unmerge-orphans ipc-sandbox config-protect-if-modified binpkg-dostrip unknown-features-warn fixlafiles pid-sandbox sandbox preserve-libs usersync userfetch protect-owned multilib-strict usersandbox sfperms" LDFLAGS="-march=native -O2 -pipe -Wl,--hash-style=gnu"
Same happens for mail-client/thunderbird. It looks like we need dev-lang/rust version that supports LLVM 12.
llvm, clang, lld and the llvm used to compile dev-lang/rust have to be in sync for lto support. dev-lang/rust will be released with llvm-12 support in the next upstream release, for the time being you need to stick with the older llvm-11 toolchain.
There is nothing we can do about it. Current rust version doesn't support LLVM 12. We have to wait for next rust version. We limited firefox to <=LLVM:11 for now to aid upgrade experience. *** This bug has been marked as a duplicate of bug 784215 ***