installation problems w/ Mac OS 15.2

Hello AFNI experts,

I tried following your "quick setup" recipe for installing AFNI on Mac OS 12+ (1.1.8. macOS 12+ (Apple Silicon/ARM processor/chip: M1, M2, …) — AFNI, SUMA and FATCAT: v24.3.10), but it's not working for me. When I get to the end (step E) if fails to compile. Here's what it shows:

wgraves@Mac:~% tcsh OS_notes.macos_12_ARM_b_user.tcsh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5072  100  5072    0     0  39438      0 --:--:-- --:--:-- --:--:-- 39625
set os = `uname -s`
uname -s
if ( 0 ) then
if ( Darwin != Darwin ) then
set cpu = `uname -m`
uname -m
if ( 0 ) then
set rver = `R --version | head -n 1 | cut -d ' ' -f 3`
R --version
cut -d   -f 3
head -n 1
if ( 0 ) then
echo OS    : Darwin
OS    : Darwin
echo CPU   : arm64
CPU   : arm64
echo R ver : 4.3.1
R ver : 4.3.1
echo 

defaults write org.macosforge.xquartz.X11 wm_ffm -bool true
defaults write org.x.X11 wm_ffm -bool true
defaults write com.apple.Terminal FocusFollowsMouse -string YES
if ( ! -f /Users/wgraves/abin/init_user_dotfiles.py ) then
echo -- skipping install of AFNI anyos_text_atlas
-- skipping install of AFNI anyos_text_atlas
endif
echo ++ setting up user dotfiles
++ setting up user dotfiles
/Users/wgraves/abin/init_user_dotfiles.py -shell_list bash zsh tcsh -do_updates path apsearch -dir_bin /Users/wgraves/abin
-- 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 4 dot files

which init_user_dotfiles.py
/Users/wgraves/abin/init_user_dotfiles.py
if ( 0 ) then
if ( arm64 == x86_64 ) then
set package = macos_13_ARM
endif
echo ++ compiling AFNI package macos_13_ARM
++ compiling AFNI package macos_13_ARM
echo ++ running: build_afni.py -build_root ~/afni_build -package macos_13_ARM
++ running: build_afni.py -build_root ~/afni_build -package macos_13_ARM
build_afni.py -build_root /Users/wgraves/afni_build -package macos_13_ARM

-- build_afni.py, version 0.14, November 17, 2024
-- current AFNI: AFNI_24.3.10, anyos_text, Dec 17 2024
-- cleaning old build root dir, /Users/wgraves/afni_build
-- preparing build_root dir, /Users/wgraves/afni_build
-- have default git tag LAST_TAG, will checkout AFNI_24.3.10
-- checking out git tag AFNI_24.3.10
-- using repo branch (detached), tag AFNI_24.3.10
-- removing old atlas dir, prev/afni_atlases_dist
** error: failed run_cmd(p): rmtree prev/afni_atlases_dist

-- shell/system command history is in:
      /Users/wgraves/afni_build/hist_commands.txt

++ screen text history is in:
      /Users/wgraves/afni_build/hist_messages.txt

rehash
if ( ! 1 ) then
echo -- already have R_LIBS=/Users/wgraves/sw/R-4.3.1
-- already have R_LIBS=/Users/wgraves/sw/R-4.3.1
endif
if ( ! -d /Users/wgraves/sw/R-4.3.1 ) then
echo -- already have directory /Users/wgraves/sw/R-4.3.1
-- already have directory /Users/wgraves/sw/R-4.3.1
endif
if ( -f /opt/X11/bin/Xvfb ) then
which Xvfb
if ( 0 ) then
echo -- already have Xvfb in PATH
-- already have Xvfb in PATH
endif
else
if ( ! -f ~/.afnirc ) then
if ( ! -f ~/.sumarc ) then
echo ++ running: suma -update_env
++ running: suma -update_env
suma -update_env
suma: Command not found.

And of course running "afni_system_check.py -check_all" doesn't go well either, giving this output:

-------------------------------- general ---------------------------------
architecture:         64bit Mach-O
cpu type:             arm64
system:               Darwin
release:              24.2.0
version:              Darwin Kernel Version 24.2.0: Fri Dec  6 18:51:28 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8112
distribution:         15.2
number of CPUs:       8
apparent login shell: tcsh
shell RC file:        .tcshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           :
                     : 
AFNI_version.txt     : AFNI_24.3.10, anyos_text, Dec 17 2024, local
which python         : /Users/wgraves/miniconda3/envs/py3_afni_tiny/bin/python
python version       : 3.13.1
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/wgraves/miniconda3/envs/py3_afni_tiny/bin/python3.13
      /opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/bin/python3.13
    python2 : 0 
    python3 : 3 
      /opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/bin/python3.13
      /Users/wgraves/miniconda3/envs/py3_afni_tiny/bin/python3.13
      /usr/bin/python3

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
        

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

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

checking for R packages...
    rPkgsInstall -pkgs ALL -check : FAILURE
        

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

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

++ module loaded: matplotlib.pyplot
   module file : /Users/wgraves/miniconda3/envs/py3_afni_tiny/lib/python3.13/site-packages/matplotlib/pyplot.py
   matplotlib version : 3.9.2

++ module loaded: flask
   module file : /Users/wgraves/miniconda3/envs/py3_afni_tiny/lib/python3.13/site-packages/flask/__init__.py
   flask version : 3.0.3

++ module loaded: flask_cors
   module file : /Users/wgraves/miniconda3/envs/py3_afni_tiny/lib/python3.13/site-packages/flask_cors/__init__.py
   flask_cors version : 3.0.10

-------------------------------- env vars --------------------------------
PATH                       = /opt/homebrew/bin:/opt/homebrew/sbin:/Users/wgraves/miniconda3/envs/py3_afni_tiny/bin:/Users/wgraves/miniconda3/condabin:/usr/local/sbin:/opt/homebrew/bin/brew:/Applications:/Users/wgraves/pipestat/bin:/Users/wgraves/scripts/execs:/usr/local/fsl/bin:/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:/Users/wgraves/abin:/opt/homebrew/opt/python/libexec/bin:/opt/homebrew/opt/python/libexec/bin:/opt/homebrew/opt/python/libexec/bin:/opt/homebrew/opt/python/libexec/bin:/opt/homebrew/opt/python/libexec/bin

PYTHONPATH                 = 
R_LIBS                     = /Users/wgraves/sw/R-4.3.1
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          = py3_afni_tiny
CC                         = 

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

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

    .afnirc                   : found
    .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 2 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.4.14


=========================  summary, please fix:  =========================
*  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

I'd appreciate any help you can give!

Best,
Will

Hi Will,

Maybe there is a permission issue in the build tree. What is the output from:

ls -l ~/afni_build
ls -l ~/afni_build/prev

Thanks,
-rick

Thanks for getting back to me, Rick. Here's the output from ls -l ~/afni_build

total 3872
drwxr-xr-x  48 20892    _lpoperator     1536 May 10  2024 afni_atlases_dist
drwxr-xr-x   3 wgraves  staff             96 Dec 31 17:31 git
-rw-r--r--   1 wgraves  staff            517 Jan  2 18:10 hist_commands.txt
-rw-r--r--   1 wgraves  staff            648 Jan  2 18:10 hist_messages.txt
-rw-r--r--   1 root     staff        1972601 Jan  2 15:45 niivue_afni.umd.js
drwxr-xr-x   7 wgraves  staff            224 Jan  2 18:10 prev

And from ls -l ~/afni_build/prev

total 3872
drwxr-xr-x    48 20892    _lpoperator     1536 May 10  2024 afni_atlases_dist
drwxr-xr-x  1774 wgraves  staff          56768 Jan  2 15:47 build_src
-rw-r--r--     1 wgraves  staff            517 Jan  2 17:49 hist_commands.txt
-rw-r--r--     1 wgraves  staff            648 Jan  2 17:49 hist_messages.txt
-rw-r--r--     1 root     staff        1972601 Jan  2 15:27 niivue_afni.umd.js

Best,
Will

I think you must have run build_afni.py using sudo at some point, which means you might have run that b_user script via sudo. Look for root owned files under your home directory and change them to be owned by you. For example, that afni_build tree should be fixed:

sudo chown -R wgraves:staff ~/afni_build

-rick

Thanks, Rick, that did the trick! It compiled and passed all the AFNI system checks except for several R packages that didn't install. But Paul Taylor's helpful advice for manually installing them in this thread (missing R packages (see rPkgsInstall) - #3 by osman) fixed those remaining issues.

Thanks again,
Will

That's great. It looks like rPkgsInstall does not have an option for including dependencies, as that other command shows. Such an option should probably be added.

Thanks,

-rick