Parchive / par3cmdline

Official repo for par3cmdline and par3lib
GNU Lesser General Public License v2.1
90 stars 3 forks source link

Started linux code. Windows version compiles on linux with MinGW+WINE #4

Closed mdnahas closed 10 months ago

mdnahas commented 10 months ago

Code compiles on Linux native and with MinGW, the compile-Windows-on-Linux package. When compiling for MinGW, there are many warnings that it does not support printf with the "%zu" format specifier.

The Linux native version does not generate a binary. It is missing functions (which contained Windows system calls).

The MinGW binary throws an "illegal instruction" exception on WINE, the Windows emulator. It runs for a bit, listing the input files and their sizes. The last thing it prints is "Computing hash:". Maybe it is hitting an error with printf and "%zu"?

I suggest checking if the linux/ code works on native Windows. It should. If so, we should copy it to the windows/ directory so that future changes to either can progress from a common codebase.

Yutaka-Sawada commented 10 months ago

MinGW (or gcc) seems to require stddef.h header to use %zu in printf function. But, I cannot test myself.

mdnahas commented 10 months ago

I tested and "%zu" works. The error was due to no AVX512 support in WINE 5.0. (It is support in Wine version 5.16.)