I have a project that uses Erlang 23.2.7
When I run asdf install it gives me this:
❯ asdf install
asdf_23.2.7 is not a kerl-managed Erlang/OTP installation
The asdf_23.2.7 build has been deleted
Extracting source code
Building Erlang/OTP 23.2.7 (asdf_23.2.7), please wait...
It get’s stuck on patch step for hours
My asdf info
❯ asdf info
OS:
Darwin Nikola-MacBook-Pro.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 arm64
SHELL:
zsh 5.8.1 (x86_64-apple-darwin22.0)
ASDF VERSION:
v0.11.1
ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/opt/homebrew/opt/asdf/libexec
ASDF INSTALLED PLUGINS:
elixir https://github.com/asdf-vm/asdf-elixir.git master 1693b35
erlang https://github.com/asdf-vm/asdf-erlang.git master 0d402e6
nodejs https://github.com/asdf-vm/asdf-nodejs.git master c9e5df4
rebar https://github.com/Stratus3D/asdf-rebar.git master 4af0770
I’ve tried with flag bellow but with no success. Help
It doesn’t help, it’s still stuck on asdf(patch) step.
I am not sure what’s wrong but from what I managed to figure out by Googling it has to do something with SSL. But I’m not familiar with macOS at all and it works properly for newer versions of Erlang/Elixir.
This may be tricky, since OS X changed its version of openssl after OTP 23 was released. Have you tried running the project with a newer OTP version locally?
Ok so from what I concluded OTP versions bellow 24 (that use SSL 1.1) are not working with asdf install I tried to link brew link openssl@1.1 but it gave me warning that scared me off from that idea…
So I had to install it with brew and cp -r with asdf reshim erlang to get it to work but it feels like an ugly solution. I don’t know why it works on brew but not asdf
Okay found the solution and after that with export CFLAGS="-O2 -g -fno-stack-check -Wno-error=implicit-function-declaration" and some other flags (like compile docs for erlang) managed to get everything working.