openpilot
openpilot copied to clipboard
MacOS: rpath and library issues
When trying to run python services all kinds of library path issues pop up.
- All paths seem to be relative against the basedir. Running something from within a folder doesn't work, and you get errors like:
ImportError: dlopen(/Users/willem/openpilot/opendbc/can/parser_pyx.so, 0x0002): Library not loaded: opendbc/can/libdbc.dylib
Referenced from: /Users/willem/openpilot/opendbc/can/parser_pyx.so
Reason: tried: 'opendbc/can/libdbc.dylib' (no such file), '/usr/local/lib/libdbc.dylib' (no such file), '/usr/lib/libdbc.dylib' (no such file)
- Can't load acados
ImportError: dlopen(/Users/willem/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_ocp_solver_pyx.so, 0x0002): Library not loaded: @rpath/libacados.dylib
Referenced from: /Users/willem/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/libacados_ocp_solver_long.dylib
Reason: tried: '/usr/local/lib/libacados.dylib' (no such file), '/usr/lib/libacados.dylib' (no such file)
Any update on the issue? I am seeing the same errors while running the tests on macOS Monterey 12.2.1. @pd0wm do you have any workarounds to resolve this issue?
Same after submitting the build fixes
Reason: tried: 'opendbc/can/libdbc.dylib' (no such file), '/usr/local/lib/libdbc.dylib' (no such file), '/usr/lib/libdbc.dylib' (no such file)```
As a workaround: things work if you run them from the openpilot root folder. E.g. selfdrive/test/process_replay/test_processes.py --whitelist_procs controlsd