You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the M1 processor in newer Macs is not an x86_64, so the generated shared library can't be loaded by the native Erlang VM. According to the file command the shared library is a Mach-O 64-bit dynamically linked shared library x86_64, but the Erlang VM says:
I expected the generated Makefile to be correct :-) I'm not quite sure what should be the correct solution, my workaround was to remove the -arch x86_64 options (see for example at maxlapshin/fix#14). However, if that option was there for a reason, we might need to branch on machine type too, not only on OS.
The text was updated successfully, but these errors were encountered:
Thanks! Already merged. I don't imagine this option was essential (the architecture isn't specified for other OSes either) and the build worked, so I suppose it to be fine.
Pre-Check
Environment
Rebar3 report
version 3.17.0+build.5120.ref26d929b0
generated at 2021-11-29T21:05:24+00:00
Current behaviour
I followed the description at http://rebar3.org/docs/tutorials/building_c_cpp/ to create a NIF library. I executed the
commands which generated a
c_src/Makefile
. ThisMakefile
has an OS X-specific section:The problem is that the M1 processor in newer Macs is not an x86_64, so the generated shared library can't be loaded by the native Erlang VM. According to the
file
command the shared library is aMach-O 64-bit dynamically linked shared library x86_64
, but the Erlang VM says:Expected behaviour
I expected the generated Makefile to be correct :-) I'm not quite sure what should be the correct solution, my workaround was to remove the
-arch x86_64
options (see for example at maxlapshin/fix#14). However, if that option was there for a reason, we might need to branch on machine type too, not only on OS.The text was updated successfully, but these errors were encountered: