Erlang OTP 24 includes the long awaited JIT compiler, which makes it a must have. Elixir 1.12 can take advantage of it.
Here's a quick guide for anyone who got stuck on the upgrade using ASDF on MacOS!
There's a bug related to kerl settings in the installer that causes a cryptic error like the following for MacOS users:
checking for OpenSSL header in /usr/local/opt/openssl@1.1... yes
checking for OpenSSL in /usr/local/opt/openssl@1.1... configure: error: neither static nor dynamic crypto library found in /usr/local/opt/openssl@1.1
ERROR: /Users/username/.asdf/plugins/erlang/kerl-home/builds/asdf_24.0/otp_src_24.0/lib/crypto/configure failed!
The fix
The good news is that it only takes a single change to fix it. The file to edit is:
~/.asdf/plugins/erlang/kerl
Do a text search for "We need to" to find the following section:
_flags() {
# We need to munge the LD and DED flags for clang 9/10 shipped with
# High Sierra (macOS 10.13) and Mojave (macOS 10.14) and quite
# probably for Catalina (macOS 10.15)
case "$KERL_SYSTEM" in
Darwin)
osver=$(uname -r)
case "$osver" in
# TODO: Remove this in a future kerl release, probably
# after Catalina (10.15)
And make the following change:
case "$KERL_SYSTEM" in
Darwin-disabled)
osver=$(uname -r)
Then you can run asdf install erlang 24.0.01
and all will install as usual.
No Comments