MATLAB: How to install SeDuMi 1.3 on MATLAB R2014a, and MAC OS X 10.9.5

mac os x 10.9.5matlab r2014asedumi 1.3xcode version 6.0.1yalmip r20140915

Hello,
I am trying to install SeDuMi 1.3 to use as a solver with YALMIP R20140915. I have MATLAB R2014a on my MAC OS X 10.9.5 operating system. Also I have Xcode Version 6.0.1 on my system.
I get the following error message when I try to install SeDuMi:
>> install_sedumi
Building SeDuMi binaries...
mex -O -DUNIX -largeArrayDims bwblkslv.c sdmauxFill.c sdmauxRdot.c "-lmwlapack"
Building with 'Xcode with Clang'.
Error using mex
Undefined symbols for architecture x86_64:
"_ddot_", referenced from:
_realdot in sdmauxRdot.o
_realssqr in sdmauxRdot.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in install_sedumi (line 113)
eval( temp );
I appreciate your help.
Hessam.

Best Answer

Hessam - I downloaded the SeDuMi 1.3 source code, ran the install_sedumi, as you did, and observed the same error. This was for R2014a, OS X 10.8.5.
If you look at the blas.h file (on my Mac in /Applications/MATLAB_R2014a.app/extern/include), there is the function ddot, so you may want to try compiling the SeDuMi libraries with the blas library as well. In the install_sedumi.m file, I changed the line (111) from
temp = [ 'mex ', flags, ' ', targets64{i}, ' "', libs ,'"'];
to
temp = [ 'mex ', flags, ' ', targets64{i}, ' "', libs ,'"', ' -lmwblas'];
It seems that the install code adds either the library -lmwblas or -lmwlapack, but not both. Re-running the install, with the above change, allowed the MEX files to be build successfully. In fact, executing the code with only the BLAS library was successful too.
Related Question