MATLAB window not available

Hi Chris,

I’m setting up another new Mac and am running into this issue where the Matlab window is not an option in the drop-down menu. However, it seems to be a different problem than before. I’m using the “open” script you provided last time, and have also tried just opening it directly.

Matlab is pointing correctly:

hullglick@NB-W4LYX1K2 /Applications % ls -ld MATLAB*
lrwxr-xr-x 1 root admin 16 Jan 29 13:37 MATLAB → MATLAB_2022b.app
drwxr-xr-x@ 28 hullglick admin 896 Jan 29 13:29 MATLAB_R2022b.app

But both of the commands (-arm64 and -x86_64) produce an error message saying that the bundle couldn’t be loaded (previously -arm64 did, but -x86_64 didn’t):

hullglick@NB-W4LYX1K2 ~ % arch -arm64 /Applications/MWClient.app/Contents/MacOS/MWClient

2024-01-29 13:49:39.390 MWClient[2659:20875] log file path: /Users/hullglick/Library/Logs/MWorks/20240129_134939390.log
2024-01-29 13:49:39.438 MWClient[2659:20875] Couldn’t load bundle: The bundle “MWorksMATLABWindow” couldn’t be loaded because it doesn’t contain a version for the current architecture.: {
NSBundlePath = “/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle”;
NSDebugDescription = “dlopen_preflight(/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow) => false, tried: ‘/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow’ (mach-o file, but is an incompatible architecture (have ‘x86_64’, need ‘arm64’)), ‘/System/Volumes/Preboot/Cryptexes/OS/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow’ (no such file), ‘/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow’ (mach-o file, but is an incompatible architecture (have ‘x86_64’, need ‘arm64’))”;
NSFilePath = “/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow”;
NSLocalizedDescription = “The bundle \U201cMWorksMATLABWindow\U201d couldn\U2019t be loaded because it doesn\U2019t contain a version for the current architecture.”;
NSLocalizedFailureReason = “The bundle doesn\U2019t contain a version for the current architecture.”;
NSLocalizedRecoverySuggestion = “Try installing a universal version of the bundle.”;

hullglick@NB-W4LYX1K2 ~ % arch -x86_64 /Applications/MWClient.app/Contents/MacOS/MWClient

2024-01-29 13:45:13.458 MWClient[2406:17223] log file path: /Users/hullglick/Library/Logs/MWorks/20240129_134513458.log
2024-01-29 13:45:13.537 MWClient[2406:17223] Couldn’t load bundle: The bundle “MWorksMATLABWindow” couldn’t be loaded.: {
NSBundlePath = “/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle”;
NSDebugDescription = “dlopen(/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow, 0x0109): Library not loaded: @rpath/libeng.dylib\n Referenced from: <053065B5-80BF-318E-BA79-862C8C22053D> /Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow\n Reason: tried: ‘/Applications/MATLAB/bin/maci64/libeng.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Applications/MATLAB/bin/maci64/libeng.dylib’ (no such file), ‘/Applications/MATLAB/bin/maci64/libeng.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Applications/MATLAB/bin/maci64/libeng.dylib’ (no such file), ‘/usr/local/lib/libeng.dylib’ (no such file), ‘/usr/lib/libeng.dylib’ (no such file, not in dyld cache)”;
NSFilePath = “/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow”;
NSLocalizedDescription = “The bundle \U201cMWorksMATLABWindow\U201d couldn\U2019t be loaded.”;
NSLocalizedFailureReason = “The bundle couldn\U2019t be loaded.”;
NSLocalizedRecoverySuggestion = “Try reinstalling the bundle.”;

Does this mean that I need to reinstall MWorks?

Lindsey.

Hi Lindsey,

Am I correct that you’re trying to use MWorks 0.12.2 or earlier? If so, then you need to either

  1. install an Intel version of MATLAB and configure MWClient to launch using Rosetta, or
  2. install the MWorks nightly build.

In MWorks 0.12.2, the MATLAB window is still Intel-only. At present, only the nightly build has a MATLAB window that supports both Apple Silicon and Intel.

Cheers,
Chris

Hi Chris,
I have installed the Intel version of MATLAB (2022b) and configured MWClient to launch using Rosetta.
I was using 0.12, but just tried updating to 0.12.2 and am still getting the same bundle error when I try to launch with “arch -x86_64” in Terminal.
Lindsey.

I went ahead and installed the Nightly, pointed to Matlab2023b, and configured so it doesn’t launch Rosetta, and now it seems to work…
Lindsey.

Hi Lindsey,

I have installed the Intel version of MATLAB (2022b) and configured MWClient to launch using Rosetta.

Sorry, I missed that in your initial email. And now I see the problem:

hullglick@NB-W4LYX1K2 /Applications % ls -ld MATLAB*
lrwxr-xr-x 1 root admin 16 Jan 29 13:37 MATLAB → MATLAB_2022b.app
drwxr-xr-x@ 28 hullglick admin 896 Jan 29 13:29 MATLAB_R2022b.app

Your symbolic link points to “MATLAB_2022b.app”, but the app folder is called “MATLAB_R2022b.app” – that is, the link is missing the “R”. Removing and recreating it with the correct name should solve the problem.

Cheers,
Chris

Ah- oops. It’s always something…
Thanks,

Lindsey.