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

Please provide ARMv8 images #13

Open
sdavids opened this issue Sep 9, 2024 · 3 comments
Open

Please provide ARMv8 images #13

sdavids opened this issue Sep 9, 2024 · 3 comments

Comments

@sdavids
Copy link

sdavids commented Sep 9, 2024

Apple uses ARM in Macs since 2020.

$ sw_vers
ProductName:            macOS
ProductVersion:         14.6.1
BuildVersion:           23G93
$ uname -m
arm64
$ docker --version
Docker version 27.1.1, build 6312585

$ docker run --rm -v "$PWD:/src" -w /src -u "$UID:$GID" kjarosh/latex:2024.3 latexmk -pdf -output-directory=out main.tex
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
...

https://tug.org/texlive/doc.html#platforms

aarch64-linux | GNU/Linux on ARM64

https://github.com/docker-library/official-images#architectures-other-than-amd64

ARMv8 64-bit (arm64v8)

https://hub.docker.com/_/alpine

arm64v8


https://docs.docker.com/build/building/multi-platform/

https://docs.docker.com/reference/cli/docker/buildx/build/#platform

@sdavids
Copy link
Author

sdavids commented Sep 9, 2024

A workaround is to add --platform=linux/amd64:

docker run --platform=linux/amd64 ... kjarosh/latex:2024.3 ...

That needs Rosetta 2 to be installed and enabled in Docker though.

@kjarosh
Copy link
Owner

kjarosh commented Sep 9, 2024

You're right that both TeXLive and Alpine provide aarch64 versions, but the problem is that TeXLive does not provide aarch64 version with musl (which Alpine uses). The link to tug.org you posted (https://tug.org/texlive/doc.html#platforms) lists x86_64 as the only architecture with musl support.

So the options are currently to either:

  1. do not use Alpine and use something with glibc, which would basically require a full rewrite of the image increasing its size,
  2. use something different than Alpine for aarch64 images only, which would be weird,
  3. somehow make TeXLive work with aarch64 and musl, that will probably require building TeXLive from sources and will make that support unofficial (assuming it even works).

To be honest building TeXLive from sources sounds interesting, but is a major feature to implement.

@kjarosh
Copy link
Owner

kjarosh commented Oct 14, 2024

I'm thinking the easiest and cleanest way of providing texlive on Alpine aarch64 would be writing a custom APKBUILD for texlive and building it. There's an existing APKBUILD for texlive (https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/texlive) but I cannot use it in any way as it's not licensed.

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