tmjoen
I have a multi stage docker file and building the node assets works fine with both --platform linux/arm64 and linux/amd64. I can make the elixir/erlang image work with --platform linux/arm64, but when I try linux/amd64 qemu blows up:
FROM --platform=linux/amd64 hexpm/elixir:1.12.3-erlang-24.1.5-ubuntu-focal-20210325 AS deps
ARG MIX_ENV=prod
ARG HEX_MIRROR_URL=https://repo.hex.pm
RUN /usr/local/bin/mix local.hex --force && \
/usr/local/bin/mix local.rebar --force
RUN apt-get -qq update && apt-get install -y \
git \
unzip \
build-essential \
wget \
sudo
WORKDIR /opt/app
COPY config/ ./config
COPY mix.exs mix.lock /opt/app/
RUN mix deps.get --only $MIX_ENV
Results in
#12 [2/6] RUN /usr/local/bin/mix local.hex --force && /usr/local/bin/mix local.rebar --force
#12 sha256:690d11d4149aae5005ba9d4f6d1bfcb55259a6efa519068eac1913c8c5c6a1a1
#12 1.540 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#12 1.546 Segmentation fault
#12 ERROR: executor failed running [/bin/sh -c /usr/local/bin/mix local.hex --force && /usr/local/bin/mix local.rebar --force]: exit code: 139
Anyone else getting this problem? Or found a way around it?
Thanks for reading!
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
tmjoen
The hexpm 1.13.0-rc.1 image uploaded yesterday actually works!!
1.13.0-rc.1-erlang-23.2.7.4-ubuntu-focal-20210325It seems the images with erlang 24.1 blow up
tmjoen
Some more digging here. It’s not OTP24 that fails, it is OTP24 on some distros:
OTP24 on Ubuntu Focal FAILS (
hexpm/elixir:1.13.0-rc.1-erlang-24.1.5-ubuntu-focal-20210325)OTP24 on Ubuntu Bionic FAILS (
hexpm/elixir:1.13.0-rc.1-erlang-24.1.5-ubuntu-bionic-20210325)OTP24 on Ubuntu Xenial WORKS (
hexpm/elixir:1.13.0-rc.1-erlang-24.1.5-ubuntu-xenial-20210114)OTP24 on Debian Stretch WORKS (
hexpm/elixir:1.13.0-rc.1-erlang-24.1.5-debian-stretch-20210902)OTP24 on Debian Bullseye FAILS (
hexpm/elixir:1.13.0-rc.1-erlang-24.1.5-debian-bullseye-20210902)OTP24 on Alpine 3.14.2 FAILS (
hexpm/elixir:1.13.0-rc.1-erlang-24.1.5-alpine-3.14.2)dom
The crash happens when JIT is enabled. Disabling the JIT, using pre-JIT Erlang (23.x or older), or using an old OS that doesn’t have a version of gcc recent enough to support C++17 (required to compile the JIT) will work around it.
tmjoen
Aha! Thank you for clearing this up. Is this something that will never work due to compatibility issues you think, or is it possible, but a bug with qemu?
dom
I wish I knew! I also have that problem and I don’t know how to debug it
benonymus
Is there any permanent solution to this?
tmjoen
Not really.
I raised an issue on the docker for mac github, but it was closed and deferred to qemu.
There is a new qemu version out, but it hasn’t been picked up by docker yet (afaict)
Klohto
It’s been handled poorly. Hopefully this time the issue might stay open so at least we learn where the culprit is or how to work around it Yet Another QEMU Segmentation Fault Issue · Issue #6261 · docker/for-mac · GitHub
bpaulino0
I’ve had the same issue today and trying with the Ubuntu image of Elixir 1.13 and OTP 25 worked for arm64 using QEMU using Github Actions. (image name:
elixir:1.13.4-erlang-25.0.4-ubuntu-xenial-20210804)addstar
I also ran into this issue trying to build for linux/amd64 from an apple silicon macbook. I’m using
mix phx.gen.release --dockerand wanting to using Elixir 1.14 and OTP 25.I managed to get it to work with
ubuntu:xenial-20210804which is quite old, released in 2016.I tried the following distros to no success:
debian:bullseye-20230109-slim
debian:bullseye-20210902-slim
ubuntu:jammy-20230126
ubuntu:bionic-20230126