tomazzlender

tomazzlender

Elixir docker image won't build for linux/arm64/v8 using Github Actions

I setup a sample project on Github to show you a concrete example of a problem I’m having.

When I use

the build fails. The same happens if I use Elixir 1.14.0, but a different error.

You can see errors on the links above.

If I use the same Dockerfile on Mac M2 or Raspberry PI (aarm64 architecture), the build succeeds.

I’m not sure what could be the issue.

The build also succeeds

  • if I use Github Actions but some other architecture.
  • if I use Elixir 1.13.4

Any idea would be much appreciated :folded_hands:.

Marked As Solved

jhogberg

jhogberg

Erlang Core Team

I’ll see if I can make a PR that fixes this in QEMU, it doesn’t seem to be a very high priority for them.

For the time being you can disable the JIT by compiling Erlang with ./configure --disable-jit.

Also Liked

yuriploc

yuriploc

Every time I forget about this I end up reading this post and also this one: BEAM docker release GitHub action - a GitHub action to build a docker container from a BEAM (Elixir/Erlang) release - #2 by asabil - Libraries - Erlang Programming Language Forum - Erlang Forums

TL;DR, adding ERL_FLAGS="+JPperf true" to your env vars should solve the issue with QEMU when building for linux/arm64 on a linux/amd64 host.

jhogberg

jhogberg

Erlang Core Team

As a small update, the patch for user-mode emulated AArch64 has been accepted and will most likely make it into the next major version of QEMU.

x86-64 is not covered by the patch, and may take much longer to get in if it’s accepted at all, as the workaround might not be as palatable (invalidating all translated code everywhere on serializing instructions like cpuid).

Last Post!

yuriploc

yuriploc

Every time I forget about this I end up reading this post and also this one: BEAM docker release GitHub action - a GitHub action to build a docker container from a BEAM (Elixir/Erlang) release - #2 by asabil - Libraries - Erlang Programming Language Forum - Erlang Forums

TL;DR, adding ERL_FLAGS="+JPperf true" to your env vars should solve the issue with QEMU when building for linux/arm64 on a linux/amd64 host.

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement