AFNI installation issues on MAC OS Ventura 13.6, M2

Hi all,

I am struggling with the AFNI installation on my Mac Pro Ventura 13.6, M2. I followed the steps listed here to install AFNI. Below is what I got after typing this command: tcsh OS_notes.macos_12_ARM_b_user.tcsh

I would appreciate any help with this.

Thanks in advance,
Amy

RED33670:~ hye$ 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  3521  100  3521    0     0  23885      0 --:--:-- --:--:-- --:--:-- 24622
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
curl -O https://afni.nimh.nih.gov/pub/dist/bin/misc/@update.afni.binaries
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 53097  100 53097    0     0   127k      0 --:--:-- --:--:-- --:--:--  128k
tcsh @update.afni.binaries -no_recur -package anyos_text_atlas -bindir /Users/hye/abin
-- running @update.afni.binaries version 3.24, December 7, 2023
-- no current AFNI package found in path...
-- any downloads will be from https://afni.nimh.nih.gov via curl -O -f

-- attempting to install package anyos_text_atlas under
   install dir: /Users/hye/abin...
-- have install dir
++ working in new temp dir, .tmp.install
-- skipping update of @update.afni.binaries
++ downloading test file: curl -O -f anyos_text_atlas/AFNI_version.txt ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    42  100    42    0     0    150      0 --:--:-- --:--:-- --:--:--   152
++ no update needed
/Users/hye/abin/init_user_dotfiles.py -shell_list bash zsh tcsh -do_updates path apsearch -dir_bin /Users/hye/abin
-- 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 4 dot files

source ~/.cshrc
source /Users/hye/.tcshrc
if ( -f /Users/hye/miniconda3/etc/profile.d/conda.csh ) then
source /Users/hye/miniconda3/etc/profile.d/conda.csh
setenv CONDA_EXE /Users/hye/miniconda3/bin/conda
setenv _CONDA_ROOT /Users/hye/miniconda3
setenv _CONDA_EXE /Users/hye/miniconda3/bin/conda
setenv CONDA_PYTHON_EXE /Users/hye/miniconda3/bin/python
if ( ! 1 ) then
if ( /Users/hye/miniconda3/bin/conda ==  ) then
endif
if ( `alias conda` ==  ) then
alias conda
if ( 1 ) then
set _CONDA_PFX=`dirname "${_CONDA_EXE}"`
dirname /Users/hye/miniconda3/bin/conda
set _CONDA_PFX=`dirname "${_CONDA_PFX}"`
dirname /Users/hye/miniconda3/bin
alias conda source /Users/hye/miniconda3/etc/profile.d/conda.csh
unset _CONDA_PFX
else
setenv CONDA_SHLVL 0
if ( ! 0 ) then
set prompt=
endif
else
else
setenv PATH /Users/hye/miniconda3/bin:/Users/hye/miniconda3/condabin:/Users/hye/fsl/share/fsl/bin:/Users/hye/fsl/share/fsl/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/opt/X11/bin:/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:/Users/hye/Applications/SimNIBS-4.1/bin:/Users/hye/abin:/Users/hye/abin
if ( 1 ) then
if (  !=  ) then
endif
setenv R_LIBS /Users/hye/sw/R-4.3.1
setenv R_LIBS /Users/hye/sw/R-4.3.1
setenv R_LIBS /Users/hye/sw/R-4.3.1
setenv R_LIBS /Users/hye/sw/R-4.3.1
setenv R_LIBS /Users/hye/sw/R-4.3.1
if ( arm64 == x86_64 ) then
set package = macos_13_ARM_clang
endif
build_afni.py -build_root /Users/hye/afni_build -package macos_13_ARM_clang
                               
-- current AFNI: AFNI_24.2.01, anyos_text, Jul 16 2024
-- cleaning old build root dir, /Users/hye/afni_build
-- backing up dir build_src
-- preparing build_root dir, /Users/hye/afni_build
-- have default git tag LAST_TAG, will checkout AFNI_24.2.01
-- checking out git tag AFNI_24.2.01
-- using repo branch (detached), tag AFNI_24.2.01
-- removing old atlas dir, prev/afni_atlases_dist
-- moving old atlas dir afni_atlases_dist to prev/afni_atlases_dist
-- downloading AFNI atlas package, afni_atlases_dist.tgz
-- unpacking atlas package, afni_atlases_dist
-- removing old NiiVue backup, prev/niivue_afni.umd.js
-- moving old niivue niivue_afni.umd.js to prev/niivue_afni.umd.js
-- downloading NiiVue, niivue_afni.umd.js

-- preparing to run 'make' build of package macos_13_ARM_clang
-- copying README files
-- copying other_builds/Makefile.macos_13_ARM_clang to Makefile
-- building make target 'itall'

-- consider monitoring the build in a separate window with:
       cd /Users/hye
       tail -f /Users/hye/afni_build/build_src/log_make.txt
       # use ctrl-c to terminate 'tail' command (not the build)
++ building (please be patient)...
** error: failed run_cmd: make AFNI_WHOMADEIT=build itall >& log_make.txt
-- status: building FAILURE
   see 'make' log file /Users/hye/afni_build/build_src/log_make.txt
** error: tail from log_make.txt:
   --------------------------------------------------
   *** GLIB 1.2.8 or better is required. The latest version of GLIB
   *** is always available from ftp://ftp.gtk.org/.
   make[2]: *** No rule to make target `clean'.  Stop.
   make[2]: *** No targets specified and no makefile found.  Stop.
   error: /Library/Developer/CommandLineTools/usr/bin/ranlib: can't open file: src/.libs/libgts.a (No such file or directory)
   cp: src/.libs/libgts.a: No such file or directory
   make[1]: *** [libgts.a] Error 1
   cp: SUMA/libgts.a: No such file or directory
   cp: SUMA/libgts.a: No such file or directory
   make: *** [libgts.a] Error 1
   --------------------------------------------------

** warning: in conda environment
   CONDA_SHLVL = 0, CONDA_DEFAULT_ENV = base

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

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

rehash
setenv R_LIBS /Users/hye/sw/R-4.3.1
echo export R_LIBS=/Users/hye/sw/R-4.3.1
echo export R_LIBS=/Users/hye/sw/R-4.3.1
echo setenv R_LIBS /Users/hye/sw/R-4.3.1
mkdir -p /Users/hye/sw/R-4.3.1
rPkgsInstall -pkgs ALL
tee out.rPkgsInstall.txt

** ERROR: Failed to load R_io.so
1 Like

Hi Amy,

What is the output from:

printenv | grep _PATH

It might be problematic having those conda directories at the start of your PATH.

  • rick

Hi Nick,

Thank you so much for your response. But I didn't get any output after the command.
Should I install conda again?

image

Thanks,
Amy

Hi Amy,

Re-installing conda should not be necessary, but having it active can get in the way of a build.

I am not positive, but how about running the build without any conda at all? Your shell level is 0, so it might not matter, but let's see:

conda deactivate
build_afni.py -build_root /Users/hye/afni_build -package macos_13_ARM_clang

This might require adjusting the dot files so that conda isn't automatically in the way. If this build fails, maybe we can try to have a quick zoom for that.

  • rick
1 Like

To summarize what happened, this was just an environment problem, where .bash_profile was being sourced rather than .bashrc . Moving the variables to .bash_profile (we could have source'd .bashrc, but moved lines instead) allowed build_afni.py to work.

Someone please remind rick to adjust the OS_notes files to be run multiple times more cleanly.

  • rick