-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MATLAB changes $LD_LIBRARY_PATH
, breaks Qt apps
#2965
Comments
I've seen other cases where the libraries shipped by MATLAB cause trouble (for DecOT, which depends on MATLAB-Engine), so reconsidering the |
Are we willing to run |
I don't think that would help here, since the problem isn't so much with Simply adding the path to those libraries to |
$LD_LIBRARY_PATH
, breaks Qt apps
i fully agree with this. users should indeed just use the generated shell script to run the compiled executables, which correctly sets the ./run_testmatlab.sh $EBROOTMATLAB &> testmatlab.out |
I've been debugging an issue with an app that depends on the Qt5 module. The app won't start because it can't find Qt's platform plugins:
I wrote a minimal Qt app to find the cause of this and it turns out to be MATLAB. More specifically, the fact that the MATLAB module prepends
LD_LIBRARY_PATH
with$EBROOTMATLAB/bin/glnxa64
, a directory that contains tons of bundled MATLAB libraries, including their own versions of essential Qt5 libraries and many other unrelated libs which could potentially interfere with other modules too.This change was introduced in #2008, presumably to make it easier for MCR compiled apps to load. For MATLAB itself this does not seem to be necessary because the
matlab
startup script setsLD_LIBRARY_PATH
and other required environment variables on invocation.The MATLAB docs cautions (bottom of the page) against setting LD_LIBRARY_PATH permanently on Linux due to this interference risk with other software. They suggest to "run MATLAB Compiler applications using the generated shell script" instead.
I would propose to revert #2008 but would obviously like to hear @smoors and maybe other's opinion on this first.
The text was updated successfully, but these errors were encountered: