-
Notifications
You must be signed in to change notification settings - Fork 29
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
Windows Cross-Compilation Support #5
Comments
I made an update to suppress CMake adding the suffix of '.exe' in Windows. Could you try it and let me know? Thanks. |
Thanks @ayzk - I gave it a try, but for some reason the file is still named Additionally, I saw the commit message indicated this was a fix for Win32 - this is actually a Win64 build as I believe Win32 had some other issues during compilation so I assumed it was likely not supported (and not a big deal). I'm not sure there's much for logs, but here are a few snippets.
and
Again, thanks for your work! |
So unfortunately I learned the hard way that SZ 2 does not work on Windows, see szcompressor/SZ#58 |
@wingman-jr-addon I made some changes for SZ3 and it can produce correct results on Windows. Could you confirm if you can reproduce my results?
|
@ayzk Great work! Looks like things worked out fairly well. My approach had been using WSL with MinGW. I tried the MSYS2 approach, and found that the steps above seemed to work all right. I see the main page is pointing here so I'll chronicle my experiences. For others trying this out:
I wasn't sure the best way to verify at this point. I thought perhaps:
But it did not find any tests. Maybe a note here would help others? My end goal, however, was to include this into a Visual Studio solution. Since I had most of the infrastructure there, I went back to the WSL plus MinGW approach from before and got it working with a couple minor fixups. CMake toolchain file:
When targeting C++17, Visual Studio produced a few warnings/errors I needed to suppress.
I also needed to provide a shim for the small usages of After this, I was to able to test that at least Linux compression -> Linux decompression and Windows compression -> Windows decompression worked. I have not tried yet e.g. Linux compression -> Windows decompression. Thanks for the hard work! |
@wingman-jr-addon Thank you very much for the instruction for WSL. |
Current master seems to properly generate a Visual Studio solution mkdir build |
Sorry for the lengthy delay in responding; I was able to return at last to this project. Think we should be good to close now. |
I found it not working in Windows MSYS2 MinGW64 env, but it worked in the MSYS2 UCRT64 environment. After installing the MSYS2, open the UCRT64 terminal. Install the compiler and cmake by the following commands. pacman -S mingw-w64-ucrt-x86_64-gcc
pacman -S mingw-w64-ucrt-x86_64-cmake And then it just worked without -G "MinGW". Go into the sz3 folder and run
The sz3.exe will be successfully built. |
Thanks for the recent work that made
mingw-w64
successfully cross-compile the code. Only one minor issue seems to remain: the.exe
extension is appended to thesz
executable, which fails onmake install
.Perhaps this line should somehow account for the difference in the binary name?
SZ3/test/CMakeLists.txt
Line 10 in 13b25a5
Manually editing the configured cmake output to append
.exe
then caused the install to complete without issue.The text was updated successfully, but these errors were encountered: