OmegaNalphA

OmegaNalphA

Asdf install erlang 25.2 failing, unsure of cause, on Mac OSX Monterey 12.5.1 M1 Pro

Hi all,

We recently upgraded from erlang 23.2.7 to 25.2, the rest of the team had no issue running asdf install, but I’ve been consistently running into errors. Most recently I tried setting the kerl flags, and now getting a rather cryptic output. Would love any help you’d be able to provide.

The output:

[aaggarwal:...roadcast-work/broadcast-api]$ export KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl@1.1)"                                                                                                          
asdf install erlang 25.2
elixir 1.13.4-otp-25 is already installed
asdf_25.2 is not a kerl-managed Erlang/OTP installation
The asdf_25.2 build has been deleted
Extracting source code
Building Erlang/OTP 25.2 (asdf_25.2), please wait...
APPLICATIONS DISABLED (See: /Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_build_25.2.log)
 * jinterface     : Java compiler disabled by user

Build failed.
gmake[5]: Leaving directory '/Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/lib/megaco/src/flex'
gmake[4]: *** [/Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/make/run_make.mk:35: opt] Error 2
gmake[4]: Leaving directory '/Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/lib/megaco/src/flex'
gmake[3]: *** [/Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/make/otp_subdir.mk:29: opt] Error 2
gmake[3]: Leaving directory '/Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/lib/megaco/src'
gmake[2]: *** [/Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/make/otp_subdir.mk:29: opt] Error 2
gmake[2]: Leaving directory '/Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/lib/megaco'
gmake[1]: *** [/Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/make/otp_subdir.mk:29: opt] Error 2
gmake[1]: Leaving directory '/Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/lib'
gmake: *** [Makefile:518: libs] Error 2

Please see /Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_build_25.2.log for full details.

The build log doesn’t add much more information, can post that in the thread if it helps.

Running this on MacOSX Monterey 12.5.1 on Apple M1. The terminal is a rosetta terminal and should have everything linked and installed. Here is a list of the brew formulae currently on the machine.

[aaggarwal:...roadcast-work/broadcast-api]$ brew list                                                                                                                                                                                        (main)
==> Formulae
asdf			elasticsearch-full	glib			krb5			libreadline-java	libxdmcp		little-cms2		openssl@3		railway
autoconf		fontconfig		gmp			libffi			libtiff			libxext			lz4			pcre			readline
automake		fop			graphite2		libgcrypt		libtool			libxml2			lzo			pcre2			unixodbc
ca-certificates		freetype		harfbuzz		libgpg-error		libx11			libxrender		m4			pixman			xorgproto
cairo			gettext			icu4c			libical			libxau			libxslt			openjdk			postgresql		xz
coreutils		giflib			jpeg-turbo		libpng			libxcb			libyaml			openssl@1.1		postgresql@14		zstd

Any help would be appreciated, thank you!

First 10 of 11 Posts Switch mode

coen.bakker

coen.bakker

By chance updated your OS recently? Maybe completely unrelated, but a lot of people with Macs have had weird errors pop up, because Xcode needs you to set certain permissions… Even if you don’t use Xcode.

Worth to check it out, if you haven’t already.

OmegaNalphA

OmegaNalphA OP

Tried that one, unfortunately hasn’t worked for me. uninstalled and reinstalled xcode

adamu

adamu

asdf-erlang is great until it breaks, then it’s a huge timesink to debug.

You will probably have more success using kerl directly.

For example:

Set KERL_DEFAULT_INSTALL_DIR (I use ~/.kerl/installs/), then:

kerl build 25.2 25.2
kerl install 25.2

Then put this in your profile:

. $(kerl path 25.2)/activate
Nicd

Nicd

This seems to be the issue (segmentation fault):

/bin/sh: line 1: 91925 Segmentation fault: 11  erlc -W -Werror +debug_info -DENABLE_MEGACO_FLEX_SCANNER=true -DMEGACO_REENTRANT_FLEX_SCANNER=true -Dmegaco_parser_inline -pa /Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/lib/et/ebin -pa /Users/aaggarwal/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_src_25.2/lib/megaco/ebin +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"megaco-4.4.2"}' -I../../include -o../../ebin megaco_flex_scanner.erl

It looks like you’re compiling in Rosetta (x86_64) mode instead of in ARM mode. Is this on purpose? I’d retry with ARM, I’ve noted people have had segfaults when using the wrong architecture on M1, though I don’t have M1 myself so I don’t have experience.

EDIT: Further looking at your OpenSSL location, it seems your Homebrew is installed in x86_64 mode (install location is /usr/local for macOS Intel, /opt/homebrew for Apple Silicon). I’d recommend reinstalling homebrew and the rest of the tooling, making sure you are in Apple Silicon mode in the terminal.

OmegaNalphA

OmegaNalphA OP

Definitely correct, I’m trying to keep everything in x86_64 since most things don’t play nice with ARM just yet and most of my team still uses older macbooks. I was able to install erlang 23.2 this way, is there a workaround to keep using rosetta?

OmegaNalphA

OmegaNalphA OP

ah unfortunately the kerl build step still failed for the same reasons, I definitely agree this has been a massive pain but will get through it eventually!

OmegaNalphA

OmegaNalphA OP

@Nicd was correct, our team was trying to use Rosetta as much as we could but unfortunately asdf does not play nice with rosetta terminals. deleteing asdf, brew, and anything downloaded by either, then reinstalling on an arm terminal fixed the issue. Hope this helps!

egze

egze

From personal experience - ARM is pretty smooth sailing for my team. We don’t do anything special and it works for folks on Intel as well. Only thing we do is - find docker images that are built with both architectures for things like Postgres, Rabbit, etc.

Where Next?

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement