Building Elixir from source segfaults on macOS 11.0 on Apple Silicon (arm64) while compiling.

4,945 views
Skip to first unread message

Mark Madsen

unread,
Jul 10, 2020, 11:17:42 PM7/10/20
to elixir-lang-core
I've got Erlang compiled on Apple Silicon but I am unable to get Elixir to compile.

Make segfaults as shown below.

I'm hoping someone with better knowledge of the process can help me fix this. 
It's possible that it's an issue with Erlang... but I'm not convinced that it is. I was able to compile Cowboy and run a test server just fine so I don't think Erlang is the issue.

I'd like to get some help fixing this now so that if it is an upstream issue with Erlang there's ample time to get a fix out and test it there. And then make any needed changes to Elixir. Before the new computers with Apple Silicon start showing up.

I'm willing to help with fixes but I need to be pointed in the right direction on this.

Thanks!

make
.... 


Recompile: src/elixir_bitstring

Recompile: src/elixir_aliases

Recompile: src/elixir

Generated elixir app

==> bootstrap (compile)

Compiled lib/elixir/lib/kernel.ex

Compiled lib/elixir/lib/macro/env.ex

Compiled lib/elixir/lib/keyword.ex

Compiled lib/elixir/lib/module.ex

Compiled lib/elixir/lib/list.ex

Compiled lib/elixir/lib/macro.ex

Compiled lib/elixir/lib/kernel/typespec.ex

Compiled lib/elixir/lib/kernel/utils.ex

/bin/sh: line 1: 66739 Segmentation fault: 11  erl -I lib/elixir/include -noshell -pa lib/elixir/ebin -s elixir_compiler bootstrap -s erlang halt

make: *** [lib/elixir/ebin/Elixir.Kernel.beam] Error 139


If you try make again:


make

Generated elixir app

==> eex (compile)

{"init terminating in do_boot",{undef,[{'Elixir.Kernel.CLI',main,[["+elixirc","--ignore-module-conflict","lib/**/*.ex","-o","ebin"]],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}

init terminating in do_boot ({undef,[{Elixir.Kernel.CLI,main,+elixirc--ignore-module-conflictlib/**/*.ex-oebin,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})


Crash dump is being written to: erl_crash.dump...done


José Valim

unread,
Jul 11, 2020, 2:45:01 AM7/11/20
to elixir-l...@googlegroups.com
Elixir doesn’t compile any native code. Therefore these errors mean that you were able to compile the Erlang VM but either the code or the compiler has bugs and the VM is seg faulting.

The question then is not related to Elixir but how to debug seg faults in C code, which is not something I can help with.

Good luck!

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/8d82a641-5ca5-4e84-97ec-ae49ab855033o%40googlegroups.com.

Jim Freeze

unread,
Jul 11, 2020, 1:06:26 PM7/11/20
to elixir-l...@googlegroups.com
Is this because make is being used instead of gmake?


Dr. Jim Freeze, Ph.D.


Mark Madsen

unread,
Jul 11, 2020, 1:56:01 PM7/11/20
to elixir-lang-core
I'm not sure. I will have more time to test later today.

I had a small cowboy project handy that I'd used to troubleshoot H2 issues when that was initially release and when it worked I thought we were in the clear.
I am going to run the Erlang test suite and then open tickets in their bug tracker for any failures.

My goal here is to make sure that when the new Apple laptops show up that we have Elixir/Erlang support ready to go.
(The latest rumours have at least one out before the end of 2020.)

I know it will take time to get any upstream issues in Erlang fixed, so I figured we'd better get going on this now.


On Saturday, July 11, 2020 at 11:06:26 AM UTC-6, Jim Freeze wrote:
Is this because make is being used instead of gmake?


Dr. Jim Freeze, Ph.D.


To unsubscribe from this group and stop receiving emails from it, send an email to elixir-l...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-l...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages