Unable to Install Erlang using asdf on OSX 10.15.4
Asked Answered
S

2

6

I am running into an issue that I haven't previously had with over 6+ months of using asdf on osx. I need to install Erlang 21.3.7.1 and when I do I get this error output from the console that I honestly don't know how to solve:

Me@My-MacBook-Pro:~/Code/codebase|master
⇒  asdf install erlang 21.3.7.1
Downloading kerl...
Downloading OTP-21.3.7.1.tar.gz to /Users/Me/.asdf/plugins/erlang/kerl-home/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   124  100   124    0     0    523      0 --:--:-- --:--:-- --:--:--   523
100 51.5M    0 51.5M    0     0  8541k      0 --:--:--  0:00:06 --:--:-- 9657k
Extracting source code
Building Erlang/OTP 21.3.7.1 (asdf_21.3.7.1), please wait...
DOCUMENTATION INFORMATION (See: /Users/Me/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.7.1/otp_build_21.3.7.1.log)
 * documentation  :
 *                  fop is missing.
 *                  Using fakefop to generate placeholder PDF files.

Build failed.
 GEN obj/x86_64-apple-darwin19.4.0/opt/MADE
 LD /Users/Me/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.7.1/otp_src_21.3.7.1/bin/x86_64-apple-darwin19.4.0/erl_child_setup
ld: weak import of symbol '___darwin_check_fd_set_overflow' not supported because of option: -no_weak_imports for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [/Users/Me/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.7.1/otp_src_21.3.7.1/bin/x86_64-apple-darwin19.4.0/erl_child_setup] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [smp] Error 2
make: *** [emulator_profile_generate] Error 2

Nothing I found on the Erlang/Elixir/asdf forums was particularly helpful. asdf was installed with homebrew. I can install the ref:maint build and change my .tool-version to match but that sets off a whole slew of other issues with Crypto and openssl not being found even though they're installed. Anyone have an idea or two?

Septuplicate answered 15/4, 2020 at 12:20 Comment(4)
I'm running into this exact same issue. I'll let you know if I find a solution.Slipsheet
If you google, there are solutions to the openssl issue, but I think the weak import is another issue altogether.Slipsheet
I think the reason this doesn't show up in a simple google search is that -no_weak_imports instructs Google to exclude results containing no_weak_imports. Adding double quotes around the entire error message leads directly to the relevant Jira issue. (and now also this question)Dorfman
also same message during compiling gnutls30-shlibs-3.6.13-1 via gcc 10.1.0 and Xcode command-line tools: 11.4.1.0.1.1586360307.Chercherbourg
D
11

It's not possible to build Erlang 21 on Catalina (10.15), according to the comments in this bug report. You can use release 22.3.1 or later.

If you need to use an older Erlang version, you could try applying this change on the Erlang 21 source code.

Dorfman answered 15/4, 2020 at 13:45 Comment(2)
Yep, I upped to 22.3.1, and it resolved my issue, which was the same issue OP was running into.Slipsheet
Cheers! Bummed out by it but this did answer the question.Septuplicate
S
1

After upgrading to Catalina I tried installing 22.3.1 but that was not enough for me; somehow Erlang on Catalina could not find OpenSSL.

What I had to do was:

1) Uninstall Erlang 22.3.1 if you have it already:

asdf uninstall erlang 22.3.1

2) Update Xcode to latest version & accept agreement

sudo xcodebuild -license 

3) Set --with-ssl flag (copied from the asdf-erlang readme)

export KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl)"

4) Reinstall Erlang

asdf install erlang 22.3.1 
Silber answered 3/5, 2020 at 23:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.