[MINC-users] minc tools crash in matlab

Vladimir Fonov vladimir.fonov at gmail.com
Wed Feb 24 09:05:36 EST 2010


On Wed, Feb 24, 2010 at 8:46 AM, Pierre Bellec
<pbellec at bic.mni.mcgill.ca> wrote:
> Now if I change the environment variables in the
> matlab call I can force mincinfo to use the right libraries :
>>> system('export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH; mincinfo')
> Usage: mincinfo [<options>] <mincfile> [<mincfile> ...]
>       mincinfo -help
> Replacing all system calls to MINC tool in NIAK by this kind of hack is
> obviously not an option.
You can make niak version of the system call that will manipulate
environment variables in the real system call.

As matlab does reinitialize the environment
> variables at each system call, I don't see how to apply that change once and
> for all to any system call. In other words, the following strategy won't
> work :
>>>  system('export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH;');
>>>  system('mincinfo -help')
> mincinfo: symbol lookup error: mincinfo: undefined symbol: ncopts
> Changing the .bashrc won't work as well (because matlab forces its library
> to be first). The only practical solution I have at this stage is to keep
> using a static compilation of the minc tools. This will work for the time
> being because I have access to the CIVET quarantine but it won't apply to a
> random user. Please let me know if one of you guys can think of a better
> solution for the future.

Better solution would be to build minc tools which are statically
linked to netcdf and HDF5

Best regards,
 Vladimir S. Fonov ~ v.s.fonov <@> ilmarin.info

More information about the MINC-users mailing list