Created attachment 754134 [details] build log so I emerged plain stock dev-lang/rust with these useflags: emerge -pv dev-lang/rust These are the packages that would be merged, in order: [ebuild R ] dev-lang/rust-1.53.0:stable/1.53::gentoo USE="-clippy -debug -doc (-miri) (-nightly) (-parallel-compiler) -rls -rustfmt (-system-bootstrap) -system-llvm -test -verify-sig -wasm" LLVM_TARGETS="(AArch64) ARM -AMDGPU -AVR -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ -WebAssembly -X86 -XCore" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB and configuring spidermonkey with said dev-lang/rust fails: DEBUG: Creating `/var/tmp/portage/dev-lang/spidermonkey-78.14.0/temp/conftestdxkoz9fx.rs` with content: DEBUG: | pub extern fn hello() { println!("Hello world"); } DEBUG: Executing: `/usr/bin/rustc --crate-type staticlib --target=aarch64-gentoo-linux-musl -o /var/tmp/portage/dev-lang/spidermonkey-78.14.0/temp/conftest9ftqp_8l.rlib /var/tmp/portage/dev-lang/spidermonkey-78.14.0/temp/conftestdxkoz9fx.rs` DEBUG: The command returned non-zero exit status 1. DEBUG: Its error output was: DEBUG: | error[E0463]: can't find crate for `std` DEBUG: | | DEBUG: | = note: the `aarch64-gentoo-linux-musl` target may not be installed DEBUG: | DEBUG: | error: aborting due to previous error DEBUG: | DEBUG: | For more information about this error, try `rustc --explain E0463`. ERROR: Cannot compile for aarch64-gentoo-linux-musl with /usr/bin/rustc The target may be unsupported, or you may not have a rust std library for that target installed. Try: rustup target add aarch64-gentoo-linux-musl rustlib installed by the build is nick named "aarch64-unknown-linux-musl", so the config is in a way right that the std is missing. But working dev-lang/rust-bin does install the very same rust-std "aarch64-unknown-linux-musl" current workaround is therefore to use dev-lang/rust-bin instead.
Created attachment 754138 [details] output from emerge --info
P.S: firefox will most likely also be affected, but I chose spidermonkey as it has less dependencies to bootstrap through, hope its okay.
reproduced with amd64: DEBUG: Creating `/var/tmp/portage/dev-lang/spidermonkey-78.15.0/temp/conftestup3tux_a.rs` with content: DEBUG: | pub extern fn hello() { println!("Hello world"); } DEBUG: Executing: `/usr/bin/rustc --crate-type staticlib --target=x86_64-gentoo-linux-musl -o /var/tmp/portage/dev-lang/spidermonkey-78.15.0/temp/conftestws670mk1.rlib /var/tmp/portage/dev-lang/spidermonkey-78.15.0/temp/conftestup3tux_a.rs` DEBUG: The command returned non-zero exit status 1. DEBUG: Its error output was: DEBUG: | error[E0463]: can't find crate for `std` DEBUG: | | DEBUG: | = note: the `x86_64-gentoo-linux-musl` target may not be installed DEBUG: | DEBUG: | error: aborting due to previous error DEBUG: | DEBUG: | For more information about this error, try `rustc --explain E0463`. ERROR: Cannot compile for x86_64-gentoo-linux-musl with /usr/bin/rustc The target may be unsupported, or you may not have a rust std library for that target installed. Try: rustup target add x86_64-gentoo-linux-musl emerge -pv rust These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-lang/rust-1.53.0:stable/1.53::gentoo USE="-clippy -debug -doc (-miri) (-nightly) (-parallel-compiler) -rls -rustfmt (-system-bootstrap) (-system-llvm) -test -verify-sig -wasm" CPU_FLAGS_X86="sse2" LLVM_TARGETS="AArch64 ARM (X86) -AMDGPU -AVR -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ -WebAssembly -XCore" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB
it fails for me too on arm32: DEBUG: Executing: `/usr/bin/rustc --crate-type staticlib --target=armv7-gentoo-linux-musleabihf -o /var/tmp/portage/dev-lang/spidermonkey-78.15.0/temp/conftestbc93hd8h.rlib /var/tmp/p ortage/dev-lang/spidermonkey-78.15.0/temp/conftestsouc1w9t.rs` DEBUG: The command returned non-zero exit status 1. DEBUG: Its error output was: DEBUG: | error[E0463]: can't find crate for `std` DEBUG: | | DEBUG: | = note: the `armv7-gentoo-linux-musleabihf` target may not be installed DEBUG: | DEBUG: | error: aborting due to previous error DEBUG: | DEBUG: | For more information about this error, try `rustc --explain E0463`. ERROR: Cannot compile for armv7a-unknown-linux-gnueabihf with /usr/bin/rustc The target may be unsupported, or you may not have a rust std library for that target installed. Try: rustup target add armv7-gentoo-linux-musleabihf $ eselect profile show Current /etc/portage/make.profile symlink: default/linux/arm/17.0/armv7a
I really think we should just apply the musl/Rust patch conditionally for now.
the detection seems to work as expected if rust-bin is used on amd64-musl and aarch64-musl. maybe you want to talk to anarchy, I think it was him who wrote both the rust musl patch and those patches adressing musl issues included into the firefox patch tarball.
(In reply to tt_1 from comment #6) > the detection seems to work as expected if rust-bin is used on amd64-musl > and aarch64-musl. maybe you want to talk to anarchy, I think it was him who > wrote both the rust musl patch and those patches adressing musl issues > included into the firefox patch tarball. rust-1.56.1 from :::musl can be used, the -bin can be used for arm64/amd64 after that your compile will be fine.
(In reply to tt_1 from comment #6) > the detection seems to work as expected if rust-bin is used on amd64-musl > and aarch64-musl. maybe you want to talk to anarchy, I think it was him who > wrote both the rust musl patch and those patches adressing musl issues > included into the firefox patch tarball. I'm talking about glibc here though.
Created attachment 900152 [details] build.log (amd64, 115.13.0) Current stable spidermonkey-115.13.0 builds just fine on current stable amd64-musl toolchain. Guess same for current aarch64-musl. Closing as obsolete.