AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
November 01, 2021 03:57AM
I will revive this thread since I ran into the same (or into a very similiar problem).

My aim: I wanted to use 3dLME for a second-level analysis. AFNIs 3dLME explanation (https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dLME.html) explains that it is required to upgrade R via the following terminal code: "rPkgsInstall -pkgs ALL".

The problem: Using the command above, the terminal gives me the following error message below:

oo Warning:
Failed to load R_io.so with this error message:

Error in dyn.load(ll) :
cannot load shared object '/Users/Philipp/abin/R_io.so':
dlopen(/Users/Philipp/abin/R_io.so, 6): Library not loaded: /sw/Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libR.dylib
Referenced from: /Users/Philipp/abin/R_io.so
Reason: image not found
Ruft auf: source ... withVisible -> eval -> eval -> set_R_io -> dyn.load
Ausführung angehalten

Two things:
1. The file "load R_io.so" really exists in its correct place (/Users/Philipp/abin/).
2. Then I did a quick "afni_system_check.py -check_all" AFNI check. This lead to one problem: "please set DYLD_LIBRARY_PATH to include /opt/X11/lib/flat_namespace"

My computer:
- 2013 Macbook, OS Big Sur 11.6.1
- R Version: R 4.1.1 GUI 1.77 High Sierra build (7985). If you wonder why I use the High Sierra R version on Big Sur: the "R 4.1.1 binary for macOS 11 (Big Sur) and higher, Apple silicon arm64 build" does not work on my intel Macbook (it does not even allow me the installation).
- AFNI and XQuartz are up to date. I even reinstalled AFNI because I thought that may helps me to solve this problem. Interestingly I ran into the same problem while reinstalling AFNI. More precisely, the part where R should be installed (https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_mac.html) and the command "sudo rPkgsInstall -pkgs ALL" has to be copied into the terminal. Here, the terminal also complains about the "R_io.so" file so that it cannot update the R specific packages for AFNI.

My first question would be how I can set the DYLD_LIBRARY_PATH to include /opt/X11/lib/flat_namespace?
And my second question is what I can do to solve the problem with the "R_io.so" file for installing the R updates required to run several AFNI programs such as 3dLME.

Thanks,
Philipp


An update:

I realized that the error message "please set DYLD_LIBRARY_PATH to include /opt/X11/lib/flat_namespace" for "afni_system_check.py -check_all" only occurs because I am running Zsh as a shell instead of either bash or tcsh. Is there a way to adjust AFNIs following script from this source (https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_mac.html#setup-mac-env-variables) to Zsh? I am refering to the following script:

Quote
script: touch ~/.cshrcscript: touch ~/.cshrc
echo 'if ( $?DYLD_LIBRARY_PATH ) then' >> ~/.cshrc
echo ' setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:/opt/X11/lib/flat_namespace' >> ~/.cshrc
echo 'else' >> ~/.cshrc
echo ' setenv DYLD_LIBRARY_PATH /opt/X11/lib/flat_namespace' >> ~/.cshrc
echo 'endif' >> ~/.cshrc

touch ~/.bashrc
echo 'export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/opt/X11/lib/flat_namespace' >> ~/.bashrc
echo 'if ( $?DYLD_LIBRARY_PATH ) then' >> ~/.cshrc
echo ' setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:/opt/X11/lib/flat_namespace' >> ~/.cshrc
echo 'else' >> ~/.cshrc
echo ' setenv DYLD_LIBRARY_PATH /opt/X11/lib/flat_namespace' >> ~/.cshrc
echo 'endif' >> ~/.cshrc

touch ~/.bashrc
echo 'export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/opt/X11/lib/flat_namespace' >> ~/.bashrc


I guess that adjusting and applying this script once to Zsh would solve my first problem?



Edited 6 time(s). Last edit at 11/01/2021 07:48AM by Philipp.
Subject Author Posted

Re: Failed to load R_io.so

Philipp November 01, 2021 03:57AM

Re: Failed to load R_io.so

rick reynolds November 04, 2021 09:24PM

Re: Failed to load R_io.so

Philipp November 05, 2021 06:27AM

Re: Failed to load R_io.so

gang November 05, 2021 11:21AM