3 ms·
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 skeptic
by drvdevd 6y ago
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.
- arjan_sch 6y agoErlang compiles and runs fine on ARM architectures in general. It is used extensively on IoT platforms like https://www.nerves-project.org/ https://www.nerves-project.org/
- KenoFischer 6y agoProbably 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.
- arjan_sch 6y agoTrue. 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.
- KenoFischer 6y ago> 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 :).
- asveikau 6y agogcc certainly compiles for ARM and understands Darwin/mach-o. It can probably target iOS. What would the major barrier be for gcc to work?
- KenoFischer 6y agoSee https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96168 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96168.
- deleted 6y ago[deleted]
- asveikau 6y agoThis 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.
- manquer 6y agoGiven 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.
- deleted 6y ago[deleted]
- filmor 6y agoThat's not true. GCC, Clang and MSVC are supported. http://erlang.org/doc/installation_guide/INSTALL.html http://erlang.org/doc/installation_guide/INSTALL.html
- monocasa 6y agoDoes it support aarch64? AFAIK, the Apple SoCs these days don't support 32bit ARM anymore.
- Ndymium 6y agoBut in this case the Erlang VM was already compiled and running. It was compiling Elixir (using the Erlang VM) that crashed.
- dnautics 6y agonot 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.
- pmontra 6y agoI 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.