Hi AFNI community,
I used Codex to build an unofficial AFNI macOS 26 binaries for Apple M2. I am sharing it in case it helps anhone who want a optimized-built AFNI binary on newer Apple hardware.
This is not an official AFNI/NIMH build. Please treat it as a community build and do not use it in a production enviroment.
Build summary:
AFNI version: AFNI_25.2.00 'Gordian I'
Architecture: arm64
Build system: 2023 MacBook Pro, Apple M2 Max
Compiler: Apple clang
Optimization: -O3 -mcpu=apple-m2 -pipe
Package: macos_13_ARM.AFNI_25.2.00.m2clang.2.tgz
Dependency choices:
jpeg-turbo instead of system libjpeg
zlib-ng-compat instead of system zlib
Runtime Homebrew packages requirements:
brew install openmotif mesa-glu gsl glib libomp libxpm zlib-ng-compat
The package includes atlas/template/assets from https://afni.nimh.nih.gov/pub/dist/tgz/macos_13_ARM.AFNI_25.3.03.tgz and removes Python __pycache__ files.
Release:
https://github.com/cecilyen/MacM2_AFNI/releases/tag/v25.2.00-m2clang.2
README:
https://github.com/cecilyen/MacM2_AFNI/blob/main/README.md
I would appreciate any feedback as this is the first time Codex (AI agent) to help me building AFNI on macOS.
Very interesting idea. Hope it works well, and hope it was relatively easy.
I published an updated unofficial AFNI 26.2.01 build for Apple Silicon macOS:
- Generic
arm64 build using Apple Clang
- Optimized with
-O3 and ThinLTO
- Uses
jpeg-turbo and zlib-ng-compat
- Includes AFNI/SUMA, atlases, templates, and support files
- Tested with all 49 AFNI GUI plugins loading successfully
- Excludes the optional, incompatible
R_io.so
Download the release
Installation instructions
This is an unofficial community build. Please validate important results against an official AFNI installation.
Here are some of my .afnirc tweaks that may improve efficiency for advanced users.
.afnirc
AFNI_HINTS = KILL
AFNI_COMPRESSOR = PIGZ
AFNI_NOMMAP = YES
AFNI_NO_MCW_MALLOC = YES
AFNI_NOSPLASH = YES
AFNI_DEFAULT_IMSAVE = png
AFNI_VERSION_CHECK = NO
AFNI_MOTD_CHECK = NO
AFNI_IMSAVE_WARNINGS = NO
AFNI_SKIP_DYLD_WARNING = YES
AFNI_SESSION_SORT = MRITYPE
AFNI_START_SMALL = YES
AFNI_X11_REDECORATE = NO
AFNI_CLICK_MESSAGE = NO
AFNI_DISABLE_CURSORS = YES
Also, export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace is no longer needed in the lastest AFNI and macOS.
Hi, Cecil-
I have followed this thread as you have updated it. I just wanted to say thanks for going through these things, and we will look more deeply at this on our side here. (And I am surprised about the flat_namespace!)
Thanks,
pt