Closed mmzeeman closed 3 years ago
How is the arch in the shell specified? And could it be that we are rebuilding with a different arch than the original build?
To me it looks like removing the x86_64 option is indeed the correct one (as 32 bit builds on "Darwin" should have been phased out by now).
There is an arch
command now. This can be used to run a command (or shell) into i386
or arm64
architecture on an M1 Mac.
Maybe there is a way to get the "arch" of the current erlang version for which the build is running as this can now be different from the shell the command is running from.
Merged, thanks!
This PR removes the hard coded
arch
for which is built. When the user compiles on a M1 powered Mac, the built will be either ax86_64
or anarm64
, depending on the current arch in the users terminal.It is possible to check this with the
arch
command. The architecture of the underlying erlang system must be the same as the one in the terminal where the built is run.I don't know a good way to determine the architecture of the underlying erlang system. If that is possible, the builds architecture could be set to the architecture of the erlang system, not of the terminal. This PR assumes the architecture of the terminal is the same as the erlang system, which is usually the case.
Fixes #20