MATLAB Answers

1

Why does Matlab set a custom LD_LIBRARY_PATH when execting "system" on Linux?

Asked by Richard Crozier on 6 Mar 2015
Latest activity Answered by Walter Roberson
on 25 Jul 2016
Why does Matlab set the LD_LIBRARA_PATH environment variable of the shell in which it executes "system" commands on Linux?
I can understand setting this for matlab's own use, but for commands executed on the system, surely you want them to be executed using the system libraries. I only discovered this because I was finding my commands failing with cryptic errors referencing paths in the Matlab installation directory.
Is there any way to control the behviour?

  0 Comments

Sign in to comment.

Tags

Products

2 Answers

Answer by Walter Roberson
on 25 Jul 2016
 Accepted Answer

MATLAB uses system() to invoke its own utilities such as mex(), so it needs to have the right LD_LIBRARY_PATH set up for those, and those utilities need to be accessible to scripts that the user invokes.

  0 Comments

Sign in to comment.