I am trying to install afni on a new mac computer (Apple M2 Pro chip, Ventura 13.5.1). I followed the new instructions on the website, but the last step didn't work.
When I ran:
tcsh OS_notes.macos_12_ARM_b_user.tcsh
It didn't go all the way through and I got the following error (I pasting just the part where it got messy, the beginning went fine):
if ( 0 ) then
if ( arm64 == x86_64 ) then
set package = macos_13_ARM_clang
endif
build_afni.py -build_root /Users/mwilf/afni_build -package macos_13_ARM_clang
-- current AFNI: AFNI_23.2.12, anyos_text, Sep 29 2023
-- preparing build_root dir, /Users/mwilf/afni_build
-- creating build_root dir, /Users/mwilf/afni_build
-- running 'git clone' on afni repo ...
(please be patient)
-- have default git tag LAST_TAG, will checkout AFNI_23.2.12
-- checking out git tag AFNI_23.2.12
-- using repo branch (detached), tag AFNI_23.2.12
-- downloading AFNI atlas package, afni_atlases_dist.tgz
-- unpacking atlas package, afni_atlases_dist
-- downloading NiiVue, niivue_afni.umd.js
-- preparing to run 'make' build of package macos_13_ARM_clang
-- copying other_builds/Makefile.macos_13_ARM_clang to Makefile
-- building make target 'itall'
++ building ...
consider monitoring the build in a separate window with:
cd /Users/mwilf
tail -f /Users/mwilf/afni_build/build_src/log_make.txt
# use ctrl-c to terminate 'tail' command (not the build)
** error: failed run_cmd: make AFNI_WHOMADEIT=build itall >& log_make.txt
** error:
-- status: building FAILURE
see 'make' log file /Users/mwilf/afni_build/build_src/log_make.txt
-- shell/system command history is in:
/Users/mwilf/afni_build/hist_commands.txt
++ screen text history is in:
/Users/mwilf/afni_build/hist_messages.txt
rsync -av /Users/mwilf/afni_build/build_src/macos_13_ARM_clang/ /Users/mwilf/abin/
building file list ... rsync: link_stat "/Users/mwilf/afni_build/build_src/macos_13_ARM_clang/." failed: No such file or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/d9889869-120b-11ee-b796-7a03568b17ac/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Please feel free to send me a private message with that log file attached. It would be great to get to the bottom of this, assuming it is the same issue.
Hopefully you can click on my name and it will show a blue "Message" icon. If not, maybe that requires a certain "trust level" on this site, which we should be able to adjust. I will take a peek...
Hi AFNI Gurus,
I am struggling with afni installation on my new Mac Pro M2 Max - Sonoma 14
See error message in response to tcsh OS_notes.macos_12_ARM_b_user.tcsh
--------------------- AFNI and related program tests ---------------------
which afni :
:
AFNI_version.txt : AFNI_23.2.12, anyos_text, Sep 29 2023, local
which python : /usr/local/bin/python
python version : 3.9.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 (/usr/bin/python3)
python2 : 0
python3 : 2
/Library/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 -------------------------------
** failed to load module matplotlib.pyplot
-- matplotlib.pyplot is required
-- python binaries under /usr/local/bin:
/usr/local/bin/python (sym link to /usr/bin/python3)
/usr/local/bin/python3 (sym link to /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12)
-------------------------------- env vars --------------------------------
PATH = /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:/Users/ismaila/abin
PYTHONPATH =
R_LIBS =
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, flatdir, apsearch
-- note: followers should not need edits, so edit flags should be 0
(have 1 follower(s), which can be ignored)
dot file test : want 1 modifications across 2 files:
file path flatdir apsearch follower
--------------- ---- ------- -------- --------
.cshrc 0 1 0 0
.tcshrc 0 0 0 1
------------------------------ 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)
++ 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 'tcsh'...
** env var DYLD_LIBRARY_PATH not set to contain /opt/X11/lib/flat_namespace
========================= summary, please fix: =========================
* 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)
* please run: cp /Users/ismaila/abin/AFNI.afnirc ~/.afnirc
* please run: "suma -update_env" for .sumarc
* please run: apsearch -update_all_afni_help
* dot file test : want 1 modifications across 2 files:
* insufficient data for AFNI bootcamp
(see "Prepare for Bootcamp" on install pages)
* possibly missing atlases
* please set DYLD_LIBRARY_PATH to /opt/X11/lib/flat_namespace in tcsh
Some progress in resolving this... I still have some errors
** 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 dyn.load(ll) :
unable to load shared object '/Users/ismaila/abin/R_io.so':
dlopen(/Users/ismaila/abin/R_io.so, 0x0006): tried: '/Users/ismaila/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/ismaila/abin/R_io.so' (no such file), '/Users/ismaila/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
------------------------ 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/ismaila/abin/R_io.so':
dlopen(/Users/ismaila/abin/R_io.so, 0x0006): tried: '/Users/ismaila/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/ismaila/abin/R_io.so' (no such file), '/Users/ismaila/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 : /Library/Frameworks/R.framework/Resources
------------------------------ python libs -------------------------------
** failed to load module matplotlib.pyplot
-- matplotlib.pyplot is required
-- python binaries under /usr/local/bin:
/usr/local/bin/python (sym link to /usr/bin/python3)
/usr/local/bin/python3 (sym link to /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12)
-------------------------------- env vars --------------------------------
PATH = /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:/Users/ismaila/abin
PYTHONPATH =
R_LIBS =
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) = /opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =
----------------------------- 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, flatdir, apsearch
-- note: followers should not need edits, so edit flags should be 0
(have 1 follower(s), which can be ignored)
dot file test : want 1 modifications across 2 files:
file path flatdir apsearch follower
--------------- ---- ------- -------- --------
.cshrc 0 1 0 0
.tcshrc 0 0 0 1
------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /Users/ismaila/abin
------------------------------ OS specific -------------------------------
XQuartz version : 2.8.5
** no package manager found (okay for bootcamp)
++ 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 'tcsh'...
++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace
========================= summary, please fix: =========================
* AFNI programs show FAILURE
* missing R packages (see rPkgsInstall)
* python library matplotlib is required
(see AFNI install docs for details)
* dot file test : want 1 modifications across 2 files:
* insufficient data for AFNI bootcamp
(see "Prepare for Bootcamp" on install pages)
That suggests that the compiled version of AFNI and the R version are of different architectures (one is Intel, one is ARM). It looks like AFNI might be Intel, but I am not positive from these truncated system_check outputs.
Maybe just rerun the build with the ARM package and see how it goes...
Hi Rick,
Thanks alot for responding. Here is ther output of ARM pkg rerun
-- current AFNI: AFNI_23.2.12, anyos_text, Sep 29 2023
-- cleaning old build root dir, /Users/ismaila/afni_build
-- backing up dir build_src
-- preparing build_root dir, /Users/ismaila/afni_build
-- have default git tag LAST_TAG, will checkout AFNI_23.2.12
-- checking out git tag AFNI_23.2.12
-- using repo branch (detached), tag AFNI_23.2.12
-- will reuse existing atlas directory, 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 other_builds/Makefile.macos_13_ARM_clang to Makefile
-- building make target 'itall'
++ building ...
consider monitoring the build in a separate window with:
cd /Users/ismaila/Documents
tail -f /Users/ismaila/afni_build/build_src/log_make.txt
# use ctrl-c to terminate 'tail' command (not the build)
** error: failed run_cmd: make AFNI_WHOMADEIT=build itall >& log_make.txt
** error:
-- status: building FAILURE
see 'make' log file /Users/ismaila/afni_build/build_src/log_make.txt
-- shell/system command history is in:
/Users/ismaila/afni_build/hist_commands.txt
++ screen text history is in:
/Users/ismaila/afni_build/hist_messages.txt
Thanks for the make output. It looks like openmotif is not installed. You should probably just rerun the final brew install command to make sure it gets everything. It does not hurt to request a package that is already installed. I think the first commands must be done if you were able to get this far.
Thanks alot.
So when i run the first line brew comman not found
when i run this to install brew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" its says illegal variable name
First I use tcsh and I brew started working after using the commands
currently i have these items on my summary
========================= summary, please fix: =========================
* missing R packages (see rPkgsInstall)
* python library matplotlib is required
(see AFNI install docs for details)
* dot file test : want 1 modifications across 2 files:
* insufficient data for AFNI bootcamp
(see "Prepare for Bootcamp" on install pages)
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.