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

Running cross on apple silicon with orbstack fails to download the containers. #1288

Closed
4 of 11 tasks
laenzlinger opened this issue Jul 17, 2023 · 2 comments
Closed
4 of 11 tasks

Comments

@laenzlinger
Copy link

Checklist

Describe your issue

Running cross on macOS arm64 with orbstack (https://docs.orbstack.dev/docker/) fails to download the docker image.

Orbstack uses Rosetta to run containers with foreign architectures.

However I could not find a configuration to specify the container platform.

A workaround is described below

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

aarch64-unknown-linux-gnu

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

cross 0.2.5

Example

cross build --release --target aarch64-unknown-linux-gnu
Unable to find image 'ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5' locally
0.2.5: Pulling from cross-rs/aarch64-unknown-linux-gnu
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
See 'docker run --help'.
make: *** [build] Error 125

Additional information / notes

Workaround:

after downloading the image manually (forcing the platform) i can run the cross compiler successfulle:

docker pull ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5 --platform linux/amd64
....
cross build --release --target aarch64-unknown-linux-gnu
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
   Compiling proc-macro2 v1.0.54
....
@Emilgardis
Copy link
Member

See #1214 (comment)

This is a duplicate of #1214

@Emilgardis Emilgardis closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2023
@laenzlinger
Copy link
Author

Thanks @Emilgardis the link really helps!

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

2 participants