29:32.88 Compiling mls-platform-api v0.1.0 (https://github.com/beurdouche/mls-platform-api?rev=19c3f18b747d13354370ba84440bb0b963932634#19c3f18b) 29:32.89 Running `CARGO=/usr/lib/rust/1.81.0/bin/cargo CARGO_CRATE_NAME=mls_platform_api CARGO_MANIFEST_DIR=/tmp/portage/www-client/firefox-135.0/work/firefox-135.0/third_party/rust/mls-platform-api CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='Apache-2.0 OR MIT' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=mls-platform-api CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH=/tmp/portage/www-client/firefox-135.0/work/firefox_build/release/deps /usr/lib/rust/1.81.0/bin/rustc --crate-name mls_platform_api --edition=2021 /tmp/portage/www-client/firefox-135.0/work/firefox-135.0/third_party/rust/mls-platform-api/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C embed-bitcode=no --cfg 'feature="gecko"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("gecko"))' -C metadata=ac7ae692cf50a3db -C extra-filename=-ac7ae692cf50a3db --out-dir /tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/tmp/portage/www-client/firefox-135.0/work/firefox-135.0/build/cargo-linker -C strip=debuginfo -L dependency=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/portage/www-client/firefox-135.0/work/firefox_build/release/deps --extern bincode=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libbincode-abe7acca018de6a3.rmeta --extern hex=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libhex-6c903163dec4024a.rmeta --extern mls_rs=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libmls_rs-fbfcd4a9a1916148.rmeta --extern mls_rs_crypto_nss=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libmls_rs_crypto_nss-a891f6f970ecdd44.rmeta --extern mls_rs_provider_sqlite=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libmls_rs_provider_sqlite-31fe5ad32cd52b5a.rmeta --extern serde=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libserde-b784f557c1fe5ba5.rmeta --extern serde_json=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libserde_json-e065f1dbc074458c.rmeta --extern sha2=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libsha2-6d158254357129ad.rmeta --extern thiserror=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libthiserror-4db0a689c613639b.rmeta --cap-lints warn -C debuginfo=2 --cap-lints warn -C codegen-units=1 -L native=/tmp/portage/www-client/firefox-135.0/work/firefox_build/dist/bin -L native=/tmp/portage/www-client/firefox-135.0/work/firefox_build/security/nss/lib/nss/nss_nss3 -L native=/tmp/portage/www-client/firefox-135.0/work/firefox_build/security/nss/lib/ssl/ssl_ssl3 -L native=/tmp/portage/www-client/firefox-135.0/work/firefox_build/config/external/nspr/pr` 29:48.47 rustc: /tmp/portage/dev-lang/rust-1.81.0-r100/work/rustc-1.81.0-src/src/llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:298: void llvm::Loc::MMI::addFrameIndexExpr(const llvm::DIExpression*, int): Assertion `(FrameIndexExprs.size() == 1 || llvm::all_of(FrameIndexExprs, [](const FrameIndexExpr &FIE) { return FIE.Expr && FIE.Expr->isFragment(); })) && "conflicting locations for variable"' failed. 29:48.53 error: could not compile `mls-platform-api` (lib) 29:48.53 Caused by: 29:48.54 process didn't exit successfully: `CARGO=/usr/lib/rust/1.81.0/bin/cargo CARGO_CRATE_NAME=mls_platform_api CARGO_MANIFEST_DIR=/tmp/portage/www-client/firefox-135.0/work/firefox-135.0/third_party/rust/mls-platform-api CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='Apache-2.0 OR MIT' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=mls-platform-api CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH=/tmp/portage/www-client/firefox-135.0/work/firefox_build/release/deps /usr/lib/rust/1.81.0/bin/rustc --crate-name mls_platform_api --edition=2021 /tmp/portage/www-client/firefox-135.0/work/firefox-135.0/third_party/rust/mls-platform-api/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C embed-bitcode=no --cfg 'feature="gecko"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("gecko"))' -C metadata=ac7ae692cf50a3db -C extra-filename=-ac7ae692cf50a3db --out-dir /tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/tmp/portage/www-client/firefox-135.0/work/firefox-135.0/build/cargo-linker -C strip=debuginfo -L dependency=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/portage/www-client/firefox-135.0/work/firefox_build/release/deps --extern bincode=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libbincode-abe7acca018de6a3.rmeta --extern hex=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libhex-6c903163dec4024a.rmeta --extern mls_rs=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libmls_rs-fbfcd4a9a1916148.rmeta --extern mls_rs_crypto_nss=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libmls_rs_crypto_nss-a891f6f970ecdd44.rmeta --extern mls_rs_provider_sqlite=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libmls_rs_provider_sqlite-31fe5ad32cd52b5a.rmeta --extern serde=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libserde-b784f557c1fe5ba5.rmeta --extern serde_json=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libserde_json-e065f1dbc074458c.rmeta --extern sha2=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libsha2-6d158254357129ad.rmeta --extern thiserror=/tmp/portage/www-client/firefox-135.0/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libthiserror-4db0a689c613639b.rmeta --cap-lints warn -C debuginfo=2 --cap-lints warn -C codegen-units=1 -L native=/tmp/portage/www-client/firefox-135.0/work/firefox_build/dist/bin -L native=/tmp/portage/www-client/firefox-135.0/work/firefox_build/security/nss/lib/nss/nss_nss3 -L native=/tmp/portage/www-client/firefox-135.0/work/firefox_build/security/nss/lib/ssl/ssl_ssl3 -L native=/tmp/portage/www-client/firefox-135.0/work/firefox_build/config/external/nspr/pr` (signal: 6, SIGABRT: process abort signal) 29:48.54 warning: build failed, waiting for other jobs to finish... [...] 29:49.96 gmake[4]: *** [/tmp/portage/www-client/firefox-135.0/work/firefox-135.0/config/makefiles/rust.mk:506: force-cargo-library-build] Error 101 29:49.96 gmake[4]: Leaving directory '/tmp/portage/www-client/firefox-135.0/work/firefox_build/toolkit/library/rust' 29:49.96 gmake[3]: *** [/tmp/portage/www-client/firefox-135.0/work/firefox-135.0/config/recurse.mk:72: toolkit/library/rust/target-objects] Error 2 29:49.96 gmake[3]: Leaving directory '/tmp/portage/www-client/firefox-135.0/work/firefox_build' 29:49.96 gmake[2]: *** [/tmp/portage/www-client/firefox-135.0/work/firefox-135.0/config/recurse.mk:34: compile] Error 2 29:49.96 gmake[2]: Leaving directory '/tmp/portage/www-client/firefox-135.0/work/firefox_build' 29:49.96 gmake[1]: *** [/tmp/portage/www-client/firefox-135.0/work/firefox-135.0/config/rules.mk:359: default] Error 2 29:49.96 gmake[1]: Leaving directory '/tmp/portage/www-client/firefox-135.0/work/firefox_build' 29:49.96 gmake: *** [client.mk:60: build] Error 2 29:50.16 W 0 compiler warnings present. * ERROR: www-client/firefox-135.0::gentoo failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 136: Called src_compile * environment, line 5047: Called die * The specific snippet of code: * ${virtx_cmd} ./mach build --verbose || die
Created attachment 918179 [details] emerge --info www-client/firefox
Created attachment 918180 [details] build.log
``` 29:48.47 rustc: /tmp/portage/dev-lang/rust-1.81.0-r100/work/rustc-1.81.0-src/src/llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:298: void llvm::Loc::MMI::addFrameIndexExpr(const llvm::DIExpression*, int): Assertion `(FrameIndexExprs.size() == 1 || llvm::all_of(FrameIndexExprs, [](const FrameIndexExpr &FIE) { return FIE.Expr && FIE.Expr->isFragment(); })) && "conflicting locations for variable"' failed. ``` Not sure if we can backport the fix to 1.81.0-r100...
Same issue with dev-lang/rust-1.84.0/work/rustc-1.84.0: [...] rustc: /[...]/dev-lang/rust-1.84.0/work/rustc-1.84.0-src/src/llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:298: void llvm::Loc::MMI::addFrameIndexExpr(const llvm::DIExpression*, int): Assertion `(FrameIndexExprs.size() == 1 || llvm::all_of(FrameIndexExprs, [](const FrameIndexExpr &FIE) { return FIE.Expr && FIE.Expr->isFragment(); })) && "conflicting locations for variable"' failed.
(In reply to Andrey Vul from comment #4) > Same issue with dev-lang/rust-1.84.0/work/rustc-1.84.0: I confirm that compilation of firefox-135.0 also fails for me with LLVM_SLOT="19" and rust-1.84.0: 7:16.33 rustc: /tmp/portage/dev-lang/rust-1.84.0/work/rustc-1.84.0-src/src/llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:298: void llvm::Loc::MMI::addFrameIndexExpr(const llvm::DIExpression*, int): Assertion `(FrameIndexExprs.size() == 1 || llvm::all_of(FrameIndexExprs, [](const FrameIndexExpr &FIE) { return FIE.Expr && FIE.Expr->isFragment(); })) && "conflicting locations for variable"' failed.
The gift that keeps on giving. The fix I mentioned previously is now now tagged for rust-1.84.1. If you apply https://github.com/rust-lang/rust/commit/1dc106121b62562ead6e7d612fa136dc4b35cd5d.patch again on =dev-lang/rust-1.84.0, recompile rust with it (make sure it's applied) and try again, is it working?
Actually looks like 1.84.1 is out, maybe it's better to wait until that is packaged in Gentoo.
(In reply to Joonas Niilola from comment #6) > The gift that keeps on giving. The fix I mentioned previously is now now > tagged for rust-1.84.1. > > If you apply > https://github.com/rust-lang/rust/commit/ > 1dc106121b62562ead6e7d612fa136dc4b35cd5d.patch again on > =dev-lang/rust-1.84.0, recompile rust with it (make sure it's applied) and > try again, is it working? Unless I am missing something, this change appears to be in 1.84.0 already?
> > Unless I am missing something, this change appears to be in 1.84.0 already? > According to https://github.com/rust-lang/rust/commit/1dc106121b62562ead6e7d612fa136dc4b35cd5d tags containing that commits are 1.84.0 and 1.84.1, so it shouldn't be the fix?
Added rust-1.84.1 in commits https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5874423f3a4394b63387dd25f31d702458710dc6 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5025d09088792f6f6817dd2f3a677c7c593c51cc
rust-1.84.1 contains https://github.com/rust-lang/rust/pull/135643 which might do it
(In reply to Sam James from comment #11) > rust-1.84.1 contains https://github.com/rust-lang/rust/pull/135643 which > might do it Same error with dev-lang/rust-1.84.1: 15:40.35 rustc: /tmp/portage/dev-lang/rust-1.84.1/work/rustc-1.84.1-src/src/llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:298: void llvm::Loc::MMI::addFrameIndexExpr(const llvm::DIExpression*, int): Assertion `(FrameIndexExprs.size() == 1 || llvm::all_of(FrameIndexExprs, [](const FrameIndexExpr &FIE) { return FIE.Expr && FIE.Expr->isFragment(); })) && "conflicting locations for variable"' failed.
Same issue compiling =www-client/firefox-136.0 =dev-lang/rust-1.85.0 last night. I happened to have debug symbols for pretty much everything, so I managed to get a pretty decent stack trace: ``` Core was generated by `/usr/lib/rust/1.85.0/bin/rustc --crate-name mls_platform_api --edition=2021 /va'. Program terminated with signal SIGABRT, Aborted. #0 0x00007f47650a579c in ?? () from /usr/lib64/libc.so.6 [Current thread is 1 (Thread 0x7f47433e16c0 (LWP 20627))] (gdb) where #0 0x00007f47650a579c in ?? () from /usr/lib64/libc.so.6 #1 0x00007f47650504f6 in raise () from /usr/lib64/libc.so.6 #2 0x00007f47650388fa in abort () from /usr/lib64/libc.so.6 #3 0x00007f476503881e in ?? () from /usr/lib64/libc.so.6 #4 0x00007f4765048af6 in __assert_fail () from /usr/lib64/libc.so.6 #5 0x00007f4769b19e14 in llvm::Loc::MMI::addFrameIndexExpr(llvm::DIExpression const*, int) [clone .localalias] () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #6 0x00007f4769b26572 in llvm::DwarfDebug::collectVariableInfoFromMFTable(llvm::DwarfCompileUnit&, llvm::DenseSet<std::pair<llvm::DINode const*, llvm::DILocation const*>, llvm::DenseMapInfo<std::pair<llvm::DINode const*, llvm::DILocation const*>, void> >&) [clone .localalias] () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #7 0x00007f4769b289c1 in llvm::DwarfDebug::collectEntityInfo(llvm::DwarfCompileUnit&, llvm::DISubprogram const*, llvm::DenseSet<std::pair<llvm::DINode const*, llvm::DILocation const*>, llvm::DenseMapInfo<std::pair<llvm::DINode const*, llvm::DILocation const*>, void> >&) [clone .localalias] () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #8 0x00007f4769b2fac1 in llvm::DwarfDebug::endFunctionImpl(llvm::MachineFunction const*) [clone .localalias] () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #9 0x00007f4769aff39d in llvm::DebugHandlerBase::endFunction(llvm::MachineFunction const*) () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #10 0x00007f4769af77b8 in llvm::AsmPrinter::emitFunctionBody() [clone .localalias] () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #11 0x00007f47699021ef in llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #12 0x00007f4769e94539 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) [clone .part.0] () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #13 0x00007f476b612ff7 in llvm::FPPassManager::runOnFunction(llvm::Function&) [clone .localalias] () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #14 0x00007f476b61323b in llvm::FPPassManager::runOnModule(llvm::Module&) [clone .localalias] () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #15 0x00007f476b613e6c in llvm::legacy::PassManagerImpl::run(llvm::Module&) [clone .localalias] () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #16 0x00007f47698ccde8 in LLVMRustWriteOutputFile () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #17 0x00007f476686c038 in rustc_codegen_llvm::back::write::write_output_file () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #18 0x00007f4766870e1c in rustc_codegen_llvm::back::write::codegen () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #19 0x00007f47668613e1 in rustc_codegen_ssa::back::write::finish_intra_module_work::<rustc_codegen_llvm::LlvmCodegenBackend> () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #20 0x00007f4766861769 in rustc_codegen_ssa::back::write::execute_optimize_work_item::<rustc_codegen_llvm::LlvmCodegenBackend> () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #21 0x00007f4766898e28 in std::sys::backtrace::__rust_begin_short_backtrace::<<rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa::back::write::spawn_work<rustc_codegen_llvm::LlvmCodegenBackend>::{closure#0}, ()>::{closure#0}, ()> () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #22 0x00007f476689f2ff in <<std::thread::Builder>::spawn_unchecked_<<rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa::back::write::spawn_work<rustc_codegen_llvm::LlvmCodegenBackend>::{closure#0}, ()>::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #23 0x00007f47697e7b6b in std::sys::pal::unix::thread::Thread::new::thread_start () from /usr/lib/rust/1.85.0/bin/../lib/librustc_driver-3d045d00de979894.so #24 0x00007f47650a3a61 in ?? () from /usr/lib64/libc.so.6 #25 0x00007f4765124b6c in ?? () from /usr/lib64/libc.so.6 ```
Upstream rust has managed to reproduced the crash in `rustc`, by compiling a version of the 'mls-platform-api' thirdparty library. https://github.com/rust-lang/rust/issues/138198 Upstream rust also determined that newer versions of 'mls-platform-api' appear to have already created a workaround to mitigate the original SIGABORT affecting <dev-lang/rust-1.84.0: https://github.com/awslabs/mls-rs/pull/231 Upstream rust verified just now that the workaround in the latest 'mls-platform-api' appears to prevent the same SIGABORT in `rustc` even after upstream rust's previous attempted fix in >=dev-lang/rust-1.84.0, because reverting the workaround in 'mls-platform-api' reintroduces the SIGABORT when compiling the third party library with the latest rustc.
Created attachment 920383 [details, diff] workaround.patch Applying the same workaround to 'mls-platform-api' folder, in `/etc/portage/patches/www-client/firefox/` appears to workaround the same crash on Gentoo, allowing the build to proceed. See workaround.patch **Note for novice users** This is not a fix for rust itself, but is enough to tiptoe around the issue while upstream rust is working on the real fix.
(In reply to Yuri Sevatz from comment #14) Thanks a lot for reporting this and finding a smaller reproducer!
just a quick confirmation: recently supplied patch fixes the issue: www-client/firefox-136.0 built successfully with dev-lang/rust-1.85.0-r1
juippis: could you add that in for now?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10dbd6b1e046c269880f635a7b06b05dbf1e6c69 commit 10dbd6b1e046c269880f635a7b06b05dbf1e6c69 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2025-03-27 11:55:56 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2025-03-27 11:57:47 +0000 www-client/firefox: add 136.0.3 - add a patch from bug#949280 to mls-rs crate which should fix some rust-related issues when compiling firefox. Bug: https://bugs.gentoo.org/949280 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 102 +++ www-client/firefox/firefox-136.0.3.ebuild | 1371 +++++++++++++++++++++++++++++ 2 files changed, 1473 insertions(+)