sauronnikko

sauronnikko

Can't install Erlang 22.0 with asdf

I’m trying to install Erlang 22.0 with asdf, but it fails. I’m using Ubuntu 22.04 and followed the before install steps here

asdf install erlang 22.0
asdf_22.0 is not a kerl-managed Erlang/OTP installation
The asdf_22.0 build has been deleted
Extracting source code
Building Erlang/OTP 22.0 (asdf_22.0), please wait...
Build failed.
gmake[4]: *** [x86_64-unknown-linux-gnu/Makefile:669: /home/sauronnikko/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0/otp_src_22.0/lib/erl_interface/bin/x86_64-unknown-linux-gnu/erl_call] Error 1
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory '/home/sauronnikko/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0/otp_src_22.0/lib/erl_interface/src'
gmake[3]: *** [Makefile:31: opt] Error 2
gmake[3]: Leaving directory '/home/sauronnikko/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0/otp_src_22.0/lib/erl_interface/src'
gmake[2]: *** [/home/sauronnikko/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0/otp_src_22.0/make/otp_subdir.mk:29: opt] Error 2
gmake[2]: Leaving directory '/home/sauronnikko/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0/otp_src_22.0/lib/erl_interface'
gmake[1]: *** [/home/sauronnikko/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0/otp_src_22.0/make/otp_subdir.mk:29: opt] Error 2
gmake[1]: Leaving directory '/home/sauronnikko/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0/otp_src_22.0/lib'
gmake: *** [Makefile:490: libs] Error 2

Please see /home/sauronnikko/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0/otp_build_22.0.log for full details.

Here are the contents of the log file: https://gist.github.com/sauronnikko/5b85263ec5294b403e27e41012f9a23f

Can you help me fix this? Thanks :slight_smile:

Most Liked

Eiji

Eiji

Analyse

ok, let’s take a look …

Tested Erlang environments

First of all Erlang is tested on 10.04 - 20-04. It should be fine with 22.04 as well, but it’s worth to mention and keep in mind that according to documentation it wasn’t officially tested against this version of Ubuntu

Why Bob?

You may wonder why I mention Bob? That’s because I’m using it’s builds in all of my development environments. Obviously installing prebuilt package speeds up setup environment process, so for me it’s the fastest and safest way.

Bob’s prebuilt packages

Since Erlang does not provides any prebuilt packages for other os than Windows, we can take a look at Bob’s page. It lists a prebuilt packages for Erlang for Ubuntu versions 14.04 - 20.04 and even not all Erlang versions are “supported” (by Bob’s page) for all Ubuntu versions. I guess it’s just nobody asked for triggering old OTP builds who for most people are unnecessary …

Bob’s prebuilt packages on Hex

However this is not all. We still have a complete lists of Bob’s builds hosted on hex and there we can find a builds for Ubuntu 22.04, but only for OTP-24.2 and above.

Results

Official support

Since I do not know any other source of Erlang builds I guess that our communities does not provide Erlang 22.0 builds for Ubuntu 22.04. The reason for it may be compilation problems like yours or as said just no trigger happen for previous Erlang versions … In any case “officially” there are no tested support and prebuilt builds even provided by community.

My recommendation

Having above in mind in first place I would verify your environment following Erlang documentation and Bob’s build process. Meanwhile I would also ask @ericmj (the first and top of Bob’s contributor) if he knows about any problems or if he can trigger a build for said version. I guess that Bob have enough well-tested environment, so that we can confirm if any issue like this happens only in specific cases (like not met all requirements) or it’s a common problem.

Possible workaround

We have an Erlang plugin for prebuilt packages, but unfortunately it needs to follow Hex’s build list. However there is a workaround. You can install plugin for Erlang prebuilt packages for previous Ubuntu versions (like 20.04) - I have just tested it and iex works as expected, but keep in mind that’s not a “safe way” and it never would be recommended.

asdf plugin-add erlang-ubuntu-20 https://github.com/michallepicki/asdf-erlang-prebuilt-ubuntu-20.04.git
asdf install erlang-ubuntu-20 22.0

Helpful resouces

  1. Erlang/OTP test architectures
  2. Bob’s List page and Github page
  3. Fully Hex’s list of OTP builds for Ubuntu 22.04
  4. Building and Installing Erlang/OTP
  5. Bob’s build scripts
  6. The initial Bob’s commit and Top `Bob’s contributors page
  7. List of Michał Łępicki’s asdf repositories for various Ubuntu versions
michallepicki

michallepicki

Ubuntu 22.04 comes with OpenSSL 3.0 only, and earlier versions are not available in apt repositories. Erlang prior to 24.2 does not even build with OpenSSL 3.0. You can either look into installing OpenSSL 1.x from source, and passing its path to asdf / kerl / erlang configuration… Or upgrading to Erlang 24.2 or newer

Where Next?

Popular in Questions Top

pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
Kagamiiiii
Student & New to elixir. Nice language. I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
jc00ke
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217 Let’s say I have a map with required and optional k...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
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
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
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
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
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
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement