justincalleja

justincalleja

Engineering Elixir Applications: ERROR: build failed

Installing the mentioned version of erlang gave me issues (I also tried with some other versions in 26.2…)

❯ asdf install erlang 26.2.1

ERROR: 'asdf_26.2.1' is not a kerl-managed Erlang/OTP installation.
Build 'asdf_26.2.1' has been deleted.
Extracting source code for normal build...
Building (normal) Erlang/OTP 26.2.1 (asdf_26.2.1); please wait...
Initializing (build) log file at /Users/justincalleja/.asdf/plugins/erlang/kerl-home/builds/asdf_26.2.1/otp_build_26.2.1.log.
Attempting to use Homebrew OpenSSL from /opt/homebrew/opt/openssl@3.0...
WARNING: ... you may have to brew the expected version or otherwise use --with-ssl
APPLICATIONS DISABLED (See: /Users/justincalleja/.asdf/plugins/erlang/kerl-home/builds/asdf_26.2.1/otp_build_26.2.1.log)
 * odbc           : ODBC library - link check failed

DOCUMENTATION INFORMATION (See: /Users/justincalleja/.asdf/plugins/erlang/kerl-home/builds/asdf_26.2.1/otp_build_26.2.1.log)
 * documentation  :
 *                  fop is missing.
 *                  Using fakefop to generate placeholder PDF files.

ERROR: build failed.
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netinet/in.h:657:10: fatal error: cannot open file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netinet6/in6.h': Too many open files
  657 | #include <netinet6/in6.h>
      |          ^
1 error generated.
make[4]: *** [obj/aarch64-apple-darwin23.6.0/opt/jit/beam_asm_module.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [jit] Error 2
make: *** [emulator] Error 2

Please see /Users/justincalleja/.asdf/plugins/erlang/kerl-home/builds/asdf_26.2.1/otp_build_26.2.1.log for full details.
Auto cleaning all artifacts except the log file...
(use KERL_AUTOCLEAN=0 to keep build on failure, if desired)
Cleaning up compilation products for 'asdf_26.2.1' under:
  - /Users/justincalleja/.asdf/plugins/erlang/kerl-home/builds...
  - /Users/justincalleja/.asdf/downloads/erlang/26.2.1...
... done.

To overcome this, I had to:
ulimit -n 4096

to increase open file limits… might have helped but I also:
❯ brew install autoconf wxmac openssl@1.1 fop

with some issue with openssl@1.1

Anyway asdf list erlang lists it now and i could install the rest with asdf install and the tools version file.

Most Liked

alvinkatojr

alvinkatojr

@justincalleja for security reasons, openss1@1.1 is no longer recommended at this point. You can and should install openssl@3 instead via Homebrew i.e brew install openssl3 and add the following to your zshrc or bash file:

export PATH="$(brew --prefix openssl@3)/bin:$PATH"

This ensures that openssl3 is used for all apps/programs that require openssl.

The Homebrew versions will always be picked up by default unless you do something about it, which is why we used ASDF.

I used to have Homebrew versions of Elixir and Erlang when I started out but deleted them after I got used to asdf. They really have serve no purpose unless used as dependencies for something like RabbitMQ which for now you don’t need.

My suggestion would be to uninstall those versions, then install Elixir and Erlang versions using ASDF like you have. Then you can set global and local versions of both using the following examples. The ASDF versions will then be picked up automatically without any hitches.

Use this to set the global version of Elixir and Erlang that will be used automatically when you type iex or erl.

  • asdf global elixir 1.17.3-otp-27
  • asdf global erlang 27.1.2

Per project basis if you only need to use specific version of elixir for that specific project. Run it in the project directory.

  • asdf local elixir 1.17.3-otp-27
  • asdf local erlang 27.1.2

Let me know it this helps. Cheers!

justincalleja

justincalleja

Thank you for the reply. I’ve set the ssl3 path override. It did cross my mind to uninstall the homebrew versions. Keeping them around as a backup.

Mostly just posting comments in case someone else has difficulty getting started e.g. the running out of file descriptor issue etc…

Thanks for the feedback

Popular Prag Prog topics Top

Razor54672
The answer to 3rd Problem of Chapter 5 (Making Choices) of “Practical Programming, Third Edition” seems incorrect in the given answer ke...
New
yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
Alexandr
Hi everyone! There is an error on the page 71 in the book “Programming machine learning from coding to depp learning” P. Perrotta. You c...
New
HarryDeveloper
Hi @venkats, It has been mentioned in the description of ‘Supervisory Job’ title that 2 things as mentioned below result in the same eff...
New
alanq
This isn’t directly about the book contents so maybe not the right forum…but in some of the code apps (e.g. turbo/06) it sends a TURBO_ST...
New
Chrichton
Dear Sophie. I tried to do the “Authorization” exercise and have two questions: When trying to plug in an email-service, I found the ...
New
AndyDavis3416
@noelrappin Running the webpack dev server, I receive the following warning: ERROR in tsconfig.json TS18003: No inputs were found in c...
New
adamwoolhether
Is there any place where we can discuss the solutions to some of the exercises? I can figure most of them out, but am having trouble with...
New
AufHe
I’m a newbie to Rails 7 and have hit an issue with the bin/Dev script mentioned on pages 112-113. Iteration A1 - Seeing the list of prod...
New
a.zampa
@mfazio23 I’m following the indications of the book and arriver ad chapter 10, but the app cannot be compiled due to an error in the Bas...
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face: https://on...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
New
Margaret
Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New

Latest in PragProg

View all threads ❯