[MacOS - investigate Z3 library loading by rpath
In order to load the shared libs in the z3 plugin, Linux and MacOS must be aware of the path of these libraries. Hence, on Linux, we set the LD_LIBRARY_PATH, and copy the Libs to the executable folder for MacOS builds. This is, however, not the advised resolution for this problem. Second, setting LD_LIBRARY_PATH for Junit test would require a large hack.
When updating the Z3 libraries (of course, also applies to the current version), the RPATH property of the problematic library shall be set to “$ORIGIN” such that required libraries are also loaded from the path where the dependent library (libz3java) resides.
Once this issue is resolved, we can also create an issue in the Z3 github repo.
(from redmine: issue id 3674, created on 2019-03-12)