-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spidermonkey: specify rust target #266560
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In some cases the logic for mapping autoconf targets to rustc targets in spidermonkey's configure scripts fails. Simply tell it what rustc target to use since we already know. Fixes pkgsMusl.spidermonkey
How come this isn't a problem for Firefox? |
alyssais
added a commit
to alyssais/nixpkgs
that referenced
this pull request
Jan 29, 2024
rustc 1.73.0 introduced a new x86_64-unikraft-linux-musl target. This triple is a bit of a lie — the kernel in this case is unikraft, which isn't Linux, it just tries to be compatible with it. But this User-Agent-like string of a triple now exists, and with it comes some fallout. Spidermonkey asks rustc for the list of supported targets, then picks the one that best matches the GNU triple it's building for, which in the native case config.guess will say is x86_64-pc-linux-musl. Prior to rustc 1.73.0, all was well, because there was only one x86_64 musl triple, but now there are two: x86_64-unknown-linux-musl, and x86_64-unikraft-linux-musl, and neither of those are obviously closer than the other to x86_64-pc-linux-musl to Spidermonkey's build system. As a result, it can't decide which target to pass to rustc, and bails out. We can fix this by telling Spidermonkey what platform it should be building for, rather than letting it guess, which previously we did only when cross compiling. This approach is already used in the Firefox derivation (which is why it was not affected by the rustc update), so it's been well tested already. Closes: NixOS#266560 Closes: NixOS#282923
alyssais
added a commit
to alyssais/nixpkgs
that referenced
this pull request
Jan 29, 2024
rustc 1.73.0 introduced a new x86_64-unikraft-linux-musl target. This triple is a bit of a lie — the kernel in this case is unikraft, which isn't Linux, it just tries to be compatible with it. But this User-Agent-like string of a triple now exists, and with it comes some fallout. Spidermonkey asks rustc for the list of supported targets, then picks the one that best matches the GNU triple it's building for, which in the native case config.guess will say is x86_64-pc-linux-musl. Prior to rustc 1.73.0, all was well, because there was only one x86_64 musl triple, but now there are two: x86_64-unknown-linux-musl, and x86_64-unikraft-linux-musl, and neither of those are obviously closer than the other to x86_64-pc-linux-musl to Spidermonkey's build system. As a result, it can't decide which target to pass to rustc, and bails out. We can fix this by telling Spidermonkey what platform it should be building for, rather than letting it guess, which previously we did only when cross compiling. This approach is already used in the Firefox derivation (which is why it was not affected by the rustc update), so it's been well tested already. Closes: NixOS#266560 Closes: NixOS#282923
13 tasks
I figured out the answer, and it led me to a much simpler fix: #284838 |
alyssais
added a commit
to alyssais/nixpkgs
that referenced
this pull request
Jan 29, 2024
rustc 1.73.0 introduced a new x86_64-unikraft-linux-musl target. This triple is a bit of a lie — the kernel in this case is unikraft, which isn't Linux, it just tries to be compatible with it. But this User-Agent-like string of a triple now exists, and with it comes some fallout. Spidermonkey asks rustc for the list of supported targets, then picks the one that best matches the GNU triple it's building for, which in the native case config.guess will say is x86_64-pc-linux-musl. Prior to rustc 1.73.0, all was well, because there was only one x86_64 musl triple, but now there are two: x86_64-unknown-linux-musl, and x86_64-unikraft-linux-musl, and neither of those are obviously closer than the other to x86_64-pc-linux-musl to Spidermonkey's build system. As a result, it can't decide which target to pass to rustc, and bails out. We can fix this by telling Spidermonkey what platform it should be building for, rather than letting it guess, which previously we did only when cross compiling. This approach is already used in the Firefox derivation (which is why it was not affected by the rustc update), so it's been well tested already. Closes: NixOS#266560 Closes: NixOS#282923
alyssais
added a commit
that referenced
this pull request
Feb 1, 2024
rustc 1.73.0 introduced a new x86_64-unikraft-linux-musl target. This triple is a bit of a lie — the kernel in this case is unikraft, which isn't Linux, it just tries to be compatible with it. But this User-Agent-like string of a triple now exists, and with it comes some fallout. Spidermonkey asks rustc for the list of supported targets, then picks the one that best matches the GNU triple it's building for, which in the native case config.guess will say is x86_64-pc-linux-musl. Prior to rustc 1.73.0, all was well, because there was only one x86_64 musl triple, but now there are two: x86_64-unknown-linux-musl, and x86_64-unikraft-linux-musl, and neither of those are obviously closer than the other to x86_64-pc-linux-musl to Spidermonkey's build system. As a result, it can't decide which target to pass to rustc, and bails out. We can fix this by telling Spidermonkey what platform it should be building for, rather than letting it guess, which previously we did only when cross compiling. This approach is already used in the Firefox derivation (which is why it was not affected by the rustc update), so it's been well tested already. Closes: #266560 Closes: #282923
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In some cases the logic for mapping autoconf targets to rustc targets in spidermonkey's configure scripts fails. Simply tell it what rustc target to use since we already know.
Fixes pkgsMusl.spidermonkey
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)