8000 ocaml version mismath causing a compilation failure in Nixpkgs · Issue #7675 · Z3Prover/z3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ocaml version mismath causing a compilation failure in Nixpkgs #7675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ethancedwards8 opened this issue Jun 9, 2025 · 2 comments
Closed

Comments

@ethancedwards8
Copy link

Hello z3 developers,

I am working on re-packaging the z3 ocaml bindings to nixpkgs (the current way it is packaged does not work). However, I am facing one issue. When compiling, I am getting an ocaml version mismath error that haults the compilation process.

...
src/smt/theory_recfun.cpp
src/smt/seq_regex.cpp
src/smt/theory_special_relations.cpp
src/smt/seq_eq_solver.cpp
src/smt/theory_str_regex.cpp
src/smt/smt_setup.cpp
src/smt/smt_parallel.cpp
src/smt/theory_dense_diff_logic.cpp
cp ../src/api/ml/z3.mli api/ml/z3.mli
ocamlfind ocamlc -package zarith  -I api/ml -o api/ml/z3.cmi -c api/ml/z3.mli
File "api/ml/z3.mli", line 1:
Error: /nix/store/jgyri607ly9xxspscz3i7h8834hj0ymc-ocaml5.1.1-zarith-1.14/lib/ocaml/5.1.1/site-lib/zarith/z.cmi
       is not a compiled interface for this version of OCaml.
It seems to be for an older version of OCaml.
make: *** [Makefile:5416: api/ml/z3.cmo] Error 2

I am trying to compile the library with ocaml version 5.1.1.

This was after running

python3 ./scripts/mk_make.py --prefix=$out --ml
cd build
make -j 12

Any ideas?

@ethancedwards8
Copy link
Author

Upon further debugging, it looks like this issue is stemming from my impure build environment. Purifying it seems to have mostly fixed the issue and I will close when I confirm later tonight.

@wintersteiger
Copy link
Contributor

Yes, that looks like the compiler version changed at some point, so I'd assume that's a setup/environment problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0