Could not compile dependency :erlexec with mix deps.compile

I’m running into an error when compiling erlexec with mix deps.compile erlexec.

Error Message

System Information

OS: macOS Monterey 12.1 (21C52)
CPU: Apple M1 Pro
Erlang: 24.1.7
Elixir: 1.13.0-otp-24
Phoenix: 1.6.0

Misc

Any combination of those commands doesnt help:

  • rm -Rf deps
  • rm -Rf _build
  • mix deps.clean --all
  • mix deps.get
  • mix deps.compile

I don’t have an M1 Mac but I hear it’s really important to know if you’re using x64 emulated terminal (and Erlang/Elixir, through Rosetta2) or are you using the native ARM (M1) ones? That should be your starting point IMO.

Erlang/Elixir, iTerm in native ARM (M1) versions.

Removing all x86 libraries installed via homebrew and installing all of them with arm64 homebrew solved that issue for me.

Can you describe the process a bit? I am also facing issues with mac m1