Hi everyone,
I’m hoping someone can help me with a COBRA Toolbox installation issue after updating my Mac and MATLAB.
I previously had COBRA Toolbox working successfully with MATLAB 2024. After updating macOS and installing MATLAB R2026a, I tried to set everything up again. The COBRA Toolbox itself initializes successfully with:
initCobraToolbox(false)However, when I try:
changeCobraSolver('glpk','LP')I get:
Undefined function 'glpkcc' for input arguments of type 'struct'. Error in glpk [xopt, fmin, status, extra] = glpkcc(...)I am using an Apple Silicon Mac. MATLAB R2026a reports:
computer ans = 'MACA64'My COBRA Toolbox binary folder contains:
binary/ all glnxa64 maci64 win32 win64but there is no maca64 folder. The available GLPK binary is:
binary/maci64/bin/glpkcc.mexmaci64which I assume cannot be loaded by native Apple Silicon MATLAB.
As a test, I opened my older MATLAB 2024 Intel installation (which reports MACI64) and COBRA works correctly there:
initCobraToolbox(false) changeCobraSolver('glpk','LP')So it appears to be an Apple Silicon compatibility issue rather than a COBRA installation problem.
Could someone advise on the recommended solution for using COBRA Toolbox with native Apple Silicon MATLAB? Is there a newer COBRA version/branch with an maca64 GLPK binary, or is there a recommended way to build the required MEX file for Apple Silicon?
I would appreciate any guidance.
Thanks!
Bethany