[LINUX] Z3 Library preloading - Avoid using LD_LIBRARY_PATH, use runpath
Current status
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.
Proposed solution
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 3673, created on 2019-03-12, closed on 2019-03-13)
- Relations:
- relates #3674 (closed)