https://bugs.winehq.org/show_bug.cgi?id=56973
Bug ID: 56973 Summary: Building wine with mingw/gcc 14.1.1 fails with error '-Wimplicit-function-declaration' Product: Wine Version: 9.13 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: build-env Assignee: wine-bugs@winehq.org Reporter: arusanu.bu@gmail.com Distribution: ---
After updating mingw/gcc to 14.1.0 wine fails to build with error:
< i686-w64-mingw32-gcc -c -o dlls/msxml3/i386-windows/domdoc.o dlls/msxml3/domdoc.c -Idlls/msxml3 -Iinclude -Iinclude/msvcrt \ -I/usr/i686-w64-mingw32/sys-root/mingw/include/libxml2 -D_UCRT -D__WINESRC__ -D__WINE_PE_BUILD \ -Wall -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \ -Winit-self -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits \ -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op -Wabsolute-value \ -Wenum-conversion -Wno-misleading-indentation -fno-omit-frame-pointer -mpreferred-stack-boundary=2 \ -gdwarf-4 -g -O2 dlls/msxml3/domdoc.c: In function 'doparse': dlls/msxml3/domdoc.c:546:9: error: initialization of 'void (*)(void *, const xmlError *)' {aka 'void (*)(void *, const struct _xmlError *)'} from incompatible pointer type 'void (*)(void *, xmlError *)' {aka 'void (*)(void *, struct _xmlError *)'} [-Wincompatible-pointer-types] 546 | sax_serror /* serror */ | ^~~~~~~~~~ dlls/msxml3/domdoc.c:546:9: note: (near initialization for 'sax_handler.serror') make: *** [Makefile:78873: dlls/msxml3/i386-windows/domdoc.o] Error 1 >
Adding "-Wno-error=incompatible-pointer-types" to CROSSCFLAGS seems to circumvent this error but run into the following error:
<i686-w64-mingw32-gcc -c -o dlls/msxml3/i386-windows/main.o dlls/msxml3/main.c -Idlls/msxml3 -Iinclude -Iinclude/msvcrt \ -I/usr/i686-w64-mingw32/sys-root/mingw/include/libxml2 -D_UCRT -D__WINESRC__ -D__WINE_PE_BUILD \ -Wall -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \ -Winit-self -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits \ -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op -Wabsolute-value \ -Wenum-conversion -Wno-misleading-indentation -fno-omit-frame-pointer -mpreferred-stack-boundary=2 \ -Wno-error=incompatible-pointer-types dlls/msxml3/main.c: In function 'DllMain': dlls/msxml3/main.c:360:9: error: implicit declaration of function 'xmlThrDefTreeIndentString'; did you mean 'xmlTreeIndentString'? [-Wimplicit-function-declaration] 360 | xmlThrDefTreeIndentString("\t"); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | xmlTreeIndentString make: *** [Makefile:79085: dlls/msxml3/i386-windows/main.o] Error 1 >
which have been mitigated by adding "-Wno-error=-Wimplicit-function-declaration", and that allowed wine to build successfully.
This doesn't happen using mingw/gcc 13.2 or 12.2
If any other details/tests requests are needed will gladly provide.