BIC-MNI / minc-toolkit-v2

Version 2 of the minc-toolkit, uses tools based on ITK version 4.x
GNU General Public License v3.0
49 stars 21 forks source link

MATLAB breaks minc-toolkit-v2 built with shared libraries when used under system('') calls #160

Open gdevenyi opened 2 years ago

gdevenyi commented 2 years ago

MATLAB's launcher defines a bunch of LD_LIBRARY_PATH, which includes their HDF5 library. They don't mangle symbols like ITK does, so there's a library conflict, and the minc tools all bail out.

The reason for this is we're using RUNPATH during linking, which is lower presidence than RPATH. See: https://medium.com/obscure-system/rpath-vs-runpath-883029b17c45

I've reported this to MATLAB as a bug (they should use RUNPATH/RPATH for their builds, or mangle their symbols).

A static build fixes this.