Installation Error - M2 Mac - Missing Program AFNI

Followed the instructions from the AFNI installation website:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_macOS_12_Silicon.html

Summary of errors:
========================= summary, please fix: =========================

  • just be aware: login shell 'zsh', but our code examples use 'tcsh'
  • missing program: afni
  • failure under initial "AFNI and related program tests"
  • AFNI programs show FAILURE
  • missing program: Xvfb
  • missing R packages (see rPkgsInstall)
  • please run: cp /Users/menonsn/abin/AFNI.afnirc ~/.afnirc
  • please run: "suma -update_env" for .sumarc
  • please run: apsearch -update_all_afni_help
  • insufficient data for AFNI bootcamp
    (see "Prepare for Bootcamp" on install pages)
  • possibly missing atlases

Full out.ASC.txt:

-------------------------------- general ---------------------------------
architecture: 64bit
cpu type: arm
system: Darwin
release: 22.6.0
version: Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:53 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020
distribution: 13.5
number of CPUs: 12
apparent login shell: zsh
shell RC file: .zshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni :
:
AFNI_version.txt : AFNI_23.3.02, anyos_text, Oct 17 2023, local
which python : /usr/local/bin/python
python version : 3.11.6
which R : /usr/local/bin/R
R version : R version 4.3.1 (aarch64-apple-darwin20)

instances of various programs found in PATH:
afni : 0
R : 1 (/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/bin/R)
python : 1 (/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/bin/python3.11)
python2 : 0
python3 : 2
/usr/bin/python3
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11

** have python3 but not python2

testing ability to start various programs...
afni : FAILURE
/bin/sh: afni: command not found
suma : FAILURE
/bin/sh: suma: command not found
3dSkullStrip : FAILURE
/bin/sh: 3dSkullStrip: command not found
3dAllineate : FAILURE
/bin/sh: 3dAllineate: command not found
3dRSFC : FAILURE
/bin/sh: 3dRSFC: command not found
SurfMesh : FAILURE
/bin/sh: SurfMesh: command not found
3dClustSim : FAILURE
/bin/sh: 3dClustSim: command not found
uber_subject.py : success
3dMVM : FAILURE
setenv: Too many arguments.

------------------------ dependent program tests -------------------------
checking for dependent programs...

which tcsh : /bin/tcsh
which Xvfb :

checking for R packages...
rPkgsInstall -pkgs ALL -check : FAILURE
setenv: Too many arguments.

R RHOME : /Library/Frameworks/R.framework/Resources

------------------------------ python libs -------------------------------

++ module loaded: matplotlib.pyplot
module file : /opt/homebrew/lib/python3.11/site-packages/matplotlib/pyplot.py
matplotlib version : 3.8.0

-- python binaries under /usr/local/bin:
/usr/local/bin/python (sym link to /opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/bin/python3.11)
/usr/local/bin/python3 (sym link to /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11)

-------------------------------- env vars --------------------------------
PATH = /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/jamf/bin:/opt/homebrew/opt/python@3.11/libexec/bin:/opt/homebrew/opt/python@3.11/libexec/bin:/Users/menonsn/abin

PYTHONPATH =
R_LIBS = /Users/menonsn/sw/R-4.3.1

LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) =
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =

----------------------------- eval dot files -----------------------------

----------- AFNI $HOME files -----------

.afnirc                   : missing
.sumarc                   : missing
.afni/help/all_progs.COMP : missing

--------- shell startup files ----------

-- good: .tcshrc seems to contain 'source .cshrc'
-- considered operations: path, apsearch

-- note: followers should not need edits, so edit flags should be 0
(have 1 follower(s), which can be ignored)

no modifications needed across 3 dot files

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : did not find TT_N27+tlrc

------------------------------ OS specific -------------------------------
XQuartz version : 2.8.5

** no package manager found (okay for bootcamp)

========================= summary, please fix: =========================

  • just be aware: login shell 'zsh', but our code examples use 'tcsh'
  • missing program: afni
  • failure under initial "AFNI and related program tests"
  • AFNI programs show FAILURE
  • missing program: Xvfb
  • missing R packages (see rPkgsInstall)
  • please run: cp /Users/menonsn/abin/AFNI.afnirc ~/.afnirc
  • please run: "suma -update_env" for .sumarc
  • please run: apsearch -update_all_afni_help
  • insufficient data for AFNI bootcamp
    (see "Prepare for Bootcamp" on install pages)
  • possibly missing atlases

Thanks you.'

Hi, I have the same installation errors on M2 Mac. Have you solved these problems?

One difficulty here is that there can be many different reasons why one might run into problems building AFNI locally, so issues need to be investigated each time (generally by looking at ~/afni_build/build_src/log_make.txt . But there is at least one problem that we have not figured out, a trouble making libjpeg (which seems to be a discrepancy between mac libraries and what is expected by the homebrew compiler).

Anyway, if the build_afni.py step is failing, I would be happy to take a look (maybe I can message you with an address to send it to).

  • rick