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 Pragmatic topics Top

iPaul
page 37 ANTLRInputStream input = new ANTLRInputStream(is); as of ANTLR 4 .8 should be: CharStream stream = CharStreams.fromStream(i...
New
brianokken
Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
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
Charles
In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New
brunogirin
When running tox for the first time, I got the following error: ERROR: InterpreterNotFound: python3.10 I realised that I was running ...
New
taguniversalmachine
It seems the second code snippet is missing the code to set the current_user: current_user: Accounts.get_user_by_session_token(session["...
New
taguniversalmachine
Hi, I am getting an error I cannot figure out on my test. I have what I think is the exact code from the book, other than I changed “us...
New
creminology
Skimming ahead, much of the following is explained in Chapter 3, but new readers (like me!) will hit a roadblock in Chapter 2 with their ...
New
andreheijstek
After running /bin/setup, the first error was: The foreman' command exists in these Ruby versions: That was easy to fix: gem install fore...
New
Keton
When running the program in chapter 8, “Implementing Combat”, the printout Health before attack was never printed so I assumed something ...
New

Other popular topics Top

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
siddhant3030
I’m thinking of buying a monitor that I can rotate to use as a vertical monitor? Also, I want to know if someone is using it for program...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
PragmaticBookshelf
“A Mystical Experience” Hero’s Journey with Paolo Perrotta @nusco Ever wonder how authoring books compares to writing articles?...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New

Latest in PragProg

View all threads ❯