Hi there,

I am trying to build acados on a M2 mac and succeded to do so with the following configuration:

    -G "Unix Makefiles" \
    -B . \
    -S ..

I should also mention that I compiled casadi from source and therefore commented the corresponding line in /acados/interfaces/acados_template/

However, when I try to run acados/examples/acados_python/getting_started/ocp/, I get the following error:

Traceback (most recent call last):
  File "/Users/tudoroancea/acados/examples/acados_python/getting_started/ocp/", line 102, in <module>
    ocp_solver = AcadosOcpSolver(ocp, json_file = 'acados_ocp.json')
  File "/Users/tudoroancea/acados/interfaces/acados_template/acados_template/", line 953, in __init__
    self.__acados_lib = CDLL(libacados_filepath)
  File "/Users/tudoroancea/.pyenv/versions/3.9.13/lib/python3.9/ctypes/", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/tudoroancea/acados/lib/libacados.dylib, 0x0006): Library not loaded: 'libqpOASES_e.3.1.dylib'
  Referenced from: '/Users/tudoroancea/acados/lib/libacados.dylib'
  Reason: tried: 'libqpOASES_e.3.1.dylib' (no such file), '/usr/local/lib/libqpOASES_e.3.1.dylib' (no such file), '/usr/lib/libqpOASES_e.3.1.dylib' (no such file), '/Users/tudoroancea/acados/examples/acados_python/getting_started/ocp/libqpOASES_e.3.1.dylib' (no such file), '/usr/local/lib/libqpOASES_e.3.1.dylib' (no such file), '/usr/lib/libqpOASES_e.3.1.dylib' (no such file)

It is weird because I set ACADOS_SOURCE_DIR to the correct installation dir (in my case /Users/tudoroancea/acados) and also appended /Users/tudoroancea/acados/lib to my LD_LIBRARY_PATH variables, and yet this dir doesn’t seem to be explored.
I also tried to create symlinks for all the dynamic libraries located in this dir in /usr/local/lib but I got the same error message.

Any idea what I missed ? Thank you in advance.



Hi Tudor,

shouldn’t it be DYLD_LIBRARY_PATH on MacOS?

I tried both and I get the same error :frowning_face:

Is it just a qpOASES issue?
Or do you get a similar error if you compile without qpOASES?