script

script

Install Erlang with asdf on m1 MacBook

I have asdf installed with the all the dependencies mentioned on the site. I am able to successfully installed and use different versions of elixir, but when it comes to Erlang I am unable to install any version with asdf. I tried 21.x and also 22.x versions. I have latest Erlang version installed with brew and it’s working. I got the below error when I try to install any version.

 asdf install erlang 22.0                                         
 Downloading kerl...
 asdf_22.0 is not a kerl-managed Erlang/OTP installation
No build named asdf_22.0
Downloading OTP-22.0.tar.gz to /Users/weiswise/.asdf/plugins/erlang/kerl-home/archives...
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                              Dload  Upload   Total   Spent    Left  Speed
100   120  100   120    0     0    200      0 --:--:-- --:--:-- --:--:--   200
100 52.2M    0 52.2M    0     0  1495k      0 --:--:--  0:00:35 --:--:-- 1568k
Extracting source code
Building Erlang/OTP 22.0 (asdf_22.0), please wait...
Configure failed.
checking size of int... 0
checking size of long... 0
checking size of long long... 0
checking size of __int64... 0
checking size of __int128_t... 0
checking whether byte ordering is bigendian... no
checking whether double word ordering is middle-endian... yes
configure: error: cannot build emulator since no thread library was found
ERROR: /Users/weiswise/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0/otp_src_22.0/erts/configure         failed!
./configure: line 343: kill: (-60536) - No such process

I think Erlang 21.x and 22.x are not supported on apple silicon Macs, at least not all the versions that’s why it’s not installing.
I tried with version 23.3.4 stable build and asdf is able to install it successfully.
I tried with 22.3.4.19 stable build and asdf is also able to install it without any issue.

For this issue

           ./configure: line 343: kill: (-60536) - No such process

add the below line in your bash or zsh file.

            CFLAGS="-O2 -g"

Also add this line in the bash or zsh

           KERL_CONFIGURE_OPTIONS="--disable-debug --without-javac"

So, asdf is working fine, the only issue is arm base architecture of MacBook.
I am leaving the post here, so that anyone in the future can get help from here.

Thank you.

Most Liked

moogle19

moogle19

Erlang/OTP 22.3.4.2 doesn’t work with M1 Macs.

If it is an option, you can use OTP >= 22.3.4.16.
The Apple Silicon build was fixed in that release.

Ivor

Ivor

Changing from 24.1.7 to 24.3.4 resolved my issue. Ventura + M1. Observer is working as well.

4k1k0

4k1k0

A quick update:

I get to install wxwidgets with --enable-compat30 using a custom homebre tap.

First add the compilation flag to the file:

$ vim /opt/homebrew/opt/wxwidgets/.brew/wxwidgets.rb

And then create a custom copy to install.

$ brew tap-new wako/local
$ cp /opt/homebrew/opt/wxwidgets/.brew/wxwidgets.rb $(brew --repository wako/local)/Formula/wxwidgets.rb

Using mise to install erlang gets the error:

~ ❯ mise install erlang@28.1
gen/wxe_init.cpp:7177:18: error: invalid application of 'sizeof' to an incomplete type 'wxe_defs[]'
 7177 |   int sz = sizeof(defs) / sizeof(defs[0]);
      |                  ^~~~~~
 CXX    aarch64-apple-darwin25.1.0/wxe_gl.o
4 warnings and 9 errors generated.
make[3]: *** [aarch64-apple-darwin25.1.0/wxe_init.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2
mise ERROR ~/.local/share/mise/plugins/erlang/bin/install failed
[asdf-erlang] 🛟 No CC found. Setting CC to: /usr/bin/clang -I/opt/homebrew/opt/unixodbc/include
[asdf-erlang] 🛟 No LDFLAGS found. Setting LDFLAGS to: -L/opt/homebrew/opt/unixodbc/lib
[asdf-erlang] 🛟 OpenJDK has been added to PATH for this terminal session: /opt/homebrew/opt/openjdk/bin
[asdf-erlang] Please ensure this is included in your shell's dot files (.zshrc, .bashrc, etc.)
[asdf-erlang] 📦 Building with KERL_CONFIGURE_OPTIONS=--disable-debug --without-javac --with-odbc=/opt/homebrew/opt/unixodbc  --with-ssl=/opt/homebrew/opt/openssl
[asdf-erlang] ❄️ No kerl installation to cleanup for asdf_28.1
[asdf-erlang] ❄️ No kerl build to cleanup for asdf_28.1
APPLICATIONS DISABLED (See: /Users/wako/.local/share/mise/plugins/erlang/kerl-home/builds/asdf_28.1/otp_build_28.1.log)
 * jinterface     : Java compiler disabled by user

gen/wxe_init.cpp:7177:18: error: invalid application of 'sizeof' to an incomplete type 'wxe_defs[]'
 7177 |   int sz = sizeof(defs) / sizeof(defs[0]);
      |                  ^~~~~~
 CXX    aarch64-apple-darwin25.1.0/wxe_gl.o
4 warnings and 9 errors generated.
make[3]: *** [aarch64-apple-darwin25.1.0/wxe_init.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2
mise ERROR Failed to install asdf:erlang@28.1: ~/.local/share/mise/plugins/erlang/bin/install exited with non-zero status: exit code 1
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information
~ ❯ 

And I used

export KERL_CONFIGURE_OPTIONS="--disable-debug --without-javac --with-odbc=/opt/homebrew/opt/unixodbc --with-ssl=/opt/homebrew/opt/openssl"
export CFLAGS="-O2 -g"

in my .zshrc file.

Where Next?

Popular in Questions Top

dotdotdotPaul
Okay, I’m having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I’m sure I’...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127089 1222
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
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
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement