-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add support for windows builds #738
Comments
We're happy to support Windows or use a more modern build system, if someone wants to contribute a PR. In fact, I thought we had a GitHub Issue open for switching to a better build system, but I don't see one. I'm a dinosaur, so I don't even know what would be an example of "a modern build system" -- I guess I know that CMake exists, does that count? -- if you could list what you had in mind, that would be helpful. I don't understand how to use Windows, so I wouldn't be able to judge a PR, but am happy to accept one. A bigger issue is that GitHub doesn't provide a Windows VM for regression testing. GitHub supports connecting to your own servers, so if someone can host a Windows runner for the CI, that would help ensure that we don't break the Windows support after accepting a PR. |
It's exactly what I meant, some would also consider meson, but I have no experience using meson.
GitHub actions provide them actually: https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md I can try to provide CMake configurations, but this might take a while, because I have to do this in my free time. |
Ah, you're right. I don't know why I thought they didn't have Windows runners. Sorry!
Out of curiosity, can you say what fails? I would believe, for example, that BSC's code constructs file paths in ways that aren't portable (like using hardcoded slashes). And there are submodules like STP that have their own codebase and Makefiles that might not support Windows? (but STP can be stubbed out, or we can work on upgrading STP and Yices to newer versions) But I'd also guess that Windows executables don't load dynamic libraries in the same way? so maybe the current handling of the SMT libraries (loading via the LD_LIBRARY_PATH) won't work on Windows anyway? or would it? (but we can avoid that issue by switching to static linking for those libraries?) Are there other issues that one runs into?
If you're able to, that would be awesome! But no worries! I know that we're all volunteers, and we're all busy, so anyone who contributes is doing so in their free time, and we're appreciative when people are able to give. But one question: I would assume that CMake is orthogonal to getting BSC compiling with Windows? My impression is that CMake would help identify the user's environment and the particular flags and tools etc for compiling. With the current Makefiles and |
It fails to build STP and SAT:
Interestingly, the produced file looks like this (the last path is missing the
Yes, the loading is a bit different, but the operating system automatically does that for on-load-time dynamic libraries, as long the OS can find them.
It is, at least, to support a build via MSYS. But makefiles aren't supported on Windows, when we want to compile BSC natively via cl.exe (MSVC) or clang-cl.exe (LLVM with MSVC support), we must switch to a platform-independent build system. |
In many companies, windows is the defacto standard operating system, it would therefore be useful, to also support windows as operating system.
Currently, one can enable MSYS / MINGW in the platform.mk, but bsv even fails to compile with MSYS2.
It would even better, to switch completely to a more modern build system.
The text was updated successfully, but these errors were encountered: