Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942013 - www-client/firefox-131.0.3[-clang] compile failure with dev-lang/rust-1.82.0
Summary: www-client/firefox-131.0.3[-clang] compile failure with dev-lang/rust-1.82.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: PATCH
: 942600 (view as bug list)
Depends on: 942884
Blocks:
  Show dependency tree
 
Reported: 2024-10-23 14:14 UTC by Ulrich Müller
Modified: 2025-02-04 16:33 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.xz,227.41 KB, application/x-xz)
2024-10-23 14:16 UTC, Ulrich Müller
Details
emerge --info (emerge-info,9.25 KB, text/plain)
2024-10-23 14:17 UTC, Ulrich Müller
Details
Modified Rust patch (rust-1dc106121b62562ead6e7d612fa136dc4b35cd5d.patch,10.19 KB, patch)
2024-11-11 05:59 UTC, Alex Belits
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2024-10-23 14:14:56 UTC
20:24.84 rustc: /tmp/portage/dev-lang/rust-1.82.0/work/rustc-1.82.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.
20:24.93 warning: `authenticator` (lib) generated 6 warnings
20:24.93 error: could not compile `authenticator` (lib); 6 warnings emitted
20:24.93 Caused by:
20:24.94   process didn't exit successfully: `CARGO=/usr/lib/rust/1.82.0/bin/cargo-1.82.0 CARGO_CRATE_NAME=authenticator CARGO_MANIFEST_DIR=/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/third_party/rust/authenticator CARGO_PKG_AUTHORS='Dana Keeler <dkeeler@mozilla.com>:J.C. Jones <jc@mozilla.com>:John Schanck <jschanck@mozilla.com>:Kyle Machulis <kyle@nonpolynomial.com>:Martin Sirringhaus <martin.sirringhaus@suse.com:Tim Taubert <ttaubert@mozilla.com>' CARGO_PKG_DESCRIPTION='Library for interacting with CTAP1/2 security keys for Web Authentication. Used by Firefox.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MPL-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=authenticator CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/mozilla/authenticator-rs/' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.4.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=4 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/release/deps OUT_DIR=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/build/authenticator-9790d1080d4b6f3d/out /usr/bin/rustc --crate-name authenticator --edition=2018 /tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/third_party/rust/authenticator/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="crypto_nss"' --cfg 'feature="default"' --cfg 'feature="gecko"' --cfg 'feature="nss-gk-api"' --cfg 'feature="pkcs11-bindings"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("bindgen", "binding-recompile", "bytes", "crypto_dummy", "crypto_nss", "crypto_openssl", "default", "gecko", "nss-gk-api", "openssl", "openssl-sys", "pkcs11-bindings"))' -C metadata=cf3aeeda15f29ada -C extra-filename=-cf3aeeda15f29ada --out-dir /tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/build/cargo-linker -C strip=debuginfo -L dependency=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/release/deps --extern base64=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libbase64-4a8390af7b74688b.rmeta --extern bitflags=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libbitflags-cd02baa62021ff70.rmeta --extern cfg_if=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libcfg_if-8da518b2c80941e2.rmeta --extern libc=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/liblibc-8eb4b87ca87f3ad3.rmeta --extern libudev=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/liblibudev-8d3dafdbe3eafaae.rmeta --extern log=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/liblog-1971b1486ccc4da7.rmeta --extern nss_gk_api=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libnss_gk_api-23b961f964f5c91f.rmeta --extern pkcs11_bindings=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libpkcs11_bindings-a6095a98374e4107.rmeta --extern rand=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/librand-4ef99b6caa1c6036.rmeta --extern runloop=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/librunloop-4d7f322208dafd0e.rmeta --extern serde=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libserde-7a8762fbec9cbfe8.rmeta --extern serde_bytes=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libserde_bytes-77261352579df495.rmeta --extern serde_cbor=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libserde_cbor-430eb08a40785275.rmeta --extern serde_json=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libserde_json-f21a44a09ca92d7d.rmeta --extern sha2=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/x86_64-unknown-linux-gnu/release/deps/libsha2-79713c67e5ce89fc.rmeta --cap-lints warn -C debuginfo=2 --cap-lints warn -C codegen-units=1 -L native=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/dist/bin -L native=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/security/nss/lib/nss/nss_nss3 -L native=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/security/nss/lib/ssl/ssl_ssl3 -L native=/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/config/external/nspr/pr` (signal: 6, SIGABRT: process abort signal)
20:24.94 warning: build failed, waiting for other jobs to finish...
[...]
20:26.32 gmake[4]: *** [/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/config/makefiles/rust.mk:500: force-cargo-library-build] Error 101
20:26.32 gmake[4]: Leaving directory '/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/toolkit/library/rust'
20:26.32 gmake[3]: *** [/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/config/recurse.mk:72: toolkit/library/rust/target-objects] Error 2
20:26.32 gmake[3]: Leaving directory '/tmp/portage/www-client/firefox-131.0.3/work/firefox_build'
20:26.32 gmake[2]: *** [/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/config/recurse.mk:34: compile] Error 2
20:26.32 gmake[2]: Leaving directory '/tmp/portage/www-client/firefox-131.0.3/work/firefox_build'
20:26.32 gmake[1]: *** [/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/config/rules.mk:359: default] Error 2
20:26.32 gmake[1]: Leaving directory '/tmp/portage/www-client/firefox-131.0.3/work/firefox_build'
20:26.32 gmake: *** [client.mk:60: build] Error 2
20:26.42 W 0 compiler warnings present.
 * ERROR: www-client/firefox-131.0.3::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 136:  Called src_compile
 *   environment, line 5186:  Called die
 * The specific snippet of code:
 *       ${virtx_cmd} ./mach build --verbose || die
Comment 1 Ulrich Müller gentoo-dev 2024-10-23 14:16:27 UTC
Created attachment 906601 [details]
build.log
Comment 2 Ulrich Müller gentoo-dev 2024-10-23 14:17:18 UTC
Created attachment 906602 [details]
emerge --info
Comment 3 Ulrich Müller gentoo-dev 2024-10-23 14:18:16 UTC
I've also tried to build with LLVM_SLOT="19" but it fails with the same error.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-23 14:35:06 UTC
```
20:24.84 rustc: /tmp/portage/dev-lang/rust-1.82.0/work/rustc-1.82.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.
20:24.93 warning: `authenticator` (lib) generated 6 warnings
20:24.93 error: could not compile `authenticator` (lib); 6 warnings emitted
20:24.93 Caused by:
[...]
```
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-23 14:35:44 UTC
This is https://github.com/rust-lang/rust/issues/131944.
Comment 6 Ulrich Müller gentoo-dev 2024-10-23 15:22:02 UTC
I can confirm that firefox builds successfully after I have downgraded to dev-lang/rust-1.81.0.
Comment 7 Joonas Niilola gentoo-dev 2024-10-23 15:47:23 UTC
There's no related bug in mozilla's firefox rust-1.82 tracker: https://bugzilla.mozilla.org/show_bug.cgi?id=1909343

and I've personally been able to compile 131.0.3 with both -clang and +clang, using +llvm_slot_19. 

The rust tracker seems to have some fixes, but I just skimmed through it.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-23 16:02:04 UTC
It's a bug in either rust or its bundled copy of LLVM, anyway.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-31 13:13:54 UTC
*** Bug 942600 has been marked as a duplicate of this bug. ***
Comment 10 Alex Belits 2024-11-11 05:59:44 UTC
Created attachment 908444 [details, diff]
Modified Rust patch

This is a commit 1dc106121b62562ead6e7d612fa136dc4b35cd5d from https://github.com/khuey/rust that fixes issue https://github.com/rust-lang/rust/issues/131944 , modified to be applicable to dev-lang/rust-1.82.0-r100.

In my limited testing it works with the current Thunderbird build, that breaks with the original dev-lang/rust-1.82.0-r100.

I am not familiar with Rust releases and version naming, however I have noticed that whatever binary release of Rust is installed by Firefox/Thunderbird build procedure, calls itself (rustc --version)

rustc 1.82.0 (f6e511eec 2024-10-15)

yet builds the same source without problems, so this issue seems to be fixed in it.

On the other hand, dev-lang/rust-1.82.0-r100 calls itself

rustc 1.82.0 (f6e511eec 2024-10-15) (gentoo)

yet has the issue. This is very confusing.
Comment 11 Mark Purtill 2024-12-08 05:06:25 UTC
I'm seeing www-client/firefox-128.5.0 not compile with dev-lang/rust-1.82.0-r100:1.82.0::gentoo with what appears to be the same problem.  Should I open a new bug or post my logs, etc., here?
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-08 05:10:09 UTC
Just add yourself to CC and wait for a resolution -- I can maybe see about adding that patch to 1.82.0 later.
Comment 13 Larry the Git Cow gentoo-dev 2024-12-08 07:04:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63c8a2cf0acb13d7ab69b508a7697cd2b920fdf3

commit 63c8a2cf0acb13d7ab69b508a7697cd2b920fdf3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-12-08 06:57:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-12-08 07:03:55 +0000

    dev-lang/rust: fix LLVM assertion with debug info in 1.82.0
    
    Closes: https://bugs.gentoo.org/942013
    Closes: https://bugs.gentoo.org/942884
    Closes: https://bugs.gentoo.org/945486
    Signed-off-by: Sam James <sam@gentoo.org>

 .../rust/files/1.82.0-dwarf-llvm-assertion.patch   | 247 +++++++
 dev-lang/rust/rust-1.82.0-r101.ebuild              | 747 +++++++++++++++++++++
 2 files changed, 994 insertions(+)
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-08 07:05:16 UTC
Please try 1.82.0-r101. If that works, I'll stable it.
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-08 07:05:25 UTC
(In reply to Alex Belits from comment #10)

(Thank you)
Comment 16 qrs01 2024-12-08 20:15:02 UTC
> Please try 1.82.0-r101. If that works, I'll stable it.

This same issue was also effecting thunderbird with the same errors. rust-1.82.0-r101 fixes the compile error for both thunderbird and firefox for me. 
Thank you Sam!(In reply to Sam James from comment #14)
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-08 22:50:04 UTC
Thank you all!
Comment 18 Larry the Git Cow gentoo-dev 2024-12-08 22:51:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6aa2f9ceb871f5349e7aa81c91e4749364d7165a

commit 6aa2f9ceb871f5349e7aa81c91e4749364d7165a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-12-08 22:50:56 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-12-08 22:50:56 +0000

    dev-lang/rust: stabilize 1.82.0-r101
    
    Closes: https://bugs.gentoo.org/942013
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/rust/rust-1.82.0-r101.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)