Suma Error

Dear AFNI experts,

I had the following error during SUMA.

Abort

dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address
Referenced from: /Applications/freesurfer/bin/…/lib/gcc/lib/libgomp.1.dylib
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ___emutls_get_address
Referenced from: /Applications/freesurfer/bin/…/lib/gcc/lib/libgomp.1.dylib
Expected in: /usr/lib/libSystem.B.dylib

failure: could not create surface lh.inflated.asc

Could you please let me know what caused this issue and how to resolve?

Thanks,
JW

Hi, JW-

What is the output of the following:


afni_system_check -check_all

? (Please copy+paste.)

–pt

Hi pt,

Below is the result.

-------------------------------- general ---------------------------------

architecture: 64bit
system: Darwin
release: 16.7.0
version: Darwin Kernel Version 16.7.0: Wed Feb 27 00:29:57 PST 2019; root:xnu-3789.73.43~1/RELEASE_X86_64
distribution: 10.12.6 x86_64
number of CPUs: 12
apparent login shell: bash (current shell is csh)
shell RC file: .cshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /Users/titus/abin/afni
afni version : Precompiled binary macosx_10.7_local: Aug 28 2018

                 : AFNI_18.2.15

AFNI_version.txt : AFNI_18.2.15, macosx_10.7_local, Aug 28 2018

which python : /usr/bin/python

python version : 2.7.10

which R : /usr/local/bin/R

R version : R version 3.4.0 (2017-04-21) – “You Stupid Darkness”

which tcsh : /bin/tcsh

instances of various programs found in PATH:

afni    : 1   (/Users/titus/abin/afni)

R       : 1   (/Library/Frameworks/R.framework/Versions/3.4/Resources/bin/R)

python  : 1   (/usr/bin/python)

python2 : 0 

python3 : 1   (/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7)

** have python3 but not python2

testing ability to start various programs…

afni                 : success

suma                 : success

3dSkullStrip         : success

uber_subject.py      : success

3dAllineate          : success

3dRSFC               : success

SurfMesh             : success

3dClustSim           : success

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

++ module ‘PyQt4’ found at /sw/lib/qt4-mac/lib/python2.7/site-packages/PyQt4

++ module loaded: PyQt4

** have PyQt4, but cannot load QtCore, QtGui; error is:


Traceback (most recent call last):

File “”, line 1, in

ImportError: No module named sip


python binaries under /sw/bin:

/sw/bin/python       (sym link to /sw/bin/python2.7)

/sw/bin/python2.7   

-------------------------------- env vars --------------------------------

PATH = /usr/local/fsl/bin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/local/fsl/bin:/Applications/freesurfer/mni/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/titus/abin:/Users/titus/abin

PYTHONPATH = /sw/lib/qt4-mac/lib/python2.7/site-packages

R_LIBS =

LD_LIBRARY_PATH =

DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace

DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =

------------------------------ data checks -------------------------------

data dir : found AFNI_data6 under $HOME/afni_materials

       top history: ... [rickr]: updated FT_white.nii w/out 16 (brain stem)

data dir : found AFNI_demos under $HOME/afni_materials

       top history: ... [pault]: remove rank from FATCAT_DEMO, FAT_MVM_DEMO

data dir : found suma_demo under $HOME/afni_materials

       top history: .../SUMA_data/Build_tmp on Wed Aug 20 10:04:23 EDT 2014

data dir : found afni_handouts under $HOME/afni_materials

atlas : found TT_N27+tlrc under ./

------------------------------ OS specific -------------------------------

which brew : /usr/local/bin/brew

brew version : Homebrew 1.7.3

++ found PyQt4 under /sw/lib/qt4-mac/lib/python2.7/site-packages

– consider installing gcc under homebrew

– consider installing glib under homebrew

++ found 1 dylib files under ‘/opt/X11/lib/flat_namespace’

– found ‘libXt’ dylib files:

  /opt/X11/lib/flat_namespace/libXt.6.dylib

++ yay, env var DYLD_LIBRARY_PATH contains /opt/X11/lib/flat_namespace

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

  • login shell ‘bash’, trusting user to translate from ‘tcsh’

  • shell bash: consider sourcing (non-login) .bashrc from (login) .bash_profile

  • check for partial install of PyQt4

  • consider adding /sw/lib/qt4-mac/lib/python2.7/site-packages to PYTHONPATH

Hi, JW-

OK, that’s as I suspected-- you have a version of AFNI binaries that aren’t updated anymore, and that have other dependencies. Please run the following to update your AFNI binaries to the more modern 10.12_local version (and this will also update your AFNI version to something much more recent):


@update.afni.binaries -defaults -package macos_10.12_local

I think that should sort things out for your system.

–pt

Hi pt,

Thank you so much for the response! Unfortunately, it still has the same error even after update. Could you please let me know if there is another issue here? Below is the result of afni_system_check.py -check_all.

-------------------------------- general ---------------------------------

architecture: 64bit

system: Darwin

release: 16.7.0

version: Darwin Kernel Version 16.7.0: Wed Apr 24 20:50:53 PDT 2019; root:xnu-3789.73.49~1/RELEASE_X86_64

distribution: 10.12.6 x86_64

number of CPUs: 12

apparent login shell: bash

shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------

which afni : /Users/titus/abin/afni

afni version : Precompiled binary macos_10.12_local: May 17 2019

                 : AFNI_19.1.09 'Caligula'

AFNI_version.txt : AFNI_19.1.09, macos_10.12_local, May 17 2019

which python : /usr/bin/python

python version : 2.7.10

which R : /usr/local/bin/R

R version : R version 3.4.0 (2017-04-21) – “You Stupid Darkness”

which tcsh : /bin/tcsh

instances of various programs found in PATH:

afni    : 1   (/Users/titus/abin/afni)

R       : 1   (/Library/Frameworks/R.framework/Versions/3.4/Resources/bin/R)

python  : 1   (/usr/bin/python)

python2 : 0 

python3 : 1   (/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7)

** have python3 but not python2

testing ability to start various programs…

afni                 : success

suma                 : success

3dSkullStrip         : success

uber_subject.py      : success

3dAllineate          : success

3dRSFC               : success

SurfMesh             : success

3dClustSim           : success

checking for R packages…

rPkgsInstall -pkgs ALL -check : FAILURE

    

    oo Warning: 

       These packages are not installed on the computer: corrplot!

checking for $HOME files…

.afnirc                   : found

.sumarc                   : found

.afni/help/all_progs.COMP : found

------------------------------ python libs -------------------------------

** python module not found: PyQt4

– PyQt4 is no longer needed for an AFNI bootcamp

python binaries under /sw/bin:

/sw/bin/python       (sym link to /sw/bin/python2.7)

/sw/bin/python2.7   

-------------------------------- env vars --------------------------------

PATH = /usr/local/fsl/bin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/local/fsl/bin:/Applications/freesurfer/mni/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/titus/abin:/Users/titus/abin

PYTHONPATH =

R_LIBS =

LD_LIBRARY_PATH =

DYLD_LIBRARY_PATH = /Applications/freesurfer/lib/gcc/lib:/opt/X11/lib/flat_namespace

DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =

------------------------------ data checks -------------------------------

data dir : found AFNI_data6 under $HOME/afni_materials

       top history: ... [rickr]: updated FT_white.nii w/out 16 (brain stem)

data dir : found AFNI_demos under $HOME/afni_materials

       top history: ... [pault]: remove rank from FATCAT_DEMO, FAT_MVM_DEMO

data dir : found suma_demo under $HOME/afni_materials

       top history: .../SUMA_data/Build_tmp on Wed Aug 20 10:04:23 EDT 2014

data dir : found afni_handouts under $HOME/afni_materials

atlas : found TT_N27+tlrc under /Users/titus/abin

------------------------------ OS specific -------------------------------

which brew : /usr/local/bin/brew

brew version : Homebrew 1.7.3

++ found PyQt4 under /sw/lib/qt4-mac/lib/python2.7/site-packages

** warning: have fink PyQt4, but non-fink python /usr/bin/python

– consider installing gcc under homebrew

– consider installing glib under homebrew

++ found 1 dylib files under ‘/opt/X11/lib/flat_namespace’

– found ‘libXt’ dylib files:

  /opt/X11/lib/flat_namespace/libXt.6.dylib

++ yay, env var DYLD_LIBRARY_PATH contains /opt/X11/lib/flat_namespace

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

  • login shell ‘bash’, trusting user to translate code examples from ‘tcsh’

  • shell bash: consider sourcing (non-login) .bashrc from (login) .bash_profile

  • missing R packages (see rPkgsInstall)

  • consider adding /sw/lib/qt4-mac/lib/python2.7/site-packages to PYTHONPATH

  • have fink PyQt4, but non-fink python /usr/bin/python

Thanks,
JW

Hi JW,

I am a little confused by 2 aspects of this.

One is that you say suma is failing, yet the system_check output shows success with suma. Perhaps the test is not coming under bash, and so maybe the DYLD_LIBRARY_PATH problem is only causing problems in your login shell.

That brings up the other aspect. It looks like the FreeSurfer setup is breaking AFNI, because DYLD_LIBRARY_PATH points to a FreeSurfer directory, which is failing because of the difference in libSystem.B.dylib. But that begs the question, does FreeSurfer work?

I cannot evaluate some of this without a mac, so it will have to wait for tomorrow. In the meanwhile:

  1. Can you run FreeSurfer programs successfully?
  2. Does “3dAllineate -help” work?
  3. Is it suma that is failing exactly like in your initial post?
    Please repost the command and output, juuuuust to be sure.
  4. If you first start tcsh (just run that command), can you then run suma?

Thanks,

  • rick

Hi Rick,

  1. Can you run FreeSurfer programs successfully?
    Yes, FreeSurfer program runs without any issue.

  2. Does “3dAllineate -help” work?
    Do you mean running 3dAllineate -help on the terminal? If so, yes it works.

  3. Is it suma that is failing exactly like in your initial post?
    Please repost the command and output, juuuuust to be sure.

#!/bin/csh
setenv FREESURFER_HOME /Applications/freesurfer
setenv FSFAST_HOME /Applications/freesurfer/fsfast
setenv FSF_OUTPUT_FORMAT nii
setenv SUBJECTS_DIR /PATH
setenv MNI_DIR /Applications/freesurfer/mni
setenv PATH ${FREESURFER_HOME}/bin:${PATH}

@ linenum = 1
set subjlist = (SUBJECT#)
set condlist = (Condition)

foreach subj ($subjlist)
foreach cond ($condlist)

cd /PATH
@SUMA_Make_Spec_FS -sid “$subj”.“$cond”

end
end

Other analysis trials worked fine with the same script.

  1. If you first start tcsh (just run that command), can you then run suma?

Both bash and tcsh showed the same error.

Thanks,
JW

Hi JW,

If you don’t mind sending me email instead, please run that Make_Spec command as:

@SUMA_Make_Spec_FS -debug 2 -sid "$subj"."$cond"  |& tee out.suma.make.spec.txt

and then mail me the output file, out.suma.make.spec.txt . Would that be okay?

Thanks,

  • rick

Hi Rick,

Will do. Thank you!

JW