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

Add support for ARM architectures #134

Open
logoff opened this issue Jan 31, 2021 · 10 comments
Open

Add support for ARM architectures #134

logoff opened this issue Jan 31, 2021 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@logoff
Copy link

logoff commented Jan 31, 2021

Many users want to use pandoc in their ARM based machines. The most popular is Raspberry Pi, but there are many others.

It would be very useful for us to have support for ARM architectures (armv8, armv7l/armv7hl, etc.).

@tarleb
Copy link
Member

tarleb commented Jan 5, 2022

Help would be very welcome with this. E.g., can someone point to other Docker images which handle this well? Where do they build the images? Do they use emulators or dedicated machines?

@tarleb tarleb added the help wanted Extra attention is needed label Jan 5, 2022
@jgm
Copy link
Member

jgm commented Jan 5, 2022

Don't know if this would help:
https://gitlab.b-data.ch/ghc/ghc4pandoc

@cagix
Copy link

cagix commented Jan 5, 2022

The base images in this project (Alpine, Ubuntu) are afaik already multi-arch. So theoretically you would only need to grab the base image and compile Pandoc in it once on an Intel-based machine (for an Intel-based image) and then again on an ARM machine (Raspberry Pi, Mac M1) for an ARM image.

In https://github.com/cagix/pandoc-hugo-m1 I pulled the ARM binary (Linux) of Pandoc into an Ubuntu base image running on an Apple M1.

@tarleb
Copy link
Member

tarleb commented Jan 6, 2022

I've filed a request to be accepted into Docker's open source program. That would give us access to automatic builds, which appear to work with a wide range of architectures.

@tarleb
Copy link
Member

tarleb commented Jan 6, 2022

After some more research, it seems that all automatic builds on Docker Hub happen with amd64. But it seems that docker buildx may be all we need. Here's an article: https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408

@haad
Copy link

haad commented Jun 27, 2022

You can use this action [1] to setup QEMU in your repo with multi arch support out of the box.

[1] https://github.com/docker/setup-qemu-action
[2] https://dev.to/cloudx/multi-arch-docker-images-the-easy-way-with-github-actions-4k54

@cdivita
Copy link
Contributor

cdivita commented Nov 25, 2022

I'm doing some tests on https://github.com/cdivita/pandoc-dockerfiles:

  1. Builds for linux/arm64 platform using docker buildx require a lot of resources and are really really slow. I launched a build that lasted for 6 hours and failed (I think due to GitHub timeout)
  2. When building multi-architecture images with docker buildx, the output=type=docker cannot be used and images need to be pushed. It means that tests cannot be run after the image build but during the build. My idea is to move the tests within a build stage (that comes from the image to test)

@sitic
Copy link

sitic commented Sep 13, 2023

Issue tracking the absence of Linux ARM64 GitHub runners:

The last official update from August 17, 2022 states:

We plan to add this feature in the future but its not yet been prioritized.

@rikhuijzer
Copy link

rikhuijzer commented Sep 26, 2023

Builds for linux/arm64 platform using docker buildx require a lot of resources and are really really slow. I launched a build that lasted for 6 hours and failed (I think due to GitHub timeout)

It looks like the root cause is that QEMU doesn't support dynamic memory allocations well (bytecodealliance/wasmtime#1895). Anyone knows whether we can disable that for the Pandoc build?

@martindkaz
Copy link

Maybe this was obvious to others and they didn't want to run AMD containers on Mac ARM, but I didn't know I could do that, and nedlessly spent time figuring out how to build an ARM pandoc/core, before realizing I could just use "docker run --platform linux/amd64 ..." and Mac Docker Desktop uses Rosetta 2 to run the standard AMD pandoc/core just fine. The only downside I'm aware of is speed, but it was still very fast for my use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

9 participants