I have the same problem doing mix deps.get after installing the latest Erlang 26.2.3. Try installing 26.2.2 and I guess it would work. I’m on a MacBook Pro M1 (32 GB).
I don’t know enough to tell what’s the underlying cause.
The bug is not asdf specific. It affects all aarch64 systems running this specific otp patch release.
I‘d suggest using hexpm/elixir images, which let you control the otp version used. Then you can use the last patch release until the fix for the bug is out.
I can’t seem to find a working solution to get my Dockerfile which needs to run on ARM64 to work.
My dockerfile looks like this:
# Use an official Elixir runtime as a parent image
FROM elixir:latest
ENV ERL_FLAGS="+JPperf true"
# Set the working directory in the container
WORKDIR /app
# Fix bug https://github.com/erlang/otp/issues/8238
RUN mix archive.install github hexpm/hex branch latest
# Install hex package manager
RUN mix local.hex --force
# Install the latest Phoenix
RUN mix archive.install hex phx_new --force
# Install rebar
RUN mix local.rebar --force
# Copy the app contents into the container at /app
COPY ./ /app
# Install dependencies
RUN mix deps.get
# Compile the project
RUN mix do compile
CMD ["/app/entrypoint.sh"]
I tried the solution @wojtekmach provided with the mix archive.install github hexpm/hex branch latest, but the build process still ends up breaking on:
RUN mix archive.install hex phx_new --force
with: eheap_alloc: Cannot allocate 976733209832459912 bytes of memory (of type "heap_frag")
I am new to Elixir/Phoenix, so properly resolving this bug is definitely out of my scope of knowledge.