Skip to content

"Couldn't install toolchain" #1649

Open
@mwlon

Description

@mwlon

Checklist

Describe your issue

When trying to cross-compile for Linux from my aarch64-apply-darwin machine, I get this error:

 % cross build --release -p pco_java --target x86_64-unknown-linux-gnu
error: toolchain 'nightly-x86_64-unknown-linux-gnu' may not be able to run on this system
note: to build software for that platform, try `rustup target add x86_64-unknown-linux-gnu` instead
note: add the `--force-non-host` flag to install the toolchain anyway
Error: 
   0: couldn't install toolchain `nightly-x86_64-unknown-linux-gnu`
   1: `rustup toolchain add nightly-x86_64-unknown-linux-gnu --profile minimal` failed with exit status: 1

I've gone through the setup and ensured that Docker is running. Why might I be getting this error?

What target(s) are you cross-compiling for?

other (specify in description)

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

0.2.5

Example

No response

Additional information / notes

I notice when I run cross --version, I get this warning:

[cross] warning: `cross` does not provide a Docker image for target aarch64-apple-darwin, specify a custom image in `Cross.toml`.
[cross] note: Falling back to `cargo` on the host.

I suspect this is related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions