Azzera filtri
Azzera filtri

dyld: Library not loaded in automatically generated shell script.

6 visualizzazioni (ultimi 30 giorni)
My problem is the "dyld: Library not loaded:" error that has been discussed several times in this forum. However the proposed solutions do not work for me. I wonder if its because MacOS has changed. The shell file seems to get the path right, and the file libmwlaunchermain.dylib is present in the target folder (/Applications/MATLAB/MATLAB_Runtime/v98/bin/maci64). So this does not seem to be the previously disccused error of not getting the path to the MCR correct. I also tried without the MCR, just using the installed Matlab (export MCR_ROOT=/Applications/MATLAB_R2020a.app) but this gave the same result.
In terminal, I run ./run_MainCalib.sh $MCR_ROOT SolverInputs.mat
This generates
Setting up environment variables
---
MCRROOT is /Applications/MATLAB/MATLAB_Runtime/v98
DYLD_LIBRARY_PATH is ./Applications/MATLAB/MATLAB_Runtime/v98/runtime/maci64:/Applications/MATLAB/MATLAB_Runtime/v98/bin/maci64:/Applications/MATLAB/MATLAB_Runtime/v98/sys/os/maci64
dyld: Library not loaded: @rpath/libmwmclmcrrt.9.8.dylib
Referenced from: /Applications/MATLAB/MATLAB_Runtime/v98/bin/maci64/libmwlaunchermain.dylib
Reason: image not found
./run_MainCalib.sh: line 30: 88488 Abort trap: 6 "./MainCalib.app/Contents/MacOS/MainCalib" "SolverInputs.mat"
I read https://www.mathworks.com/matlabcentral/answers/473971-how-do-i-configure-the-ld_library_path-on-linux-and-dyld_library_path-on-mac-os-x-to-point-to-mcr, which seems to suggest the problem is that MacOS has changed the way environment variables propagate within nested shells, but the solution proposed there does not apply directly to running a standalone from a shell file, as the shell script creates the DYLD_LIBRARY_PATH and the shell script is automatically generated by matlab.

Risposte (0)

Categorie

Scopri di più su File Operations in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by