M1 processor compatibility?

Apologies if this has been asked before, but does anyone know if AFNI is compatible with the new mac M1 processor?

Hi, Chuck-

The quick answer is “yes”.

The detailed answer will arrive here via Daniel Glen in a wee bit.


As Paul says, yes. Mostly things are okay. And we should probably write up some guides for this eventually. You can run AFNI programs either as Intel versions or natively with Apple Silicon architecture (ARM-M1).

Right now, we distribute AFNI in the Intel architecture (precompiled binary macos_10.12_local). That works fine with Apple’s Rosetta emulation. To run an application that was built for Intel architecture on Macs with Apple Silicon CPUs (ARM M1 for now), you need to install Rosetta for emulation software, which is not enabled and installed by default. You can do this via the MacOS GUI by selecting Get Info on any application binary file that has Intel or Universal architecture or by duplicating the Terminal Application, renaming it to something like “RosettaTerminal” and telling the MacOS to run it with Rosetta instead of native CPU support.

It’s also possible to install with a command line interface in a scriptable way. That might be useful for some future AFNI installations.

sudo /usr/sbin/softwareupdate --install-rosetta --agree-to-license

with more detail here:

The native version requires a little more work. Essentially, you have to build AFNI from source. Using the Makefile.macos_11.3_ARM_M1_clang as your Makefile. Follow the information at the top of that file for brew install and XQuartz installation (some related notes are also in the other_builds/OS_notes.macos_10.15.txt file).

Chris Rorden did most of the early work on this that you can read about here, and we learned much from him:

Still it’s not perfect, but the MacOS isn’t perfect in non-Intel versions either. XQuartz has a number of issues, and the tcsh in Rosetta mode sometimes has a strange glitch.

Thank you both. This is extremely helpful!
Best wishes,