Installation issues on MacBook Pro M1 16GB Sonoma 14.1

Dear AFNI community, I'm trying to install AFNI on my laptop, but I'm having some trouble. Would you be able to help, please?

This is the message that I saved as out.ASC.txt when running afni_system_check.py -check_all
I already tried reinstalling gcc and glib, no change

-------------------------------- general ---------------------------------
architecture: 64bit
cpu type: arm
system: Darwin
release: 23.1.0
version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:12 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T8103
distribution: 14.1
number of CPUs: 8
apparent login shell: zsh
shell RC file: .zshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni :
:
AFNI_version.txt : AFNI_24.0.16, anyos_text, Mar 21 2024, local
which python : /Users/mkachlicka/anaconda3/bin/python
python version : 3.11.4
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 : 2
/Users/mkachlicka/anaconda3/bin/python3.11
/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/bin/python3.12
python2 : 0
python3 : 3
/Users/mkachlicka/anaconda3/bin/python3.11
/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/bin/python3.12
/usr/bin/python3

** 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 : /opt/X11/bin/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 : /Users/mkachlicka/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py
matplotlib version : 3.7.1

++ module loaded: flask
module file : /Users/mkachlicka/anaconda3/lib/python3.11/site-packages/flask/init.py
flask version : 2.2.2

** failed to load module flask_cors
-- flask_cors is not required, but is desirable

-------------------------------- env vars --------------------------------
PATH = /Users/mkachlicka/anaconda3/bin:/Users/mkachlicka/anaconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/opt/homebrew/opt/python/libexec/bin:/Users/mkachlicka/abin:/opt/homebrew/opt/python/libexec/bin:/opt/homebrew/opt/python/libexec/bin

PYTHONPATH =
R_LIBS = /Users/mkachlicka/sw/R-4.3.1
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) =
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =
CONDA_SHLVL = 1
CONDA_DEFAULT_ENV = base

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

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

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

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

-- good: .cshrc seems to contain 'source .tcshrc'
-- 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

which brew : /opt/homebrew/bin/brew
brew version : Homebrew 4.2.14

========================= 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 R packages (see rPkgsInstall)
  • 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
  • consider installing gcc under homebrew
  • consider installing glib under homebrew

Seems like posts from people with a Sonoma OS are all getting the same output (mine matches what you have here). Mine is failing at the 3rd install script where it is supposed to actually make the build. I'm wondering if all the files might not be updated for OS 14 yet?

Did you end up finding a solution?

Just noting that I'm also having the same issue with my MacBook.

Hi Maggie and Kara,

I managed to get AFNI working by installing R via Homebrew (in my case, this meant adding an additional version of R, because I'm using an older one for my statistical analyses) and then manually installing all the missing R packages. This got AFNI running, but I'm still encountering some issues (see below output from afni_system_check.py -check_all command).

-------------------------------- general ---------------------------------
architecture:         64bit 
cpu type:             arm
system:               Darwin
release:              23.1.0
version:              Darwin Kernel Version 23.1.0: Mon Oct  9 21:28:12 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T8103
distribution:         14.1
number of CPUs:       8
apparent login shell: zsh
shell RC file:        .zshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /Users/mkachlicka/abin/afni
afni version         : Precompiled binary macos_10.12_local: Apr  5 2024 
                     : AFNI_24.1.01 'Publius Septimius Geta'
AFNI_version.txt     : AFNI_24.1.01, macos_10.12_local, Apr 05 2024, official
which python         : /opt/anaconda3/bin/python
python version       : 3.10.14
which R              : /opt/homebrew/bin/R
R version            : R version 4.4.1 (aarch64-apple-darwin23.4.0)

instances of various programs found in PATH:
    afni    : 1   (/Users/mkachlicka/abin/afni)
    R       : 2 
      /opt/homebrew/Cellar/r/4.4.1/bin/R
      /Library/Frameworks/R.framework/Versions/4.2/Resources/bin/R
    python  : 2 
      /opt/anaconda3/bin/python3.10
      /opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/bin/python3.12
    python2 : 0 
    python3 : 3 
      /opt/anaconda3/bin/python3.10
      /opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/bin/python3.12
      /usr/bin/python3

** have python3 but not python2

testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : success
    3dClustSim           : success
    uber_subject.py      : success
    3dMVM                : FAILURE
        Error in library(data.table) : there is no package called ‘data.table’
        Calls: source ... suppressPackageStartupMessages -> withCallingHandlers -> library
        Execution halted

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

which tcsh           : /bin/tcsh
which Xvfb           : /opt/X11/bin/Xvfb

checking for R packages...
    rPkgsInstall -pkgs ALL -check : FAILURE
        Error in dyn.load(ll) : 
          unable to load shared object '/Users/mkachlicka/abin/R_io.so':
          dlopen(/Users/mkachlicka/abin/R_io.so, 0x0006): tried: '/Users/mkachlicka/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/mkachlicka/abin/R_io.so' (no such file), '/Users/mkachlicka/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
        Calls: source ... withVisible -> eval -> eval -> set_R_io -> dyn.load
        Execution halted

R RHOME : /opt/homebrew/Cellar/r/4.4.1/lib/R

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

++ module loaded: matplotlib.pyplot
   module file : /opt/anaconda3/lib/python3.10/site-packages/matplotlib/pyplot.py
   matplotlib version : 3.8.4

++ module loaded: flask
   module file : /opt/anaconda3/lib/python3.10/site-packages/flask/__init__.py
   flask version : 3.0.3

++ module loaded: flask_cors
   module file : /opt/anaconda3/lib/python3.10/site-packages/flask_cors/__init__.py
   flask_cors version : 5.0.0

-------------------------------- env vars --------------------------------
PATH                       = /opt/anaconda3/bin:/opt/anaconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/opt/homebrew/opt/python/libexec/bin:/Users/mkachlicka/abin:/opt/homebrew/opt/python/libexec/bin:/opt/homebrew/opt/python/libexec/bin:/opt/homebrew/opt/python/libexec/bin:/Users/mkachlicka/abin:/opt/homebrew/opt/python/libexec/bin

PYTHONPATH                 = 
R_LIBS                     = /Users/mkachlicka/sw/R-3.3.3
LD_LIBRARY_PATH            = 
DYLD_LIBRARY_PATH (sub-shell) = :/opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) = 
CONDA_SHLVL                = 1
CONDA_DEFAULT_ENV          = base

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

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

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

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

   -- good: .cshrc seems to contain 'source .tcshrc'
   -- considered operations: path, flatdir, 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 : found AFNI_data6   under $HOME (948584M Avail)
           top history: ...ickr]: add regress block to -radial_correlate_blocks
data dir : found AFNI_demos   under $HOME
           top history: ...ct 2020 [taylorp]: updated scripts under FATCAT_DEMO
data dir : found suma_demo    under $HOME
           top history: ...s_New/data/Build_tmp on Mon Mar  4 11:56:45 EST 2013
data dir : found afni_handouts under $HOME
atlas    : found TT_N27+tlrc  under /Users/mkachlicka/abin

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

which brew           : /opt/homebrew/bin/brew
brew version         : Homebrew 4.3.9

++ found 1 dylib files under '/opt/X11/lib/flat_namespace'
   -- found 'libXt' dylib files:
      /opt/X11/lib/flat_namespace/libXt.6.dylib
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in cur shell 'zsh'...
++ found evar DYLD_LIBRARY_PATH = :/opt/X11/lib/flat_namespace
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in shell 'tcsh'...
++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace

=========================  summary, please fix:  =========================
*  just be aware: login shell 'zsh', but our code examples use 'tcsh'
*  AFNI programs show FAILURE
*  missing R packages (see rPkgsInstall)
*  consider installing gcc under homebrew
*  consider installing glib under homebrew

I've tried installing gcc and glib via homebrew too, but without any success. This was a while ago, so I don't remember exactly what the issue was.

Here you are using the macos_10.12_local binaries, a package for old mac versions on Intel systems. I will send you a message with an email address, and maybe we can try to resolve this over zoom, say.
Thanks,
-rick

Not sure, but based on the error messages, I think this may be related to cmake/SDK changes in Sonoma, similar to what has been discussed for curl here.

That does seem to come into play now and again. Compiling on macs is not as reliable as one might hope.

  • rick