Installation on MacOS 12.4 (Intel) fails on step E with "setenv: Too many arguments"

Hi all - I am trying to install AFNI on an iMac running OS 12.4 with an Intel Xeon W processor. I followed the instructions in the documentation here but have run into an error. I have tried this process twice, with a reboot in between attempts.

The issue is occurring on step E:

   make[1]: /usr/local/bin/gcc-13: No such file or directory
   make[1]: *** [niml_b64.o] Error 1
   mv: rename *.o to ../*.o: No such file or directory
   make: *** [niml_b64.o] Error 1
   --------------------------------------------------

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

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

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

rehash
setenv R_LIBS /Users/ryn/sw/R-4.3.1
echo export R_LIBS=/Users/ryn/sw/R-4.3.1
echo export R_LIBS=/Users/ryn/sw/R-4.3.1
echo setenv R_LIBS /Users/ryn/sw/R-4.3.1
mkdir -p /Users/ryn/sw/R-4.3.1
rPkgsInstall -pkgs ALL
tee out.rPkgsInstall.txt
setenv: Too many arguments.

I'm not particularly computer savvy and I'm not sure what gcc-13 nor why this folder or file would not be present in the bin.

Can anyone provide me some guidance as to what might be going on here and how to fix this issue?

Thank you!

I've also included a link to the full output of my most recent AFNI install attempt below.

Google Drive link to full Terminal output of AFNI installation

I imagine this is similar to another issue that has been affecting the Mac ARM systems. Try this:

brew install gcc@13

Then repeat the last installation script :

tcsh OS_notes.macos_12_intel_b_user.tcsh

This worked. Thank you so much!

Hi there,

I have the same issue. But brew install gcc@13 did not help me. It appears to be correctly installed

brew install gcc@13
Warning: gcc@13 13.3.0 is already installed and up-to-date.
To reinstall 13.3.0, run:
brew reinstall gcc@13

But I still get this error when repeating the last installation script:
rehash

setenv R_LIBS /Users/uqhdemp1/sw/R-4.3.1

echo export R_LIBS=/Users/uqhdemp1/sw/R-4.3.1

echo export R_LIBS=/Users/uqhdemp1/sw/R-4.3.1

echo setenv R_LIBS /Users/uqhdemp1/sw/R-4.3.1

mkdir -p /Users/uqhdemp1/sw/R-4.3.1

rPkgsInstall -pkgs ALL

tee out.rPkgsInstall.txt

setenv: Too many arguments.

Do you have any suggestions? Thank you!

Hi @hdempseyjones,

If the rPkgsInstall command is producing that setenv error, then something is messed up with your path. I will try to make that situation more clear (thought I had already).

Would you please post the system check output:

afni_system_check.py -check_all

Thanks,

  • rick

My apologies, I must not have understood. Thank you for your continued help.

Here is the output:
afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture: 64bit
cpu type: i386
system: Darwin
release: 23.4.0
version: Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:31 PST 2024; root:xnu-10063.101.15~2/RELEASE_X86_64
distribution: 14.4
number of CPUs: 6
apparent login shell: bash
shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni :
:
AFNI_version.txt : AFNI_24.1.16, anyos_text, May 30 2024, local
which python : /usr/local/opt/python/libexec/bin/python
python version : 3.12.3
which R : /usr/local/bin/R
R version : R version 4.3.1 (x86_64-apple-darwin20)

instances of various programs found in PATH:
afni : 0
R : 1 (/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/bin/R)
python : 1 (/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/bin/python3.12)
python2 : 0
python3 : 2
/usr/local/Cellar/python@3.12/3.12.3/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
tcsh version : 6.21.00
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 -------------------------------

** failed to load module matplotlib.pyplot
-- matplotlib.pyplot is required

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

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

-- python binaries under /usr/local/bin:
/usr/local/bin/python3 (sym link to /usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/bin/python3.12)
/usr/local/bin/python3.9 (sym link to /usr/local/Cellar/python@3.9/3.9.19/Frameworks/Python.framework/Versions/3.9/bin/python3.9)

-------------------------------- env vars --------------------------------
PATH = /usr/local/bin:/usr/local/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:/usr/local/laps:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/uqhdemp1/abin:/usr/local/opt/python/libexec/bin:/usr/local/opt/python/libexec/bin

PYTHONPATH =
R_LIBS = /Users/uqhdemp1/sw/R-4.3.1
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) = :/opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =
CONDA_SHLVL =
CONDA_DEFAULT_ENV =

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

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

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

--------- 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

which brew : /usr/local/bin/brew
brew version : Homebrew 4.3.3

** bad link /usr/local/lib/libgomp.1.dylib, probably to old version
--> points to missing /usr/local/Cellar/gcc/10.2.0_2/lib/gcc/10/libgomp.1.dylib
--> consider instead: /usr/local/Cellar/gcc/14.1.0/lib/gcc/current/libgomp.1.dylib
for example:
rm -f /usr/local/lib/libgomp.1.dylib
ln -s /usr/local/Cellar/gcc/14.1.0/lib/gcc/current/libgomp.1.dylib /usr/local/lib/libgomp.1.dylib
** consider fixing link /usr/local/lib/libgomp.1.dylib
to point to /usr/local/Cellar/gcc/14.1.0/lib/gcc/current/libgomp.1.dylib
++ found valid link /usr/local/lib/libglib-2.0.dylib
to ../Cellar/glib/2.80.2/lib/libglib-2.0.dylib

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

  • just be aware: login shell 'bash', 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)
  • python library matplotlib is required
    (see AFNI install docs for details)
  • insufficient data for AFNI bootcamp
    (see "Prepare for Bootcamp" on install pages)
  • possibly missing atlases
  • consider fixing link /usr/local/lib/libgomp.1.dylib
    to point to /usr/local/Cellar/gcc/14.1.0/lib/gcc/current/libgomp.1.dylib

It is likely that your local compiling of the AFNI package failed (macs have a lot of peculiarities for building). I will send you a direct message, and you can mail me the $HOME/afni_build/build_src/log_make.txt file.

Thanks,

  • rick