Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 825498 - dev-lang/spidermonkey fails to configure on amd64-musl and aarch64-musl with >=dev-lang/rust-1.53.0
Summary: dev-lang/spidermonkey fails to configure on amd64-musl and aarch64-musl with ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-21 11:28 UTC by tt_1
Modified: 2024-02-11 06:00 UTC (History)
4 users (show)

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


Attachments
build log (spidermonkey-78-failed-to-config-dev-lang-rust.log,27.56 KB, text/x-log)
2021-11-21 11:28 UTC, tt_1
Details
output from emerge --info (emerge-info,5.12 KB, text/plain)
2021-11-21 11:29 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2021-11-21 11:28:42 UTC
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.
Comment 1 tt_1 2021-11-21 11:29:42 UTC
Created attachment 754138 [details]
output from emerge --info
Comment 2 tt_1 2021-11-21 11:31:07 UTC
P.S: firefox will most likely also be affected, but I chose spidermonkey as it has less dependencies to bootstrap through, hope its okay.
Comment 3 tt_1 2021-11-24 15:56:21 UTC
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
Comment 4 Agostino Sarubbo gentoo-dev 2021-11-30 08:32:46 UTC
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
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-01 10:29:06 UTC
I really think we should just apply the musl/Rust patch conditionally for now.
Comment 6 tt_1 2021-12-01 10:32:46 UTC
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.
Comment 7 Jory A. Pratt gentoo-dev 2021-12-11 02:13:04 UTC
(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.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-11 02:17:10 UTC
(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.