Mex on macos crashes

Is anyone having troubles in compiling mex files in R2023a (silicon native)?. I have old mex functions that compile fine in windows. In MacOs Sonoma they compile but then MATLAB crashes at runtime.
I see that the official documentation states that mex compiling is supported for XCode 14.x, but on Sonoma you can't install anything except from 15.x

Answers (1)

Sanchari
Sanchari on 30 Nov 2023

0 votes

Hello Simone,
I understand that you are encountering issues with compiling Mex files in MATLAB R2023a on macOS Sonoma, particularly related to compatibility with Xcode versions and potential runtime crashes.
Please refer the following MathWorks Documentation to verify compatibility: https://www.mathworks.com/help/matlab/ref/mex.html?#btw3m9i-4
And follow this ML Answer Learning to troubleshoot the MATLAB crash associated with MEX function: https://www.mathworks.com/matlabcentral/answers/212716-how-do-i-troubleshoot-a-matlab-crash-associated-with-a-custom-mex-function
Also do refer the following ML Answer Learnings for more knowledge regarding MATLAB crashes on Sonoma:
  1. MATLAB crash on Sonoma 14.0: https://www.mathworks.com/matlabcentral/answers/2027964-matlab-crash-on-sonoma-macos-14-0
  2. MATLAB Crash on Sonoma related to licensing: https://www.mathworks.com/matlabcentral/answers/2044722-why-does-matlab-crash-on-macos-sonoma-when-using-an-individual-or-designated-computer-license
  3. MATLAB Crash related to MEX: https://www.mathworks.com/matlabcentral/answers/474798-matlab-crashes-after-mex-from-cpp
Hope this information is helpful to you!

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Tags

Asked:

on 14 Nov 2023

Commented:

on 30 Nov 2023

Community Treasure Hunt

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

Start Hunting!