sezaru
I have a Docker image that I use to compile my releases for deployment, I recently updated it to use OTP 24 and the latest Elixir version (1.12.0).
After making that change, now my release builds always fail with the following error:
$ MIX_ENV=prod mix release
...
===> Fetching rebar3_hex v6.11.4
===> Downloaded package, caching at /home/sezdocs/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.11.4.tar
escript: exception error: undefined function erlang:get_stacktrace/0
in function rebar3:main/1 (/rebar3/src/rebar3.erl, line 72)
in call from escript:run/2 (escript.erl, line 750)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
** (Mix) Could not compile dependency :sleeplocks, "/home/sezdocs/.mix/rebar3 bare compile --paths /home/sezdocs/project/endpoints/_build/prod/lib/*/ebin" command failed. You can recompile this dependency with "mix deps.compile sleeplocks", update it with "mix deps.update sleeplocks" or clean it with "mix deps.clean sleeplocks"
Does anyone knows why is this happening and how to solve it?
Also, I don’t know if this helps, but here is my Dockerfile:
FROM ubuntu:20.04 AS build
ARG USER=builder
ARG UID=1000
ARG GID=1000
ARG PWD=builder
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2> /dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg > /dev/null
RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN apt-add-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main'
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y apt-utils
RUN wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
RUN dpkg -i erlang-solutions_2.0_all.deb
RUN rm erlang-solutions_2.0_all.deb
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y esl-erlang
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y elixir
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y clang-12 capnproto
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cmake
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang-12 10
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-12 10
RUN useradd -m $USER --uid $UID
RUN echo "${USER}:${PWD}" | chpasswd
USER ${UID}:${GID}
ENV LANG=C.UTF-8
ENV TERM=xterm-256color
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> ~/.bashrc
RUN echo 'PS1="(builder) $PS1"' >> ~/.bashrc
RUN mix local.hex --force
RUN mix local.rebar --force
WORKDIR /home/${USER}/project
CMD ["/bin/bash"]
I build it with:
docker build --build-arg USER=$USER \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
--no-cache \
-t tip-off/builder:v1 .
and run it with:
docker run --detach-keys='ctrl-e,e' -it -v$(pwd):/home/$USER/project --rm tip-off/builder:v1
Trending in Questions
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,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
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
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
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
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
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
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
- #library
- #deployment
- #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
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
sezaru
I found out that the dependency using
sleeplocks(which seems to trigger the issue) is Cachex, and found this github issue there: Cachex (-> Sleeplocks) not working on Elixir 1.12.1 · Issue #274 · whitfin/cachex · GitHubStill, I don’t understand what is triggering it.
axelson
What version of Erlang was Elixir compiled under? If you run
elixir --versionyou should get output likeElixir 1.12.1 (compiled with Erlang/OTP 23)I wonder if your issue could be similar to: Prevent crash in Erlang/OTP 24 (upcoming) by paulo-ferraz-oliveira · Pull Request #2361 · erlang/rebar3 · GitHub
Or maybe it’s some sort of docker issue (which I wouldn’t be able to help with)
sezaru
Mine shows
Elixir 1.12.0 (compiled with Erlang/OTP 24).sezaru
Ok, I was able to fix this changing my
HEX_MIRRORfor some reason.What I did was:
sezaru
Just an update, in the end the error was a regression in hex servers, José Valim already fixed it Compilation fails with undefined function erlang:get_stacktrace/0 · Issue #11047 · elixir-lang/elixir · GitHub