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

Where Next?

Popular Pragmatic Bookshelf topics Top

jon
Some minor things in the paper edition that says “3 2020” on the title page verso, not mentioned in the book’s errata online: p. 186 But...
New
belgoros
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84: bundle exec sequel...
New
edruder
I thought that there might be interest in using the book with Rails 6.1 and Ruby 2.7.2. I’ll note what I needed to do differently here. ...
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
rmurray10127
Title: Intuitive Python: docker run… denied error (page 2) Attempted to run the docker command in both CLI and Powershell PS C:\Users\r...
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
s2k
Hi all, currently I wonder how the Tailwind colours work (or don’t work). For example, in app/views/layouts/application.html.erb I have...
New
rainforest
Hi, I’ve got a question about the implementation of PubSub when using a Phoenix.Socket.Transport behaviour rather than channels. Before ...
New
roadbike
From page 13: On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio ...
New

Other popular topics Top

malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
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
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
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
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New

Latest in Engineering Elixir Applications

Sub Categories: