Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946664 - www-client/firefox-128.5.0: fails to build with rust-bin on musl system
Summary: www-client/firefox-128.5.0: fails to build with rust-bin on musl system
Status: CONFIRMED
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:
Depends on:
Blocks:
 
Reported: 2024-12-19 09:58 UTC by Petr Vaněk
Modified: 2025-01-14 04:56 UTC (History)
6 users (show)

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


Attachments
build.firefox.musl.log.xz (build.firefox.musl.log.xz,103.47 KB, application/x-xz)
2024-12-19 09:58 UTC, Petr Vaněk
Details
emerge-info (emerge.info,5.50 KB, text/plain)
2024-12-19 09:58 UTC, Petr Vaněk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Vaněk gentoo-dev 2024-12-19 09:58:11 UTC
Created attachment 914355 [details]
build.firefox.musl.log.xz

The build fails with dev-lang/rust-bin-1.83.0 with this error:

8 1:15.72 error: failed to run custom build command for `proc-macro2 v1.0.74`
8 1:15.72 note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
8 1:15.72 Caused by:
8 1:15.75   process didn't exit successfully: `CARGO=/opt/rust-bin-1.83.0/bin/cargo CARGO_CFG_PANIC=unwind CARGO_CFG_TARGET_ABI='' CARGO_CFG_TARGET_ARCH=x86_64 CARGO_CFG_TARGET_ENDIAN=little CARGO_CFG_TARGET_ENV=musl CARGO_CFG_TARGET_FAMIL
Y=unix CARGO_CFG_TARGET_FEATURE=fxsr,sse,sse2 CARGO_CFG_TARGET_HAS_ATOMIC=16,32,64,8,ptr CARGO_CFG_TARGET_OS=linux CARGO_CFG_TARGET_POINTER_WIDTH=64 CARGO_CFG_TARGET_VENDOR=unknown CARGO_CFG_UNIX='' CARGO_ENCODED_RUSTFLAGS='' CARGO_FEATURE
_DEFAULT=1 CARGO_FEATURE_PROC_MACRO=1 CARGO_MANIFEST_DIR=/var/tmp/portage/www-client/firefox-128.5.0/work/firefox-128.5.0/third_party/rust/proc-macro2 CARGO_MANIFEST_PATH=/var/tmp/portage/www-client/firefox-128.5.0/work/firefox-128.5.0/thi
rd_party/rust/proc-macro2/Cargo.toml CARGO_PKG_AUTHORS='David Tolnay <dtolnay@gmail.com>:Alex Crichton <alex@alexcrichton.com>' CARGO_PKG_DESCRIPTION='A substitute implementation of the compiler'\''s `proc_macro` API to decouple token-base
d libraries from the procedural macro use case.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=proc-macro2 CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/dtolnay/p
roc-macro2' CARGO_PKG_RUST_VERSION=1.56 CARGO_PKG_VERSION=1.0.74 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=74 CARGO_PKG_VERSION_PRE='' DEBUG=false HOST=x86_64-unknown-linux-musl LD_LIBRARY_PATH='/var/tmp/p
ortage/www-client/firefox-128.5.0/work/firefox_build/release/deps:/var/tmp/portage/www-client/firefox-128.5.0/work/firefox_build/release:/opt/rust-bin-1.83.0/lib/rustlib/x86_64-unknown-linux-musl/lib' NUM_JOBS=8 OPT_LEVEL=1 OUT_DIR=/var/tm
p/portage/www-client/firefox-128.5.0/work/firefox_build/release/build/proc-macro2-aabe2690e8bf43f2/out PROFILE=release RUSTC=/opt/rust-bin-1.83.0/bin/rustc RUSTC_LINKER=/var/tmp/portage/www-client/firefox-128.5.0/work/firefox-128.5.0/build
/cargo-linker RUSTDOC=/opt/rust-bin-1.83.0//bin/rustdoc TARGET=x86_64-unknown-linux-musl /var/tmp/portage/www-client/firefox-128.5.0/work/firefox_build/release/build/proc-macro2-e66da4ffb5e788ee/build-script-build` (signal: 11, SIGSEGV: in
valid memory reference)

and following message appears in dmesg

[Dec18 19:01] build-script-bu[6710]: segfault at 7d640 ip 00007f7bbbb2f5ed sp 00007ffc82198860 error 6 in build-script-build[685ed,7f7bbbadb000+63000] likely on CPU 5 (core 1, socket 0)
[  +0.000017] Code: 48 81 c4 70 01 00 00 5b c3 c3 53 48 89 fa 31 c0 b9 4c 00 00 00 48 81 ec 50 01 00 00 48 8d 7c 24 20 f3 ab 48 8b 05 db 23 01 00 <48> 89 10 31 c0 48 8b 0c c2 48 ff c0 48 85 c9 75 f4 48 8d 04 c2 48

build pass if I switch to dev-lang/rust-1.83.0-r1.
Comment 1 Petr Vaněk gentoo-dev 2024-12-19 09:58:42 UTC
Created attachment 914356 [details]
emerge-info
Comment 2 Joonas Niilola gentoo-dev 2024-12-19 10:44:12 UTC
Yeah, it's a known thing. Before the rust changes firefox ebuild forced non-bin rust dep on musl, and maybe that needs to be put back for now. Although the real fix was related to something else, but I don't remember whether it was a rust thing, eclass thing or ebuild thing. Need to dig the discussion we had with sam a while ago in #gentoo-mozilla
Comment 3 Joonas Niilola gentoo-dev 2024-12-19 17:33:49 UTC
bug 938847
Comment 4 Rémi Cardona 2025-01-13 20:46:08 UTC
Hi all,

I have a *very* similar issue but with the following differences:
- plain old glibc system (no musl)
- thunderbird (not firefox)
- uniffi_bindgen crate (not proc-macro2)

But the segfault and outcome is the same. I had to p.mask 1.84.0 down to 1.83.0 to get a successful build. I opened a different bug (#948059) but I thought the issues were close enough (namely rust-bin) that I should mention it here too.

Cheers.