External Email - Use Caution        

Hello hj23,

If you are running the 6.0.0 freesurfer Mac release, then you can try downloading this patch.  You will need to double click on the archive to expand it and then follow the instructions in README.patch.  I think you will also need admin privileges though to make the changes described there.

https://drive.google.com/file/d/1ezjiNIbGNrNAiYD5ciYxMO2SK-R5vz9A/view?usp=sharing

- R.

On Nov 13, 2019, at 03:39, hj23 <hj23@nyu.edu> wrote:

        External Email - Use Caution        


Hello FreeSurfer Developers,

I’m attempting to run FreeSurfer commands via Matlab [system(‘fscmd’)]. Some of the commands work but some don’t, though all the commands work well when run in Terminal.


Commands work in both Terminal and Matlab:

When I run “tksurfer” in Terminal or system(’tksurfer’) in Matlab, I will get the help information for ’tksurfer'.


Commands do not work in Matlab, but work in Terminal:

For example, when I run “mri_info" in terminal, I will get the help information for “mri_info”. However, when I run system(‘mri_info’) in Matlab, I got the following error (screeshot also attached):

===================================================================
dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address
  Referenced from: /Applications/freesurfer_6.0/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_6.0/bin/../lib/gcc/lib/libgomp.1.dylib
  Expected in: /usr/lib/libSystem.B.dylib

mri_info: Aborted

ans =

   134
===================================================================

I randomly tried some FreeSurfer commands and the commands do not work in Matlab (but work in Terminal) are:
‘mri_info’
‘mri_coreg’ 
Commands work in both terminal and Matlab are:
’tksurfer’
‘mri_convert’
‘mri_head’


I did search for the error in FreeSurfer Archive and found the recommendation of disable System Integrity Protection. Before doing that, I wonder if there is any other solution to this.

Also, I tried to run these commands in both FreeSurfer 5.3-HCP and FreeSurfer 6.0 (on the same computer), and interestingly, the commands via Matlab work well in FS 5.3 (except that ‘mri_coreg’ cannot be found in FS 5.3) but the error will show in FS 6.0. 

Additional information:
1) FreeSurfer version: error show for freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c, but not for freesurfer-Darwin-snowleopard-i686-stable-pub-v5.3.0-HCP
2) Platform: macOS Mojave (version 10.14.5) iMac Pro (2017)
3) uname -a 
Darwin ADUAED07785WKMX.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

Please let me know if there is any other information will help.

Thanks in advance,
Haiyang


<Screen Shot 2019-11-13 at 12.15.09 PM.png>

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer