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

Can't use cross for window to linux #675

Closed
rnag opened this issue Mar 27, 2022 · 2 comments
Closed

Can't use cross for window to linux #675

rnag opened this issue Mar 27, 2022 · 2 comments

Comments

@rnag
Copy link

rnag commented Mar 27, 2022

using Windows 11 x64 host machine, Powershell in admin shell. rustc 1.59.0

PS C:\Users\nagri\PycharmProjects\rust.aws-cdk-lambda\cdk-examples\rust-standalone> cross build --target aarch64-unknown-linux-gnu
warning: downloading with complete profile isn't recommended unless you are a developer of the rust language
error: DEPRECATED: future versions of rustup will require --force-non-host to install a non-host toolchain as the default.
warning: toolchain 'stable-x86_64-unknown-linux-gnu' may not be able to run on this system.
warning: If you meant to build software to target that platform, perhaps try `rustup target add x86_64-unknown-linux-gnu` instead?
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2022-02-24, rust version 1.59.0 (9d1b2106e 2022-02-23)
error: some components unavailable for download for channel 'stable': 'miri' for target 'x86_64-unknown-linux-gnu', 'rust-analyzer-preview' for target 'x86_64-unknown-linux-gnu'If you don't need the components, you could try a minimal installation with:

    rustup toolchain add stable --profile minimal
error: couldn't install toolchain `stable-x86_64-unknown-linux-gnu`
caused by: `"rustup" "toolchain" "add" "stable-x86_64-unknown-linux-gnu"` failed with exit code: Some(1)
note: run with `RUST_BACKTRACE=1` for a backtrace
@rnag
Copy link
Author

rnag commented Mar 27, 2022

It looks like I was able to fix it by running rustup toolchain add stable-x86_64-unknown-linux-gnu --profile minimal as shown, though I still have no idea why it was needed.

PS C:\Users\nagri\PycharmProjects\rust.aws-cdk-lambda\cdk-examples\rust-standalone> rustup toolchain add stable-x86_64-unknown-linux-gnu --profile minimal
error: DEPRECATED: future versions of rustup will require --force-non-host to install a non-host toolchain as the default.
warning: toolchain 'stable-x86_64-unknown-linux-gnu' may not be able to run on this system.
warning: If you meant to build software to target that platform, perhaps try `rustup target add x86_64-unknown-linux-gnu` instead?
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2022-02-24, rust version 1.59.0 (9d1b2106e 2022-02-23)
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 53.8 MiB /  53.8 MiB (100 %)  45.0 MiB/s in  1s ETA:  0s
info: installing component 'cargo'
info: installing component 'rust-std'
 25.7 MiB /  25.7 MiB (100 %)  15.8 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 53.8 MiB /  53.8 MiB (100 %)  18.6 MiB/s in  2s ETA:  0s

  stable-x86_64-unknown-linux-gnu installed - (rustc does not exist)

info: checking for self-updates

@Emilgardis
Copy link
Member

Emilgardis commented Mar 28, 2022

Glad you were able to solve it👍.

This is a known and solved issue, current crates.io is heavily outdated, this is fixed on main. The issue comes from rustup: there was no suitable toolchain that included miri that could be downloaded. We've solved this kind of issue by specifying --profile minimal now.

There is another unrelated warning here also, that you should probably add a target, and not an entire toolchain, but in our case this is actually what we want. the x86_64-unknown-linux-gnu toolchain is what is mounted into the docker container.

Do note that current main is broken on windows, use #665 to make it not so.

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

No branches or pull requests

3 participants