Re:Building Elixir from source segfaults on macOS on Apple S...
by drvdevd on Monday July 13, 2020 @02:52PM
(#23824223)
I’ve run into errors compiling the Erlang VM before (just doing some Linux package management). If I casually ran into these types of issues on x86, I’m skeptical this really has anything to do with Apple Silicon, which is ARM after all.
Re:Building Elixir from source segfaults on macOS on Apple S...
by arjan_sch on Monday July 13, 2020 @03:04PM
(#23824339)
Erlang compiles and runs fine on ARM architectures in general. It is used extensively on IoT platforms like https://www.nerves-project.org/
Re:Building Elixir from source segfaults on macOS on Apple S...
by KenoFischer on Monday July 13, 2020 @03:42PM
(#23824780)
Probably not super well tested with a bleeding edge clang compiler though (and even for non-bleeding-edge versions, I'd suspect mostly tested with GCC). Triggering compiler bugs or exposing technically undefined behavior would not be entirely surprising.
Re:Building Elixir from source segfaults on macOS on Apple S...
by arjan_sch on Monday July 13, 2020 @03:50PM
(#23824880)
True. IIRC Erlang only supports GCC as the build system. I helped fixing a race in the BEAM a while back that only occurred on the latest GCC.
Re:Building Elixir from source segfaults on macOS on Apple S...
by KenoFischer on Monday July 13, 2020 @03:59PM
(#23824946)
> IIRC Erlang only supports GCC as the build system.
Since gcc doesn't work on Apple Silicon, I assumed the OP must be using clang :).
Re:Building Elixir from source segfaults on macOS on Apple S...
by asveikau on Monday July 13, 2020 @05:06PM
(#23825569)
gcc certainly compiles for ARM and understands Darwin/mach-o. It can probably target iOS. What would the major barrier be for gcc to work?
Re:Building Elixir from source segfaults on macOS on Apple S...
by manquer on Monday July 13, 2020 @05:30PM
(#23825794)
Given that Apple silicon is pretty new my guess it porting and testing , I would also add not all ARM chips are exactly the same , there will be some minor nuances for sure .
Perhaps it is also some funding and access to the kits and dev time , updating gcc is not a full time job for most of the contributors after all.
Re:Building Elixir from source segfaults on macOS on Apple S...
by KenoFischer on Monday July 13, 2020 @05:39PM
(#23825864)
Re:Building Elixir from source segfaults on macOS on Apple S...
by asveikau on Monday July 13, 2020 @07:38PM
(#23826915)
This is a great thread, thanks! (And I see that your name is in the thread.)
I gather from there that previous efforts to target iOS are outdated, there is substantial work to handle the Apple ABI, and that it's not been seriously looked at yet.
Re:Building Elixir from source segfaults on macOS on Apple S...
by filmor on Tuesday July 14, 2020 @02:23AM
(#23829112)
That's not true. GCC, Clang and MSVC are supported.
Re:Building Elixir from source segfaults on macOS on Apple S...
by monocasa on Monday July 13, 2020 @05:43PM
(#23825896)
Does it support aarch64? AFAIK, the Apple SoCs these days don't support 32bit ARM anymore.
Re:Building Elixir from source segfaults on macOS on Apple S...
by pmontra on Monday July 13, 2020 @05:37PM
(#23825852)
I compiled Erlang and Elixir on a Raspberry Pi 3. It's OK on that ARM chip. Maybe the compiler doesn't fully support the new Apple chip yet.
Re:Building Elixir from source segfaults on macOS on Apple S...
by Ndymium on Monday July 13, 2020 @03:24PM
(#23824569)
But in this case the Erlang VM was already compiled and running. It was compiling Elixir (using the Erlang VM) that crashed.
Re:Building Elixir from source segfaults on macOS on Apple S...
by dnautics on Monday July 13, 2020 @05:46PM
(#23825919)
not every application sees every part of the beam VM. I wouldn't be surprised if test coverage on some new systems (like the new process group registry system) that depend on NIFs (C ABI FFI) isn't complete.
> 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.