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

Support arm64 #416

Open
axiopaladin opened this issue Nov 30, 2023 · 2 comments
Open

Support arm64 #416

axiopaladin opened this issue Nov 30, 2023 · 2 comments

Comments

@axiopaladin
Copy link

I'd love to be able to use this on my aarch64 device. As pandoc already releases a generic linux-arm64 binary (and has since v2.12, back in 2021), it would be nice to get crossref working on these systems too.

I tried compiling from source with stack and it throws this error:

$ stack install
Stack has not been tested with GHC versions above 9.0, and using 9.6.2, this may fail
Unable to find installation URLs for OS key: linux-aarch64-ncurses6

(Also, extra bonus points if anyone wants to send it into the alpine package repo afterwards)

@axiopaladin
Copy link
Author

I just tried compiling with cabal v2-install too and that also failed, though it looked like it got a lot farther. I also saw a lot of linker failures, so it might actually be due to me running it on a musl system without glibc?

(I would hope that the final output is just a static binary though, as the pandoc-arm64 binary seems to work on my musl system.)

@lierdakil
Copy link
Owner

TBF, I don't have any aarch64 machines handy, and I don't have the bandwidth to experiment with getting a build working in docker on a recently-announced M1 macs on github actions. Cross-compilation with GHC is famously borked in the presence of Template Haskell and even if I stripped it from pandoc-crossref, dependencies use it, so it's likely a non-starter (workarounds exist, but they still require a working GHC on a target arch and are notoriously buggy). Building in an emulator will just take the better half of forever.

If you're feeling adventurous, you can try to experiment with getting Nix to cooperate. In the happy version of the universe, it would be as easy as nix build git+https://github.com/lierdakil/pandoc-crossref on the arm machine, although AFAIU that wouldn't produce a static binary. There may be an easy way to get a static build, but I can't check because, again, I don't have aarch64 handy.

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