-
Notifications
You must be signed in to change notification settings - Fork 381
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
Several docker images don't support m1 Mac builds #1224
Comments
NOTE: I did find a workaround to the problem for the time being, which I will describe here in case anyone else hits this problem in the meantime. Using Docker for Mac, on an m1 / aarch64 CPU, you can manually download a Docker image for an architecture that is supported by both cross and Docker/Rosetta, such as x86_64, which should run properly in emulation mode. For the example provided in my description above, you can do this by running the following Docker command from a terminal: $ docker pull ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5 --platform linux/x86_64 This will force Docker to download an x86_64 CPU architecture image and store it in the local Docker cache, so that subsequent calls to use that same Docker image (ie: by cross) will use the cached version of the image instead of trying to download a new one from Docker/Github. |
As part of this task, it would be nice if the table of targets included a column that showed the CPU architecture(s) of the host platforms supported by each of the base images, to make it easier to find this information at a glance. |
this is a duplicate of #1214 solution for now is to do
The only supported platform is linux/amd64 for now. See #751 |
Checklist
Describe your issue
If you follow the getting started steps outlined in the docs on an m1 based Mac, you get the following error:
I believe the root cause is that some of the Docker images used for the cross compilation do not have native aarch64 architecture support. I'm not sure how many of the supported targets are currently broken as I have not exhaustively checked the entire list, but at least the following images appear to be affected:
What target(s) are you cross-compiling for?
aarch64-unknown-linux-gnu, x86_64-pc-windows-gnu
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
0.2.5
Example
$ cargo init --bin hello $ cd hello $ cross run --target aarch64-unknown-linux-gnu
Additional information / notes
No response
The text was updated successfully, but these errors were encountered: