maintainer-feedback requested: [Bug 264046] lang/elixir-devel: doesn't produce self-contained mix releases

From: <>
Date: Tue, 17 May 2022 16:01:43 UTC
Bugzilla Automation <> has asked freebsd-erlang (Nobody)
<> for maintainer-feedback:
Bug 264046: lang/elixir-devel: doesn't produce self-contained mix releases

--- Description ---
Problem: lang/elixir-devel produces mix releases that require an Erlang runtime
to be installed. This occurs because it patches the `elixir` startup script to
replace ERTS_BIN. It specifies a path that's hard-coded to a file in the
lang/erlang-runtime* that was used to build elixir, as described in


Goal: Build a mix release, and then run it on a FreeBSD system with no Erlang
or Elixir runtime.

From mix release docs:

> Self-contained. A release does not require the source code to be included in
your production artifacts. All of the code is precompiled and packaged.
Releases do not even require Erlang or Elixir in your servers, as it includes
the Erlang VM and its runtime by default. Furthermore, both Erlang and Elixir
standard libraries are stripped to bring only the parts you are actually using.

In other words, you should be able to:

pkg install -y elixir-devel
mix new my_app
cd my_app && mix release
pkg remove -y elixir-devel
pkg autoremove -y
./_build/dev/rel/my_app/bin/my_app start_iex


What happens: `exec: /usr/local/lib/erlang24/bin/erl: not found`

What should happen: an IEX console