Firefox builds fail when trying to link rust code: www-client/firefox-58.0.1 dev-lang/rust-1.23.0-r1 sys-libs/binutils-libs-2.30-r1 The problem seems to be solved enabling the multitarget in sys-libs/binutils-libs. The error message is the following (Firefox version is different but the problem was the same): Compiling heapsize v0.4.0 error: linking with `/var/tmp/portage/www-client/firefox-57.0.4/work/firefox-57.0.4/build/cargo-linker` failed: exit code: 1 | = note: "/var/tmp/portage/www-client/firefox-57.0.4/work/firefox-57.0.4/build/cargo-linker" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "/var/tmp/portage/www-client/firefox-57.0.4/work/firefox-57.0.4/ff/toolkit/library/release/build/heapsize-8b8976780aeb8f4a/build_script_build-8b8976780aeb8f4a.build_script_build0.rcgu.o" "-o" "/var/tmp/portage/www-client/firefox-57.0.4/work/firefox-57.0.4/ff/toolkit/library/release/build/heapsize-8b8976780aeb8f4a/build_script_build-8b8976780aeb8f4a" "/var/tmp/portage/www-client/firefox-57.0.4/work/firefox-57.0.4/ff/toolkit/library/release/build/heapsize-8b8976780aeb8f4a/build_script_build-8b8976780aeb8f4a.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/var/tmp/portage/www-client/firefox-57.0.4/work/firefox-57.0.4/ff/toolkit/library/release/deps" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd-6833f0ca8696de1f.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-d968840184876236.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-5bef2c52ac19d279.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-3830ae5679a0b739.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-9ff2c67f40fe5858.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-e1c7eeeb00260d82.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-bad119b0f880de53.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-c87147d9878a34a6.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcore-f61c023fb8fcfea8.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-3b206b25583c2149.rlib" "-Wl,-Bdynamic" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util" = note: /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: symbol lookup error: /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: undefined symbol: rx_additional_link_map_text collect2: error: ld returned 127 exit status error: aborting due to previous error
Could you paste your emerge --info please?
Created attachment 518040 [details] emerge --info firefox
Just FYI, there is a bug https://bugs.gentoo.org/645222 and enabling multitarget in sys-libs/binutils-libs solves my case.
(In reply to kceiw from comment #3) > Just FYI, there is a bug https://bugs.gentoo.org/645222 > and enabling multitarget in sys-libs/binutils-libs solves my case. +1
Created attachment 538150 [details] emerge --info gnustep-base/gnustep-base sys-libs/binutils-libs I had the same problem while emerging gnustep-base/gnustep-base-1.24.9-r1 during the configure phase, so this may not be specific to firefox. It was also fixed by re-emerging sys-libs/binutils-libs with the multitarget USE flag enabled.
I don't think that adding a dependency on sys-libs/binutils-libs[multitarget] for www-client/firefox is the right solution: www-client/firefox is no multi{lib,target} package. If you need this because you do cross compilation, it should be part of your cross compilation setup but we shouldn't force *every* www-client/firefox user to enable USE=multitarget for binutils.
Please feel free to reopen and update any bug report that can be duplicated with current esr builds, 60.x. If you feel your feature needs to be re looked at in any of these bugs reopen and update, please attach patches when appropriate. Thank you Mozilla Team