[Bug 56601] New: Compilation failure on Fedora 40: error: initialization of ... [-Wincompatible-pointer-types]
https://bugs.winehq.org/show_bug.cgi?id=56601 Bug ID: 56601 Summary: Compilation failure on Fedora 40: error: initialization of ... [-Wincompatible-pointer-types] Product: Wine Version: 9.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: patrick+winehq.org(a)laimbock.com Distribution: --- Created attachment 76357 --> https://bugs.winehq.org/attachment.cgi?id=76357 Compilation failure of Wine 9.4 on Fedora 40 Component: dlls/combase Building 9.4 on Fedora 39 succeeds while building of 9.4 on Fedora 40 fails. In file included from include/windef.h:271, from include/windows.h:38, from dlls/combase/string.c:22: dlls/combase/string.c: In function 'impl_from_HSTRING_BUFFER': include/winnt.h:888:46: error: initialization of 'const WCHAR (*)[1]' {aka 'const short unsigned int (*)[1]'} from incompatible pointer type 'HSTRING_BUFFER' {aka 'struct HSTRING_BUFFER__ *'} [-Wincompatible-pointer-types] 888 | const typeof(((type *)0)->field) *__ptr = (address); \ | ^ dlls/combase/string.c:63:12: note: in expansion of macro 'CONTAINING_RECORD' 63 | return CONTAINING_RECORD(buffer, struct hstring_private, buffer); | ^~~~~~~~~~~~~~~~~ make: *** [Makefile:6704: dlls/combase/x86_64-windows/string.o] Error 1 Attached file has more lines. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12(a)gmail.com --- Comment #1 from Zeb Figura <z.figura12(a)gmail.com> --- You're not compiling with -Werror. Are you sure that's the relevant message? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 --- Comment #2 from Zeb Figura <z.figura12(a)gmail.com> --- Also, in the future, please mention if you're using Wine-Staging rather than upstream Wine. Note that in general Wine-Staging makes no promise of building without warnings. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 --- Comment #3 from Patrick <patrick+winehq.org(a)laimbock.com> --- Thank you for your feedback. And noted. This is wine-9.4 + wine-staging-9.4.1. I added -Werror to the flags in Fedora's wine.spec which are now: CFLAGS: -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -O2 -Werror Make -j1 resulted in this error: ... In file included from dlls/ntdll/unix/esync.c:27: include/config.h:844:9: error: "_GNU_SOURCE" redefined [-Werror] 844 | #define _GNU_SOURCE 1 | ^~~~~~~~~~~ dlls/ntdll/unix/esync.c:25:9: note: this is the location of the previous definition 25 | #define _GNU_SOURCE | ^~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:84807: dlls/ntdll/unix/esync.o] Error 1 So I removed that define $ sed -i -e's|#define _GNU_SOURCE||' dlls/ntdll/unix/esync.c Make again and I got a new error: dlls/win32u/input.c: In function ‘set_active_window’: dlls/win32u/input.c:1935:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] 1935 | return ret; | ^~~ dlls/win32u/input.c:1812:10: note: ‘ret’ was declared here 1812 | BOOL ret; So I changed that to BOOL ret = FALSE; $ sed -i -e'1812s/BOOL ret;/BOOL ret = FALSE;/' dlls/win32u/input.c Make again and I got the same error I reported: In file included from include/windef.h:271, from include/windows.h:38, from dlls/combase/string.c:22: dlls/combase/string.c: In function 'impl_from_HSTRING_BUFFER': include/winnt.h:888:46: error: initialization of 'const WCHAR (*)[1]' {aka 'const short unsigned int (*)[1]'} from incompatible pointer type 'HSTRING_BUFFER' {aka 'struct HSTRING_BUFFER__ *'} [-Wincompatible-pointer-types] 888 | const typeof(((type *)0)->field) *__ptr = (address); \ | ^ dlls/combase/string.c:63:12: note: in expansion of macro 'CONTAINING_RECORD' 63 | return CONTAINING_RECORD(buffer, struct hstring_private, buffer); | ^~~~~~~~~~~~~~~~~ make: *** [Makefile:6704: dlls/combase/x86_64-windows/string.o] Error 1 Please let me know if you need more information or a change/patch to try. Thanks! FWIW I'm building 9.4 because that's the latest wine version where the childwindow patch is available and 9.5+ has https://bugs.winehq.org/show_bug.cgi?id=56483 so only 9.4 can be used for music production (wine + yabridge to use Windows VSTs on Linux in a DAW). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 --- Comment #4 from Patrick <patrick+winehq.org(a)laimbock.com> --- Should that be of interest: $ gcc --version gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Fedora Keywords| |download, source -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 --- Comment #5 from Patrick <patrick+winehq.org(a)laimbock.com> --- Building wine-9.4 (without staging) without -Werror did not show the same error but when building with -Werror the build failed due to -Werror=stringop-overread in tools/winedump/msc.c and -Werror=maybe-uninitialized in tools/winedump/pe.c. See attachment. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 --- Comment #6 from Patrick <patrick+winehq.org(a)laimbock.com> --- Created attachment 76368 --> https://bugs.winehq.org/attachment.cgi?id=76368 Errors when building wine-9.4 with -Werror on Fedora 40 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 Patrick <patrick+winehq.org(a)laimbock.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |-unknown Product|Wine |Wine-staging CC| |leslie_alistair(a)hotmail.com --- Comment #7 from Patrick <patrick+winehq.org(a)laimbock.com> --- The error seems to be caused by the following patch in wine-staging: patches/Compiler_Warnings/0002-combase-Avoid-implicit-cast-of-interface-pointer.patch Setting Product to wine-staging. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 --- Comment #8 from Patrick <patrick+winehq.org(a)laimbock.com> --- (In reply to Patrick from comment #5)
Building wine-9.4 (without staging) without -Werror did not show the same error but when building with -Werror the build failed due to -Werror=stringop-overread in tools/winedump/msc.c and -Werror=maybe-uninitialized in tools/winedump/pe.c. See attachment.
I filed a separate bug: https://bugs.winehq.org/show_bug.cgi?id=56613 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 --- Comment #9 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- Have you tried cleaning the compilation directory before running configure and make? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|UNCONFIRMED |RESOLVED --- Comment #10 from Zeb Figura <z.figura12(a)gmail.com> --- I'm going to go ahead and close this; Wine-Staging doesn't make any effort to build with -Werror; it's a waste of our time. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=56601 Gijs Vermeulen <gijsvrm(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- Closing. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla