Hi,
I am trying to run the minimal_example_ocp.m in Matlab on Mac OS. I’ve sourced the env.sh and then launched Matlab from the same shell. It compiles the MEX file but then I get the following error:
Error using acados_ocp (line 192)
Exception:
MATLAB:mex:ErrInvalidMEXFile
Invalid MEX-file '/usr/local/lib/ocp_create.mexmaci64': dlopen(/usr/local/lib/ocp_create.mexmaci64, 6): Library not loaded: @rpath/libacados.dylib
Referenced from: /usr/local/lib/ocp_create.mexmaci64
Reason: image not found
Error in minimal_example_ocp (line 107)
ocp = acados_ocp(ocp_model, ocp_opts);
I haven’t found any related forum entry, and all the people I’ve asked told me they only used ACACOS on Linux and not Mac so far.
Is this supposed to work or am I missing something?
It looks like it just does not see the path, so it might be relatively easy to fix maybe, and I just do not have the experience.
Thanks in advance,
Johannes
EDIT:
otool -L /usr/local/lib/ocp_create.mexmaci64 gives:
/usr/local/lib/ocp_create.mexmaci64:
@rpath/libacados.dylib (compatibility version 0.0.0, current version 0.0.0)
libhpipm.dylib (compatibility version 0.0.0, current version 0.0.0)
libblasfeo.dylib (compatibility version 0.0.0, current version 0.0.0)
libqpOASES_e.3.1.dylib (compatibility version 3.1.0, current version 0.0.0)
@rpath/libmx.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libmex.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 904.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
EDIT2:
If I copy the required dynamic libraries from ACADOS_INSTALL_DIR/lib (1) to /usr/local/lib (2), it works. Both paths, (1, 2), are on the Matlab path. However, it only sees the one in (2).