Matlab Compiler - Invalid MEX-file for 'sqp' in optimization toolbox

I am generating standalone application that allows the user to select which method they want the optimization toolbox to use at the command line. if the user selects 'active-set', it works fine. If the user selects 'interior-point', it works fine. If they select 'sqp' I get the following error. (In the .m file this standalone is built on, all three are fine.)
Invalid MEX-file
'/Users/phillicl/.mcrCache7.13/fillin21/toolbox/optim/optim/private/activesetqp.mexmaci64':
dlopen(/Users/phillicl/.mcrCache7.13/fillin21/toolbox/optim/optim/private/activesetqp.mexmaci64,
1): Library not loaded: @loader_path/libmwactiveset.dylib
Referenced from:
/Users/phillicl/.mcrCache7.13/fillin21/toolbox/optim/optim/private/activesetqp.mexmaci64
Reason: image not found.
Can this be addressed?
Thanks

 Respuesta aceptada

Friedrich
Friedrich el 18 de Jun. de 2012
Hi,
@Kaustubha: very unlikely. If the function is missing you would get an unkown function error!!!
Seems more like a missing dependency. Since you are using 10a see this Bug in which you ran into and apply the patch (or upgrade to 10b and newer):

4 comentarios

Ah. Makes sense. :)
I upgraded to Matlab R2011a and still had this issue.
Caused by:
Invalid MEX-file
'/Users/phillicl/.mcrCache7.15/fillin0/toolbox/optim/optim/private/activesetqp.mexmaci64':
dlopen(/Users/phillicl/.mcrCache7.15/fillin0/toolbox/optim/optim/private/activesetqp.mexmaci64,
1): Library not loaded: @rpath/libmwoptimutil.dylib
Referenced from:
/Users/phillicl/.mcrCache7.15/fillin0/toolbox/optim/optim/private/activesetqp.mexmaci64
Reason: image not found
So I basically kept copying files just like the bug report suggested until the issue went away
I copied
libmwoptimutil.dylib
libmwbarrierqplp.dylib
and then it worked.
This will be a little annoying for deployment...
FYI, I was working with matlab 2011b in a linux environment and it did not have this issue.

Iniciar sesión para comentar.

Más respuestas (1)

Kaustubha Govind
Kaustubha Govind el 18 de Jun. de 2012
Seems like a case of MATLAB Compiler not adding the function 'activesetqp' to the compiled archive. Perhaps you can try using the %#function pragma (%#function activesetqp) in the function being compiled? Not sure if this works for private functions (activesetqp is private), but its worth a shot.
(Also, as a side experiment, I wonder what happens if you try to deploy a function that uses 'sqp' directly, ie. without the user making a choice)

Categorías

Más información sobre MATLAB Compiler en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 15 de Jun. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by