Thanks, that was helpful. In the meantime I solved it with -Wno-bad-function-cast even if I often read, that the warning should not be ignored.
Paul Eggert <egg...@cs.ucla.edu> schrieb am Mo., 12. Aug. 2024, 10:23: > On 2024-08-11 17:55, Daniel Ruf via GNU gzip discussion and bug reports. > wrote: > > dup2.c:80:11: error: cast from function call of type 'intptr_t' {aka > 'long > > long int'} to non-matching type 'void *' [-Werror=bad-function-cast] > > 80 | if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) > > | ^ > > cc1: all warnings being treated as errors > > make[3]: *** [Makefile:2576: libgzip_a-dup2.o] Error 1 > > make[3]: Leaving directory > > '/home/runner/work/gzip-windows-build/gzip-windows-build/gzip/lib' > > > > What are the correct steps to cross-compile for Windows on Ubuntu 20 LTS? > > Don't use -Wbad-function-cast or anything that implies it; or don't use > -Werror. > > I guess you're building from Git rather than from a release? In that > case more expertise is needed. Try configuring with > --disable-gcc-warnings, or building with 'WERROR_CFLAGS=', or something > like that. >