Closed SMTStuck closed 7 years ago
@SMTStuck Imaginative username ;)
I'm not sure where the Prover
or Code
came from.
If you want to you can try to workaround this by trying Z3's CMake based build system. The ".NET" bindings should build on Windows.
Here are the steps to the build
Install CMake if you don't already have it.
Install Ninja if you don't have already have it. Although you can use nmake
if you really want to (CMake supports it). Ninja is much much better because it runs in parallel giving very fast build times.
In your Z3 git repository run the following
git clean -fxd
This removes unwanted files left behind by the other build system.
Now copy the CMake files into the correct place in the git repository
python contrib/cmake/bootstrap.py create
mkdir build
vcvarsall.bar x64
command in your console.cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_DOTNET_BINDINGS=ON ..\
Note if you didn't put your build
directory in the git repository replace ..\
with the full path to the Z3 git repository on your system. If your're curious about the available configuration options read the README-CMake.md
file in the Z3 repository.
ninja
in your build directory.
Hope that helps.
Re: username, yeah I'm rather talented like that! :smile:
Thank you very much for the detailed reply. I have tried building to a path with no spaces and it works fine, yet even so the build process finishes with:
Microsoft (R) Visual C# Compiler version 1.2.0.60317 Copyright (C) Microsoft Corporation. All rights reserved.
Z3 was successfully built. "Z3Py scripts can already be executed in the 'build\python' directory." "Z3Py scripts stored in arbitrary directories can be executed if the 'build\python' directory is added to the PYTHONPATH environment variable and the 'build' directory is added to the PATH environment variable."
So, even after a successful build, there is still no trace of a mention of a Code
or Prover
directory in either the output nor the build
directory, which I find rather strange.
Shall be having a closer look at Ninja though as the build times are silly long to the point of keeping up to date with the master branch would be next to impossible!
@SMTStuck
Thank you very much for the detailed reply. I have tried building to a path with no spaces and it works fine, yet even so the build process finishes with:
Ah okay so something in the generated Makefile isn't handling spaces properly.
Shall be having a closer look at Ninja though as the build times are silly long to the point of keeping up to date with the master branch would be next to impossible!
Great. Just to warn you though until #986 is fixed when ever you pull down new code (or do anything that would modify the CMake files in git) you need to re-run the contrib/cmake/bootstrap.py
script to make sure all your CMake files are in sync.
Thanks for reporting this issue, this is now fixed and you can have spaces in the keyfile filename. But, I'm sure there's a few other pieces of scripts that don't like spaces, so keep reporting them if you run into something that looks related!
Fix The fix is rather simple - don't have spaces in the path to the Z3 directory. Would be appreciated I'm sure by new Windows users to have a note on the Build page that Z3 should not be part of a path with spaces.
Problem
python scripts/mk_make.py --dotnet
runs fine.nmake
within thebuild
directory compiles many cpp files, but eventually runs into the following error. Closer inspection of thebuild
directory shows neither aCode
directory nor aProver
directory.