script

script

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.

Showing Posts 1 to 10

drl123

drl123

I don’t have an m1 Mac, but ran into tons of issues and none of the posts in the 24.0.1 released topic worked. Turns out it has something to do with the version of Kerl used by ASDF installs. See this post Erlang OTP-24.0.1 released! - #17 by drl123. There is a workaround linked there that worked for me on Mojave. Maybe it will work for you too.

bapti

bapti

I’ve got an M1 MacBook running Monterey 12.3.1 and experiencing the same issue. @script I tried the same exports in my zsh file as you listed but it didn’t do the trick do for me.

Could you point to where you discovered your fix?

Here’s my console output

asdf_22.3.4.2 is not a kerl-managed Erlang/OTP installation
The asdf_22.3.4.2 build has been deleted
Extracting source code
Building Erlang/OTP 22.3.4.2 (asdf_22.3.4.2), please wait..
Build failed.
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/neil.crawford/.asdf/plugins/erlang/kerl-home/builds/asdf_22.3.4.2/otp_src_22.3.4.2/erts/configure failed!
./configure: line 343: kill: (-41014) - No such process
make: *** No rule to make target `is_cross_configured'. Stop.
make: *** No rule to make target `all'. Stop.
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.

7stud

7stud

I’ve also got an M1 MacBook running Monterey 12.3.1, and a couple days ago I successfully installed Erlang 24.3.4 with wxWidgets using asdf. I did struggle for a couple of days trying to solve some wxWidgets issues, and I posted an issue on github about my problems:

https://github.com/asdf-vm/asdf-erlang/issues/251

When I first attempted the install, I was running Monterey 12.2.1, and I stupidly agreed to a system update, which bumped me up to Monterey 12.3.1, and the next day I tried some things to correct the wxWidgets problems, and suddenly the install worked.

Even though the initial output poined to some issues with wxWidgets, I think erlang 24.3.4 installed successfully on the first go:

...
...
APPLICATIONS INFORMATION (See: /Users/7stud/.asdf/plugins/erlang/kerl-home/builds/asdf_24.3.4/otp_build_24.3.4.log)
 * crypto         : Using OpenSSL 3.0 is not yet recommended for production code.
 * wx             : wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available
 *         wxWidgets must be installed on your system.
 *         Please check that wx-config is in path, the directory
 *         where wxWidgets libraries are installed (returned by
 *         'wx-config --libs' or 'wx-config --static --libs' command)
 *         is in LD_LIBRARY_PATH or equivalent variable and
 *         wxWidgets version is 3.0.2 or above.

Erlang/OTP 24.3.4 (asdf_24.3.4) has been successfully built
Cleaning up compilation products for 
Cleaned up compilation products for  under /Users/7stud/.asdf/plugins/erlang/kerl-home/builds
bapti

bapti

Thanks a million, this solved my issue, once I bumped up my version then I had no further problems :white_check_mark:

sridhar

sridhar

FYI, I was able to backport fixes to an older version (22.0.7) and create OTP binaries on my M1 machine with that (if anyone’s interested). I don’t think you can do it with kerl/asdf but directly from source is possible Commits · smocherla-brex/otp · GitHub

If anyone’s interested, these are the steps


export PATH=$PATH:<path/to/wx-install>/bin
cd $OTP_SOURCE_DIR`Preformatted text`
# Ensure we have autoconf version 2.69, latest Mac has 2.71 which does not work with OTP 22.0.7
./otp_build autoconf
# To deal with error described here https://github.com/asdf-vm/asdf-erlang/issues/164#issuecomment-695103295
export CFLAGS="-O2 -Wno-error=implicit-function-declaration"
./configure --with-ssl=$(brew --prefix openssl@1.1) --without-javac --disable-debug --enable-m64-build --prefix=~/repos/otp-22.0.7-fork-release
make
make install
# this has the pre-built binaries we need.
cd ~/repos/otp-22.0.7-fork-release/lib/erlang/
Ivor

Ivor

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

heathrm

heathrm

CFLAGS="-O2 -g"

fixed an issue I had installing Erlang 25.3. In looking it up, it seems it’s an optimization flag. Any idea why that would fix something on an M1?

htdat148

htdat148

hi all, I have a problem with my asdf on mac M1. I install asdf with brew commnad brew install asdf and its current version is 0.18.0 (revision unknown). I been able to install OTP 26 which using asdf install erlang 26.2.5.6. But my asdf does not have global option to activate the erlang version. I also have asdf with my ubuntu machine, it has the global option so I can easily switch the version.

To activate the erlang in my mac I have to put this command in my bash
#. /Users/m1/.asdf/installs/erlang/26.2.5.6/activate which is kerl command

Do you know how to activate the erlang with asdf on mac M chip?

arcanemachine

arcanemachine

asdf had a rewrite lately, I think you would use asdf set now.

Take another look at the instructions, particularly the All Commands page.

And (off the top of my head), I think you would set a “global” version in ~/.tool-versions. I could be way off base though, asdf is very set-it-and-forget-it for me.

Where Next? Top

Trending in Questions Top

RSP87
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
nseaSeb
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
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
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
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
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
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
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

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews