3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-02 18:08:57 +00:00
z3/scripts/tests
Lev Nachmanson d3f5fd6825 Fix Java UnsatisfiedLinkError on macOS (#7640)
On macOS, libz3java.dylib was built without an rpath to find
libz3.dylib in the same directory. When Java loaded the JNI library,
the dynamic linker could not resolve the libz3 dependency, causing
UnsatisfiedLinkError.

Three fixes:
- mk_util.py: add -Wl,-rpath,@loader_path to the macOS JNI link command
- CMakeLists.txt: set MACOSX_RPATH, BUILD_RPATH, INSTALL_RPATH for
  z3java target; remove duplicate headerpad block
- update_api.py: improve Native.java error message to show the root
  cause from both load attempts instead of only the fallback error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-17 13:59:37 -10:00
..
test_jni_arch_flags.py Fix Java UnsatisfiedLinkError on macOS (#7640) 2026-03-17 13:59:37 -10:00