Closed chemix-lunacy closed 1 year ago
hi @chemix-lunacy sorry for the delayed follow up. Have you been able to get the components to build on your Windows machine in the meantime? Any advice you can share that has helped your set up?
For my part, I use the devcontainer in the repo to work on the code in a Linux environment where building via cmake is much easier. If you are unfamiliar with container workflows, check out this guide on Developing inside a Container using VSCode. Hope that helps!
@swernli I didn't spend any additional time and the container is a no-go.
Don't suppose the builds are cross-platform now or you've got binaries for all the main ones?
@chemix-lunacy Unfortunately, while the CI build does test on Windows, it doesn't produce any binary artifacts, so there is nothing to download from there. I did take a crack at getting cmake compilation on Windows supported and I have something that works locally on my machine. I've pushed that up to a working branch here: https://github.com/qir-alliance/qat/tree/swernli/windows-cmake. It's hacked together, but I'd appreciate feedback on whether this works on your system as well as mine. Some caveats:
LLVM_DIR
pointing to the location of the built cmake files, usually under lib/cmake/llvm
. That will allow the QAT build to locate the components it needs. Buidling LLVM on Windows can be challenging due to long path issues, but check out https://github.com/qir-alliance/qir-runner/blob/main/.github/actions/install-llvm/action.yml for some steps that we use in pipelines for qir-runner that could help you get started.> mkdir Release
> cd .\Release\
> cmake -G Ninja -D CMAKE_BUILD_TYPE="Release" ..
> cmake --build .
For me that worked. Let me know what you are able to reproduce, and I'll keep trying to refine this into a state where it is more broadly consumable.
@swernli Ah, thanks so much for jumping on this and trying to fix it up! But I have no problem with waiting for binaries and when things are more stable. I also likely won't get around to testing it, sorry.
Funnily enough since you mentioned it, I've already spliced together a Rust project from both qir-runner and pyqir that gave me a foundation for doing everything I needed to do anyway. So thanks a ton for those!
If you're making it work with just normal cmake it may be worth just closing this issue as it's likely a bazelisk problem.
Glad to hear qir-runner and pyqir are working well for you! I'll go ahead and close this for now as bazel-specific as you suggest. I think unblocking a simpler cmake path will be the best way forward.
Followed the Bazelisk build instructions. Had to use a slightly modified command line because my default user folder has a space in it:
bazelisk --output_user_root="C:\Users\Default\bazelisk" build //qir/qat:qat --config msvc --config release
Fixed a variety of small environment setup issues, but then end up with this error:
Just omitting the path for succinctness, can provide if necessary. Every file referenced in the bash command exists except the Version.hpp which I assume is the output. I'm on a relatively standard windows 10 home dev machine.
Any pointers to help find out what's going wrong?