https://bugs.winehq.org/show_bug.cgi?id=56692
Bug ID: 56692 Summary: Wine-staging "new WoW64" build fails in Fedora 40 Product: Wine-staging Version: 9.8 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: dimesio@earthlink.net CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
The OBS has not enabled i586 builds for Fedora 40, so I created spec files to do "new WoW64" builds. The wine-devel packages built fine, but the wine-staging build failed with:
[ 392s] dlls/combase/string.c: In function 'impl_from_HSTRING_BUFFER': [ 392s] 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] [ 392s] 888 | const typeof(((type *)0)->field) *__ptr = (address); \
In Fedora 39, that's a warning, not an error, and the build succeeds.
https://bugs.winehq.org/show_bug.cgi?id=56692
Jonas Dittrich kakadus2303@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kakadus2303@gmail.com
--- Comment #1 from Jonas Dittrich kakadus2303@gmail.com --- Probably, we get this error because Arch[1] and Fedora[2] upgraded to gcc 14 a few days ago. When I append "-Wno-error=incompatible-pointer-types" to CFLAGS[1] all build issues were fixed.
[1] https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/commit/b6ae4... [2] https://fedoraproject.org/wiki/Changes/GNUToolchainF40#GNU_Toolchain_Update_...) [3] https://gcc.gnu.org/gcc-14/porting_to.html (search "incompatible-pointer-types")
https://bugs.winehq.org/show_bug.cgi?id=56692
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://gitlab.winehq.org/wine/wine-staging/-/commit/7adaca8b1b943ac33303d4c...
https://bugs.winehq.org/show_bug.cgi?id=56692
Rosanne DiMesio dimesio@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |REOPENED
--- Comment #3 from Rosanne DiMesio dimesio@earthlink.net --- (In reply to Alistair Leslie-Hughes from comment #2)
Fixed by https://gitlab.winehq.org/wine/wine-staging/-/commit/ 7adaca8b1b943ac33303d4c6bd730d753d65a9f7
That fixes the first problem, but now it fails with:
[ 411s] dlls/d2d1/effect.c: In function 'impl_from_ID2D1OffsetTransform': [ 411s] include/winnt.h:888:46: error: initialization of 'const ID2D1TransformNode *' from incompatible pointer type 'ID2D1OffsetTransform *' [-Wincompatible-pointer-types] [ 411s] 888 | const typeof(((type *)0)->field) *__ptr = (address); \ [ 411s] | ^ [ 411s] dlls/d2d1/effect.c:25:12: note: in expansion of macro 'CONTAINING_RECORD' [ 411s] 25 | return CONTAINING_RECORD(iface, struct d2d_transform, ID2D1TransformNode_iface); [ 411s] | ^~~~~~~~~~~~~~~~~ [ 411s] dlls/d2d1/effect.c: In function 'impl_from_ID2D1BlendTransform': [ 411s] include/winnt.h:888:46: error: initialization of 'const ID2D1TransformNode *' from incompatible pointer type 'ID2D1BlendTransform *' [-Wincompatible-pointer-types] [ 411s] 888 | const typeof(((type *)0)->field) *__ptr = (address); \ [ 411s] | ^ [ 411s] dlls/d2d1/effect.c:30:12: note: in expansion of macro 'CONTAINING_RECORD' [ 411s] 30 | return CONTAINING_RECORD(iface, struct d2d_transform, ID2D1TransformNode_iface); [ 411s] | ^~~~~~~~~~~~~~~~~ [ 411s] dlls/d2d1/effect.c: In function 'impl_from_ID2D1BorderTransform': [ 411s] include/winnt.h:888:46: error: initialization of 'const ID2D1TransformNode *' from incompatible pointer type 'ID2D1BorderTransform *' [-Wincompatible-pointer-types] [ 411s] 888 | const typeof(((type *)0)->field) *__ptr = (address); \ [ 411s] | ^ [ 411s] dlls/d2d1/effect.c:35:12: note: in expansion of macro 'CONTAINING_RECORD' [ 411s] 35 | return CONTAINING_RECORD(iface, struct d2d_transform, ID2D1TransformNode_iface); [ 411s] | ^~~~~~~~~~~~~~~~~ [ 411s] dlls/d2d1/effect.c: In function 'impl_from_ID2D1BoundsAdjustmentTransform': [ 411s] include/winnt.h:888:46: error: initialization of 'const ID2D1TransformNode *' from incompatible pointer type 'ID2D1BoundsAdjustmentTransform *' [-Wincompatible-pointer-types] [ 411s] 888 | const typeof(((type *)0)->field) *__ptr = (address); \ [ 411s] | ^ [ 411s] dlls/d2d1/effect.c:41:12: note: in expansion of macro 'CONTAINING_RECORD' [ 411s] 41 | return CONTAINING_RECORD(iface, struct d2d_transform, ID2D1TransformNode_iface);
I had already tried appending "-Wno-error=incompatible-pointer-types" to %{optflags} in the spec file, but it didn't work.
https://bugs.winehq.org/show_bug.cgi?id=56692
--- Comment #4 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- You are going to hit this error alot. In the short term disable the Compile_Warnings patches as it doesn't affect functionality.
I'll update the patchset as soon as I can.
https://bugs.winehq.org/show_bug.cgi?id=56692
--- Comment #5 from Rosanne DiMesio dimesio@earthlink.net --- (In reply to Alistair Leslie-Hughes from comment #4)
You are going to hit this error alot. In the short term disable the Compile_Warnings patches as it doesn't affect functionality.
That works for most of the errors, but I also had to disable shell32-IconCache for the build to succeed.
https://bugs.winehq.org/show_bug.cgi?id=56692
--- Comment #6 from Zeb Figura z.figura12@gmail.com --- I would not recommend building Wine-Staging with warnings. It is a waste of our time to find and fix all of the warnings in patch sets which are inherently not ready for upstream.
https://bugs.winehq.org/show_bug.cgi?id=56692
Patrick patrick+winehq.org@laimbock.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |patrick+winehq.org@laimbock | |.com
--- Comment #7 from Patrick patrick+winehq.org@laimbock.com --- (In reply to Rosanne DiMesio from comment #3)
I had already tried appending "-Wno-error=incompatible-pointer-types" to %{optflags} in the spec file, but it didn't work.
Here's what I did to make it work:
Add after the last 'export CFLAGS' in the spec file add:
export CFLAGS="$(echo "$CFLAGS" -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types)"
change the 'make' command to: %make_build TARGETFLAGS="" %{_arch}_CFLAGS="-g -O2 -Wno-error=incompatible-pointer-types -Wno-incompatible-pointer-types"
HTH
https://bugs.winehq.org/show_bug.cgi?id=56692
--- Comment #8 from Rosanne DiMesio dimesio@earthlink.net --- With 9.11, I no longer have to disable shell-IconCache, but the build now fails with:
[ 660s] programs/cmd/wcmdmain.c:1492:47: error: passing argument 2 of 'GetExitCodeProcess' from incompatible pointer type [-Wincompatible-pointer-types] [ 660s] 1492 | GetExitCodeProcess (shexw.hProcess, &errorlevel); [ 660s] | ^~~~~~~~~~~ [ 660s] | | [ 660s] | int * [ 660s] In file included from include/windows.h:39, [ 660s] from programs/cmd/wcmd.h:23, [ 660s] from programs/cmd/wcmdmain.c:29: [ 660s] include/winbase.h:2199:57: note: expected 'LPDWORD' {aka 'long unsigned int *'} but argument is of type 'int
Disabling cmd-launch-association allows the build to complete.
(In reply to Zeb Figura from comment #6)
I would not recommend building Wine-Staging with warnings. It is a waste of our time to find and fix all of the warnings in patch sets which are inherently not ready for upstream.
These warnings are now errors in GCC 14, and new distro versions using it are going to have the same problem. If this bug is a WONTFIX, then we are looking at eventually phasing out our wine-staging packages.
https://bugs.winehq.org/show_bug.cgi?id=56692
--- Comment #9 from Zeb Figura z.figura12@gmail.com --- Wait, so gcc made -Wint-conversion and Wincompatible-pointer-types errors by default? How does this not break every legacy project on the planet?
We'll look into a solution for this.
https://bugs.winehq.org/show_bug.cgi?id=56692
Aida Jonikienė aidas957@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aidas957@gmail.com
--- Comment #10 from Aida Jonikienė aidas957@gmail.com --- (In reply to Zeb Figura from comment #9)
We'll look into a solution for this.
I took the time to solve the wine-staging warnings (which allows -Werror to work) and tried to submit the patches for them in the wine-devel mailing list but they got rejected because they "are pretty much a waste of time for everyone involved" and "Compilation warnings can be fixed when patches are rewritten for upstreaming" (is there a way to get those fixes in staging without moving the affected patchsets upstream (which doesn't really work for esync anyway)?)
Assuming the patches can't be merged, the only other option I can think of is just disabling the relevant warnings completely (which might introduce other bugs)
At least the Compiler_Warnings patchset got deleted completely (which should reduce the number of required warning fixes)
https://bugs.winehq.org/show_bug.cgi?id=56692
--- Comment #11 from Patrick patrick+winehq.org@laimbock.com --- (In reply to Aida Jonikienė from comment #10)
(In reply to Zeb Figura from comment #9)
We'll look into a solution for this.
I took the time to solve the wine-staging warnings (which allows -Werror to work) and tried to submit the patches for them in the wine-devel mailing list but they got rejected because they "are pretty much a waste of time for everyone involved" and "Compilation warnings can be fixed when patches are rewritten for upstreaming" (is there a way to get those fixes in staging without moving the affected patchsets upstream (which doesn't really work for esync anyway)?)
Thank you for taking the time to create the patches! I could not find your submission in the wine-devel archives. Is there a git repo where I can find your patches?
https://bugs.winehq.org/show_bug.cgi?id=56692
--- Comment #12 from Aida Jonikienė aidas957@gmail.com --- (In reply to Patrick from comment #11)
Is there a git repo where I can find your patches?
Here's a branch I just pushed which should contain the fixes: https://gitlab.winehq.org/DodoGTA/wine-staging/-/tree/mr/compile-warnings-up...
https://bugs.winehq.org/show_bug.cgi?id=56692
--- Comment #13 from Zeb Figura z.figura12@gmail.com --- (In reply to Aida Jonikienė from comment #10)
(In reply to Zeb Figura from comment #9)
We'll look into a solution for this.
I took the time to solve the wine-staging warnings (which allows -Werror to work) and tried to submit the patches for them in the wine-devel mailing list but they got rejected because they "are pretty much a waste of time for everyone involved" and "Compilation warnings can be fixed when patches are rewritten for upstreaming" (is there a way to get those fixes in staging without moving the affected patchsets upstream (which doesn't really work for esync anyway)?)
Assuming the patches can't be merged, the only other option I can think of is just disabling the relevant warnings completely (which might introduce other bugs)
Yes. Fixing warnings creates more work for us and it's pointless when these patches are going to need to be rewritten anyway. It's more efficient to take care of them when the patches are upstreamed.
It's especially pointless to fix compiler warnings in a patch set that can't even be upstreamed but instead needs to be replaced (like eventfd_synchronization).
Bottom line is, wine-staging patches invariably have more serious problems than compile warnings. Don't build wine-staging with -Werror.
That GCC has chosen to promote some warnings to errors makes this a bit of a special case.
https://bugs.winehq.org/show_bug.cgi?id=56692
Rosanne DiMesio dimesio@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED
--- Comment #14 from Rosanne DiMesio dimesio@earthlink.net --- This has been fixed in 9.12.