FreeSurfer to SUMA conversion error


As I was trying to convert a FreeSurfer processed surface data set into SUMA using the command
$ @SUMA_Make_Spec_FS -fspath surfaces -sid SUMA
I got the following error messages:
[error messages begin]

++ 3drefit processed 1 datasets

  • running ‘mris_convert lh.smoothwm lh.smoothwm.asc’
    [b]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[/b]

failure: could not create surface lh.smoothwm.asc

→ is your FreeSurfer license installed?
program failure: exiting…

This doesn’t seem be to shell dependent. My AFNI version is 16.3.05 (Oct 24, 2016), OS is macOS Sierra (10.12.3), and the FreeSurfer version is 6.0.

Anybody had a similar problem?

Many thanks,

Can you post the results of running the following command on your system? -check_all

Hi Peter -

I have the exact same error happening. I’m running Mac Sierra, and I have updated to all the latest @afni_update_binaries. I’ve run freesurfer recon_all with no issue, but can’t get past this dyld library error at the end of @SUMA_make_spec_FS -sid AmpCon006

I do have my freesurfer license installed in the appropriate directory.

Thanks in advance for your help!

Here is my error language:

writing to /Applications/freesurfer/subjects/AmpCon006/./SUMA/wm.seg.nii...
++ 3drefit: AFNI version=AFNI_17.0.13 (Mar  3 2017) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset ./wm.seg.nii
 + loading and re-writing dataset ./wm.seg.nii (./wm.seg.nii in NIFTI storage)
++ 3drefit processed 1 datasets
-- running 'mris_convert lh.smoothwm lh.smoothwm.asc'
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.smoothwm.asc

--> is your FreeSurfer license installed?
program failure: exiting... -check_all

-------------------------------- general ---------------------------------
architecture:         64bit 
system:               Darwin
release:              16.4.0
version:              Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64
distribution:         10.12.3 x86_64
number of CPUs:       8
apparent login shell: tcsh
shell RC file:        .cshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /Users/steffie/abin/afni
afni version         : Precompiled binary macosx_10.7_local: Mar  3 2017 
                     : AFNI_17.0.13
AFNI_version.txt     : AFNI_17.0.13, macosx_10.7_local, Mar 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)

** have python3 but not python2

testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success      : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : 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 -------------------------------
** python module not found: PyQt4

-------------------------------- env vars --------------------------------
PATH = /Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/Applications/freesurfer/mni/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/steffie/abin

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

DYLD_LIBRARY_PATH (sub-shell) = /opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) = /Users/steffie/abin

------------------------------ 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/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:
-- recent OS X, cannot check DYLD_LIBRARY_PATH in cur shell, cheating ...
++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace

=========================  summary, please fix:  =========================
*  insufficient data for AFNI bootcamp
*  note: pyqt4 is no longer available via brew
*  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


Actually, another user had this problem, and noted that FS has some issues on Mac Sierra (related to ones we had to deal with, as well, I think):
Therefore, it is possible that is the FS command being called by @SUMA_Make_Spec_FS that is having a bad time of it.

Is it possible that, as they suggest here:
… the small FS update might sort things out? (I don’t have a Mac to test this out at the moment…)


Hi Steffie,

It seems freesurfer needs libgomp, but you seem to actually
have it installed. The last lines of
suggest what you could try:

First, watch mris_convert fail on its own (it should show the
help, but will presumably crash with that libgomp error here):


Then try to fix the problem:

sudo ln -s /usr/local/Cellar/gcc/6.3.0_1/lib/gcc/6/libgomp.1.dylib /usr/local/lib/libgomp.1.dylib

Then test that freesurfer program again:


Does that work?

  • rick

Sorry, after reading Paul’s post and looking at yours
again, it is not that you don’t have the library, but that
the one that comes from FreeSurfer does not work on
your system.

Hopefully that FS update that Paul mentioned will work.

If not, it might still be possible to use your homebrew
library, instead.

  • rick

Hi All -

Thanks to everyone who pitched in here. This error is finally fixed. I contacted the freesurfer guys who were very helpful, but ultimately it was a problem in which my SIPS was not disabled (I thought it was).

This was a problem because Freesurfer needed libraries in the usr directory, which is blocked (even for sudo) by SIPS. Even though I had sourced Freesurfer appropriately in the terminal, the source language needs to be in each custom script in order to establish library location accurately.

I hope this helps anyone else having this error!

Hi all,
I’m having the same problem running AFNI_17.2…05 and Linux MInt 17.2 on a 64-bit platform.

Running the @SUMA_Make_Spec_FS program gives me the error
– running 'mris_convert lh.smoothwm lh.smoothwm.asc
Segmentation fault (core dumped)
– Error ConvertSurface (SUMA_ConvertSurface.c:589):
if_name lh.smoothwm.asc not found.
failure: could not create surface lh.smoothwm.gii

→ is your FreeSurfer license installed?
program failure: exiting…

I can see lh.smoothwm in the surf directory, and .license is in $FREESURFER_HOME

Running “ -check_all” gives me:

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

  • login shell ‘bash’, trusting user to translate from ‘tcsh’
  • shell bash: consider sourcing (non-login) .bashrc from (login) .bash_profile
  • have multiple versions of AFNI in PATH
  • insufficient data for AFNI bootcamp

I have also tried to run the command as "tcsh @SUMA_Make_Spec_FS, but with the same results as above.