From 894c0e9fbef5d17426a3217992a489b90dc3c8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Shiwei=20Weng=20=E7=BF=81=E5=A3=AB=E4=BC=9F?= Date: Sun, 24 Aug 2025 22:49:04 -0500 Subject: [PATCH] Bugfix: post-build sanity check when an old version of ocaml-z3 is installed (#7815) * fix: add generating META for ocamlfind. * Patch macos. We need to keep the `@rpath` and use environment var to enable the test because we need to leave it to be fixed by package managers. * Trigger CI. * Debug. * Debug. * Debug. * Debug. * Debug. * Debug. * Hacky fix for ocaml building warning. * Fix typo and rename variables. * Fix cmake for ocaml test, using local libz3 explicit. --- src/api/ml/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/ml/CMakeLists.txt b/src/api/ml/CMakeLists.txt index d4e781e6e..c7de53faa 100644 --- a/src/api/ml/CMakeLists.txt +++ b/src/api/ml/CMakeLists.txt @@ -255,6 +255,7 @@ set(z3ml_example_src ${PROJECT_SOURCE_DIR}/examples/ml/ml_example.ml) add_custom_command( TARGET build_z3_ocaml_bindings POST_BUILD COMMAND "${OCAMLFIND}" ocamlc + -cclib "${libz3_path}/libz3${so_ext}" -o "${z3ml_bin}/ml_example.byte" -package zarith -linkpkg @@ -270,6 +271,7 @@ add_custom_command( add_custom_command( TARGET build_z3_ocaml_bindings POST_BUILD COMMAND "${OCAMLFIND}" ocamlopt + -cclib "${libz3_path}/libz3${so_ext}" -o "${z3ml_bin}/ml_example" -package zarith -linkpkg