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

precompiled NIF is not available: Compilation fails on M1 with Alpine hex.pm builder for target aarch64-unknown-linux-musl #66

Closed
kentbull opened this issue Jul 11, 2022 · 3 comments

Comments

@kentbull
Copy link

Issue

Building my app that has an MJML dependency fails as the precompiled NIF is not available for target architecture aarch64-unknown-linux-musl

MJML Version

MJML 1.3.2
Also fails on 1.3.4

Builder Image Version

FROM hexpm/elixir:1.13.4-erlang-24.3.4.2-alpine-3.16.0 as builder

Error

(RuntimeError) Error while downloading precompiled NIF: precompiled NIF is not available for this target: "aarch64-unknown-linux-musl".

Log Output

#15 52.53 ==> rustler_precompiled
#15 52.53 Compiling 4 files (.ex)
#15 52.82 Generated rustler_precompiled app
#15 52.85 ==> mjml
#15 52.85 Compiling 1 file (.ex)
#15 52.89
#15 52.89 == Compilation error in file lib/mjml.ex ==
#15 52.89 ** (RuntimeError) Error while downloading precompiled NIF: precompiled NIF is not available for this target: "aarch64-unknown-linux-musl".
#15 52.89 The available targets are:
#15 52.89  - aarch64-apple-darwin
#15 52.89  - x86_64-apple-darwin
#15 52.89  - x86_64-unknown-linux-gnu
#15 52.89  - x86_64-unknown-linux-musl
#15 52.89  - arm-unknown-linux-gnueabihf
#15 52.89  - aarch64-unknown-linux-gnu
#15 52.89  - x86_64-pc-windows-msvc
#15 52.89  - x86_64-pc-windows-gnu.
@paulgoetze
Copy link
Member

Thanks for reporting @kentbull. I'll add it to the release targets and will let you know once it's available.

@paulgoetze
Copy link
Member

Alright, I published v1.3.5 which also provides the precompiled NIF for aarch64-unknown-linux-musl targets.
@kentbull, can you please give it another try and check if everything works as expected now?

@kentbull
Copy link
Author

@paulgoetze I can confirm this worked. Thank you! We will gladly use the hex.pm Alpine images now.

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