External Email - Use Caution        

Hello Caspar,

So are you saying that if you run directly from the terminal in bash (or maybe in csh with % sign as prompt)

$ mri_convert -i inputvolume.mgz --out_orientation LPS -iis .5 -ijs .5 -iks .5 -vs 1.2 1.2 1.2

- that the command works, but it does not work when run from within a csh script ?

If you are getting different results from running commands in the terminal environment/shell compared to when the same command runs in a script, there must be something different between the terminal and the script shell environment, e.g. LD_LIBRARY_PATRH, PATH, or something getting set differently.

I would try and reproduce the shell environment variable settings that work from the terminal in the csh script.

You could try explicitly running the csh script with -xf as arguments (prints out what is getting executed and bypasses any startup settings) to see if it works differently.   You can replace foo.csh with your script name below.

$ csh -xf  foo.csh

Another useful thing to do is to look at all the environment variables getting set in the terminal window where the command works, via

$ env | sort

- and compare that with what you see the csh script sets in the output of “csh -xf foo.csh”.  You can put an “env | sort” command in the csh script just before the mri_convert command runs to see the environment (and then compare it to the output of :”env | sort” in the terminal window where the command works). 

- R.


        External Email - Use Caution

Hi!
Unfortunately, it turns out that downgrading glibc does not solve this 
issue, neither with .14 nor with .15 versions.

Doug, we are calling mri_convert from a csh script, with the following 
options:
mri_convert -i inputvolume.mgz \
-o outputvolume.nii.gz \
--out_orientation LPS \
-iis .5 -ijs .5 -iks .5 \
-vs 1.2 1.2 1.2

We then simply get segmentation fault (core dumped).
It seems to work when we run the same command directly in the terminal.
Caspar


Am Do., 16. Mai 2019 um 23:10 Uhr schrieb Greve, Douglas N.,Ph.D. 
<DGREVE@mgh.harvard.edu <mailto:DGREVE@mgh.harvard.edu>>:

   Can you send the command line and full terminal output?

   On 5/16/19 5:17 AM, Caspar M. Schwiedrzik wrote:

        External Email - Use Caution

Hi!
We are getting segmentation fault (core dumped) error when trying to
run mri_convert on NIFTI files. This is running Freesurfer v5.3 on
Centos6, specifically v1.179.2..7 of mri_convert.

I suspect that this has to do with libcrypt incompatibilities
described for other operating systems , e.g., here:

   https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.edu_pipermail__freesurfer_2014-2DSeptember_040528.html&d=DwIGaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=sgvCAzCi3iTXkTNRRVMpDnC6tu0lnijYpKXIX_UNme8&m=NBmjYrhl1nTR7-ra_mfc3mtbFAElda33iU_qYFc-17s&s=hvSTVmJcAZKj26WCCcgZbqDQcLE9GL1yLaGOXIcGBEY&e=


and in the known issues list of v5.3. here

   https://urldefense.proofpoint.com/v2/url?u=https-3A__surfer.nmr.mgh.harvard.edu_fswiki_PreviousReleaseNotes&d=DwIGaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=sgvCAzCi3iTXkTNRRVMpDnC6tu0lnijYpKXIX_UNme8&m=NBmjYrhl1nTR7-ra_mfc3mtbFAElda33iU_qYFc-17s&s=PUDfyokNDX6MKj07m6SVKp-n_mHLc-wsBpe1nedrdD8&e=.

We have libcrypt version 2.17 installed and do not have access to
libcrypt-2.14.1.so <http://libcrypt-2.14.1.so>
   <https://urldefense.proofpoint.com/v2/url?u=http-3A__libcrypt-2D2.14.1.so&d=DwIGaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=sgvCAzCi3iTXkTNRRVMpDnC6tu0lnijYpKXIX_UNme8&m=NBmjYrhl1nTR7-ra_mfc3mtbFAElda33iU_qYFc-17s&s=oWqfVu5YGSWScZMw3Ypfdy53osHoNywLPtAffB75oR8&e=>.
Is there a way to get libcrypt-2.14.1.so
   <http://libcrypt-2.14.1.so>
   <https://urldefense.proofpoint.com/v2/url?u=http-3A__libcrypt-2D2.14.1.so&d=DwIGaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=sgvCAzCi3iTXkTNRRVMpDnC6tu0lnijYpKXIX_UNme8&m=NBmjYrhl1nTR7-ra_mfc3mtbFAElda33iU_qYFc-17s&s=oWqfVu5YGSWScZMw3Ypfdy53osHoNywLPtAffB75oR8&e=>

from you or is there another known workaround (other then
   updating to
Freesurfer 6)?

Thank you very much! Caspar


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
   <mailto:Freesurfer@nmr.mgh.harvard.edu>

   https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.edu_mailman_listinfo_freesurfer&d=DwIGaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=sgvCAzCi3iTXkTNRRVMpDnC6tu0lnijYpKXIX_UNme8&m=NBmjYrhl1nTR7-ra_mfc3mtbFAElda33iU_qYFc-17s&s=HKE_BsPSCQQGF6or1qTbQw7OmHSzKd1zDxWDvkVFR6k&e=


   _______________________________________________
   Freesurfer mailing list
   Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu>
   https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.edu_mailman_listinfo_freesurfer&d=DwIGaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=sgvCAzCi3iTXkTNRRVMpDnC6tu0lnijYpKXIX_UNme8&m=NBmjYrhl1nTR7-ra_mfc3mtbFAElda33iU_qYFc-17s&s=HKE_BsPSCQQGF6or1qTbQw7OmHSzKd1zDxWDvkVFR6k&e=

<Attached Message Part.txt>