VCVRack / rack-plugin-toolchain

56 stars 13 forks source link

Updated toolchain fails to find archlinux metadata on M1 Mac #29

Closed mhetrick closed 1 year ago

mhetrick commented 1 year ago

I'm partway through a successful toolchain Dockerimage build on my Windows computer, but it's failing on my M1 Mac. It appears that it is not finding valid metadata regarding archlinux:

mv Rack-SDK Rack-SDK-lin-x64
rm Rack-SDK-2.4.0-lin-x64.zip
docker build --build-arg JOBS=8 --tag rack-plugin-toolchain:10 .
[+] Building 0.8s (3/3) FINISHED                                                                                                  docker:desktop-linux
 => [internal] load .dockerignore                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                   0.0s
 => [internal] load build definition from Dockerfile                                                                                              0.0s
 => => transferring dockerfile: 945B                                                                                                              0.0s
 => ERROR [internal] load metadata for docker.io/library/archlinux:base-20230709.0.163418                                                         0.7s
------
 > [internal] load metadata for docker.io/library/archlinux:base-20230709.0.163418:
------
Dockerfile:1
--------------------
   1 | >>> FROM archlinux:base-20230709.0.163418
   2 |     ENV LANG C.UTF-8
   3 |     
--------------------
ERROR: failed to solve: archlinux:base-20230709.0.163418: no match for platform in manifest sha256:a816f62c10a68a77df6041efdec165e8638644e8209b21ee27d7ecfd3f83d823: not found
cschol commented 1 year ago

We found out today that Arch Linux does not have an arm64 platform Docker image. On your M1 Mac, Docker tries to find an arm64 image based and fails. You can force Docker to use an amd64 image with an environment variable, but performance will be atrocious and the toolchain build takes 15 hours to complete.

We are currently testing reverting back to using Ubuntu as the Docker host image, which results in a 12x decrease in build time during the toolchain build on macOS. Ubuntu has an arm64 image available and is therefore way more performant.

This issue only occurs with Apple Silicon processors and has been confirmed on M1 and M2 platforms.

cschol commented 1 year ago

The issue is fixed in 25be88dade23a2fa9dc5c77c964ddd125e3d975e.

Please try building the toolchain again on the M1 Mac and let is know if you run into more issues.