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

ARM platforms not supported in the Dockerfiles on GHCR #504

Open
jchillerup opened this issue Mar 10, 2024 · 3 comments
Open

ARM platforms not supported in the Dockerfiles on GHCR #504

jchillerup opened this issue Mar 10, 2024 · 3 comments

Comments

@jchillerup
Copy link

jchillerup commented Mar 10, 2024

The docs state that ARM is a supposed platform for the Docker way of installing libdragon, but it seems not to be the case. Using the libdragon CLI on my ARM based Mac I get the following:

➜  subi git:(main) ✗ libdragon init
Initializing a libdragon project at /Users/jc/code/subi
Downloading docker image: ghcr.io/dragonminded/libdragon:latest
latest: Pulling from dragonminded/libdragon
no matching manifest for linux/arm64/v8 in the manifest list entries
Command docker pull ghcr.io/dragonminded/libdragon:latest exited with code 1.

I was able to pull the image manually by specifying --platform to Docker pull, which means it'll run in emulated mode:

➜  subi git:(main) ✗ docker pull --platform x86_64 ghcr.io/dragonminded/libdragon:trunk
trunk: Pulling from dragonminded/libdragon
bccd10f490ab: Pull complete 
c3a178414c27: Pull complete 
90dbcfe357cb: Pull complete 
Digest: sha256:b0263d3ed69068f5eaf0070a0cf2e2b379d3b37e36fe37737cf840eb03f16473
Status: Downloaded newer image for ghcr.io/dragonminded/libdragon:trunk
ghcr.io/dragonminded/libdragon:trunk

Happy to attempt to fix it myself and submit a PR, but not sure what would be preferred:

  • Patching the CLI tool to set the platform, thus "hiding" the bug but potentially avoiding some x86/ARM related cross-compiling intricacies?
  • Trying to build the Dockerfile on an ARM-supporting base (I suppose ubuntu:22.04 does, so no need to change?) and somehow modify the CI/CD scripts to publish for the ARM platform as well? Maybe the actual is that there's no ARM-based runners for the libdragon CI/CD process?

Please advise. And thanks for volunteering your time to this project :)

@rasky
Copy link
Collaborator

rasky commented Mar 10, 2024

It is supported normally but it requires me to manually remember to push the ARM image anytime there is a Dockerfile change, because GitHub CI doesn’t support arm64 last I checked.

The dockerfile was just updated yesterday and I haven’t pushed the updated image yet.

if you want to check if GitHub Action supports arm now and open a PR, that’d be great. I have a local script that I use to push the updated image, which also merges the two manifests. I can send it for reference

@jchillerup
Copy link
Author

OK, I looked at it a bit more, basically trying bullet 2. The issue is that gcc-multilib is not supported on arm64 at all, so maybe a good-for-now solution would be to use Rosetta, i.e. force the CLI to fetch the linux/amd64 platform on Macs for now?

@rasky
Copy link
Collaborator

rasky commented Mar 10, 2024

You don’t need gcc-multilib for the ARM build. Just comment it and it will build

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

No branches or pull requests

2 participants