Fixing Afni libraries

Hello everyone -

A few weeks ago, I installed a few modules for Freesurfer, and now all of a sudden all of my afni libraries are messed up. I’m running Mac OS Sierra.

After running afni_system_check, the output is below. Does anyone know how to update these libraries without completely uninstalling and re-installing afni? Some of afni is still intact, but clearly without these functions below, I cannot preprocess.

Thank you in advance!
Steffie

afni version : Precompiled binary macosx_10.7_Intel_64: Jan 3 2017
AFNI_version.txt : AFNI_17.0.00, macosx_10.7_Intel_64, Jan 03 2017
which python : /usr/bin/python
python version : 2.7.10
which R : /usr/local/bin/R
R version : R version 3.3.2 (2016-10-31) – “Sincere Pumpkin Patch”
which tcsh : /bin/tcsh

instances of various programs found in PATH:
afni : 1 (/Users/steffie/abin/afni)
R : 1 (/Library/Frameworks/R.framework/Versions/3.3/Resources/bin/R)
python : 1 (/usr/bin/python)
python2 : 0
python3 : 1 (/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/bin/python3.6)

testing ability to start various programs…
afni : success
suma : FAILURE
dyld: Library not loaded: /sw/lib/libglib-2.0.0.dylib
Referenced from: /Users/steffie/abin/suma
Reason: image not found
3dSkullStrip : FAILURE
dyld: Library not loaded: /sw/lib/libglib-2.0.0.dylib
Referenced from: /Users/steffie/abin/3dSkullStrip
Reason: image not found
uber_subject.py : success
3dAllineate : FAILURE
dyld: Library not loaded: /usr/local/lib/libgomp.1.dylib
Referenced from: /Users/steffie/abin/3dAllineate
Reason: image not found
3dRSFC : success
SurfMesh : FAILURE
dyld: Library not loaded: /sw/lib/libglib-2.0.0.dylib
Referenced from: /Users/steffie/abin/SurfMesh
Reason: image not found

checking for R packages…
rPkgsInstall -pkgs ALL -check : success

checking for $HOME files…
.afnirc : found
.sumarc : found
.afni/help/all_progs.COMP : found

------------------------------ python libs -------------------------------
** python module not found: PyQt4

-------------------------------- env vars --------------------------------
PATH = /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/steffie/abin

PYTHONPATH = /usr/local/lib/python2.7/site-packages

R_LIBS =
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing suma_demo
data dir : missing FATCAT_DEMO
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /Users/steffie/abin

------------------------------ OS specific -------------------------------
which brew : /usr/local/bin/brew
brew version : Homebrew 1.1.7

++ found 1 dylib files under ‘/opt/X11/lib/flat_namespace’
– found ‘libXt’ dylib files, e.g. /opt/X11/lib/flat_namespace/libXt.6.dylib
** env var DYLD_LIBRARY_PATH is not set to contain /opt/X11/lib/flat_namespace
(so afni and suma may fail)

============================ summary comments ============================

  • have python3 but not python2
  • AFNI programs show FAILURE
  • insufficient data for AFNI bootcamp
  • consider running: brew install pyqt
  • consider linking /usr/local/Cellar/gcc/6.3.0_1/lib/gcc/6/libgomp.1.dylib under /usr/local/lib
  • consider linking /usr/local/Cellar/glib/2.50.2/lib/libglib-2.0.dylib under /usr/local/lib
  • cannot tell if DYLD_LIBRARY_PATH includes /opt/X11/lib/flat_namespace

Hi,
Can you post your .bash_profile and/or .bashrc files from your home directory?
And it looks like you use fink and homebrew? Is that correct?
thanks, Justin

Also, to avoid dealing with many of those libraries,
install the macosx_10.7_local package, instead of
the _Intel_64 version:

@update.afni.binaries -package macosx_10.7_local
  • rick

Rick:
Thanks for the fix.

I had been having a similar but more specific problem, where only 3dAllineate would fail when I ran afni_system_check.py -check_all. I would get the following error:

dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address
Referenced from: /usr/local/lib/libgomp.1.dylib
Expected in: /usr/lib/libSystem.B.dylib

I ran @update.afni.binaries -package macosx_10.7_local, as you suggested and it fixed the problem.

My teeth are whiter, I lost 10 pounds…ok maybe not.

Thanks.
Alex

Yes thanks Rick! The @update_binaries code worked like a champ, and now I have “success” everywhere. Let’s hope that translates to science!
cheers,
Steffie

I am using AFNI macosx_10.10_icc under macOS 10.12 with Homebrew.
I can get around with the dylib issues by installing glib via brew as following:
brew install glib

Hi Cecil -

Thanks for your response. I tried your recent suggestion as well re: instally pyqt4 using brew, but I end up with a “Permission Denied” error for each brew install, in which I guess brew can’t write to my usr/local/lib directory. I tried to ‘sudo’ it, but that is no longer supported via homebrew for security reasons. Did you get this error?

Thanks,
Steffie

@blueberriesforsal
I didn’t encounter those permission issues. You may want to run “brew doctor” and contact the author of pyqt4 formula.

Hi-

It might be worth noting that PyQt4 is (presently) just needed for opening the uber_*py GUIs. Odds are, those might not be the most important features in your processing lifestream. Therefore, it might not be a huge deal to ignore PyQt4 stuff at the moment; for setting up FMRI processing, instead of uber_subject.py, it might be easier, more flexible, and faster to take an example from the afni_proc.py help (say, from Examples #9-11), and work from there.

That being said, to get PyQt4, we have suggested the fink route rather than that of Homebrew; see Step #4 here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_mac.html

That being said, if you want your Homebrew to brew more readily, in this case, there are two ways to go: change the permissions in your /usr/local/… path, or make ‘brew’ sudoable. As noted here, the latter is not recommended/supported by Homebrew:
https://github.com/Homebrew/legacy-homebrew/issues/9953#issuecomment-6741795
(part of the larger discussion here: https://github.com/Homebrew/legacy-homebrew/issues/9953)
More about changing permissions of /usr/local are discussed here, in regards to this issue:
http://stackoverflow.com/questions/19039404/error-cowardly-refusing-to-sudo-brew-install-for-installing-glue-0-3-for-mac

–pt