Skip to content
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

Rustup doesn't work on NixOS when downloading wasix #22

Open
svelterust opened this issue Jul 17, 2023 · 0 comments
Open

Rustup doesn't work on NixOS when downloading wasix #22

svelterust opened this issue Jul 17, 2023 · 0 comments

Comments

@svelterust
Copy link

The first reason is that rustc will already point to the system installed Rust:

~/.rustup/toolchains ❯ command -v rustc
/etc/profiles/per-user/odd/bin/rustc
~/.rustup/toolchains ❯ rustc +wasix --print sysroot
error: couldn't read +wasix: No such file or directory (os error 2)

The second reason is that the downloaded files such as rustc and rustdoc needs to be patched with patchelf, otherwise they won't run due to assuming paths for dependencies:

toolchains/wasix/bin ❯ pwd
/home/odd/.rustup/toolchains/wasix/bin
toolchains/wasix/bin ❯ ls
rustc  rustdoc
toolchains/wasix/bin ❯ ./rustc
bash: ./rustc: cannot execute: required file not found

Nix stores these dependencies in /nix/store, which is why they need patching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant