Closed anmaped closed 7 years ago
No idea about cygwin. The whole cygwin based OCaml toolchain is bitrotten, because it's not widely used.
But the mingw toolchains works for me:
eval $(ocaml-env cygwin)
CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar python scripts/mk_make.py --ml --prefix=$(cygpath -m /usr/x86_64-w64-mingw32/sys-root/mingw)
cd build
make -j8
make install
mv /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libz3.dll /usr/x86_64-w64-mingw32/sys-root/mingw/bin # installed to the wrong location
install -m 0644 libz3.dll.a /usr/x86_64-w64-mingw32/sys-root/mingw/lib # not installed at all !
cd ../examples/ml
ocamlfind ocamlopt -o ml_example.exe -package Z3 -linkpkg ml_example.ml
./ml_example.exe
# long output, but at the end:
# Test passed.
# Disposing...
# Exiting.
The install instructions are incomplete and wrong, but the OCaml related parts seem to work as expected
I've also tried to fix the installer. The call to cygwin's mkpasswd
is now avoided whenever possible and if not, /etc/passwd
is configured only for the current user. So it hopefully won't download all users account data and it won't trigger the mentioned bug.
But because cygwin is a rolling release and there are zillions of different Windows version and installation options, it might still not work or stop working again in the future. Users with special environments can still follow the manual installation instructions.
@fdopen It's it 👍 Done. We need to use mingw instead of cygwin.
Regarding the installer bug, thank you very much.
I want to describe here a weird issue that I have when compiling z3 bindings for ocaml 4.03.0 using both 64bit and 32bit version of cygwin.
The issue was started here https://github.com/Z3Prover/z3/issues/1230.