-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Meson build fails on windows #2358
Comments
cc @lzutao |
Possible related issue: #2304 |
It's my mistake that our meson config has never worked on Windows. |
@lzutao not a problem, it's easy to mess up code for multiplatform use. I have a Windows machine and happy test/give you a hand with this, just tag me here. I think the script includes While you are on it, could you please add some simple comments to that area of the build script? I think it's related to changing a version file and compiling a dll for Windows, but there is already some code to update a version above, will be nice to know why we do this. Thank you. |
I don't think the code base tested on Visual C/C++ compiler, |
I think until the Visual C/C++ compiler properly supported in the codebase, Edit: Filed #2363 |
@lzutao I've added just one change on my branch, I think it should be enough - the
I would have expected
I wonder if it is a problem in the |
There are one more place needed to change like that, see 7cbc04a Also, zstd codebase doesn't pass compilation on MSVC 2019. I'd recommend using gcc |
While the suggested diffs in this issue do fix some of the issues, Meson compilation with MSVC toolchain is still fragile and prone to failures for other reasons (I've had multiple failures with the VS 2022 toolchain when I tried). Furthermore, while we appreciate and glad to see contributions to the Meson build system, it's not a build systems that's officially supported by the project, especially on Windows. If anyone feels like tackling this issue, please do, I suggest starting with the patches mentioned in the comments, and continuing with setting up a CI. |
@eli-schwartz - Makes sense that you missed it, as it's an older issues.
What toolchain are you using? I'll be surprised if it works with MSVC. I'm glad to hear that you have a CI that tests it, would you consider porting it to be a part of the official repo CI so we can get a quick signal if something breaks? |
My CI build logs this:
It builds fine, tests fail due to #3120 However, I did miss enabling the contrib directory, so I'm not sure about that one... let me investigate... |
I investigated, and I wrote this fix for pzstd: 490a439 I get a bit further, but it still fails...
From a quick look, no Windows jobs attempt to compile pzstd anyway... it simply does not compile there AFAICT. |
Which CI shall I add it to? Probably not travis... |
Yeah, we do no longer use travis.
You can have multiple tests (one per host system). |
The test time for Ubuntu is 30 minutes because of tests/playTests.sh, which is not run on Windows -- so the MSVC build finishes for me in 6 minutes. Sounds like a plan. |
The first section manages only "fast" tests, and is the main one. The second section contains "long" tests, such as compressing / decompressing large amounts of data, or complex dictionary scenarios. It's only triggered if the directive I would expect only the first section to make sense for |
I wonder if it makes sense instead to have a make check-short and a make check-large? Meson would have the large test skipped by default. The runtime of each test is listed in Meson's test collection:
|
Currently we the main Makefile has |
I would recommend to only port the equivalent of
|
Meson has a single test entrypoint: |
I have a branch that adds Meson CI. (Including for Linux, because it was only being run on Travis, and if you're no longer running Travis at all, then that means it's no longer being tested!) It does, predictably, fail on Windows as I mentioned above. Waiting on a resolution to #3120 before submitting my CI additions. |
Describe the bug
Meson build fails on Windows platform
To Reproduce
Steps to reproduce the behaviour:
Expected behavior
Compilation should just work
Screenshots and charts
Desktop (please complete the following information):
Additional context
This seems to be because of the following:
Step 1. Meson build file calls a resource file and compiles it
Step 2. Resource file includes
zstd.h
on line 4, which fails.Originally found when working on a patch
The text was updated successfully, but these errors were encountered: