If the use flag mingw is not set, the build of wine-staging (starting with 8.21) fails with these errors: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: tmp6596d1be/dxgkrnl-00000000.spec.o: in function `__wine_spec_nt_header': (.data+0x28): undefined reference to `DriverEntry' collect2: error: ld returned 1 exit status /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: tmp6596d1c0/dxgmms1-00000000.spec.o: in function `__wine_spec_nt_header': (.data+0x28): undefined reference to `DriverEntry' winegcc: /usr/bin/x86_64-pc-linux-gnu-gcc failed This does not happen on versions lower than 8.21. I've tested some commits of wine-staging and it looks like the issue starts with https://gitlab.winehq.org/wine/wine-staging/-/commit/e278be7a45a0345ee05f7daec19913978cc83947. Maybe a change in upstream wine between 3a8d71041c159d76a76856867caa1de8ca297151 and 137638e185e9302602bcd9cc796d7bcfa03caee5. According to the error message, these stub-drivers are affected: https://gitlab.winehq.org/wine/wine-staging/-/blob/master/patches/winedevice-Default_Drivers/0002-dxgkrnl.sys-Add-stub-driver.patch https://gitlab.winehq.org/wine/wine-staging/-/blob/master/patches/winedevice-Default_Drivers/0003-dxgmms1.sys-Add-stub-driver.patch Both use EXTRADLLFLAGS = -mno-cygwin Could this be related? When mingw use flag is set (which is the default) the build works fine. Not sure how important this is then. Reproducible: Always
Or could it be that C_SRCS needs to be replaced with SOURCES on both the stub-drivers? as done here for toher stubs: https://gitlab.winehq.org/wine/wine-staging/-/commit/e278be7a45a0345ee05f7daec19913978cc83947 See on wine: https://gitlab.winehq.org/wine/wine/-/commit/440771ed41ab8fc8c7f73f59dec2a8bceda7bb50
Figures this would break sometime, I rarely test -mingw, and it has become a bit of a 2nd class citizen for support. And given of that last bit, I don't think it's worth worrying about downstream. Lazy downstream workaround could be to just drop the patches that are broken when USE=-mingw in the ebuild until fixed upstream (they don't sound very important), aka this builds fine for me: MY_WINE_STAGING_CONF="-W winedevice-Default_Drivers -W fltmgr.sys-FltBuildDefaultSecurityDescriptor" USE=-mingw emerge -1 wine-staging d3d12core-D3D12GetInterface is already gone upstream (next version) albeit I didn't need to disable it in 8.21 to get a successful build. Perhaps more fail but haven't tried enabling all USE yet, will try later.
Thanks! I can confirm that the build with the excluded patchsets works for me as well. I currenty have these use flags: +X +abi_x86_32 +abi_x86_64 +alsa -capi -crossdev-mingw -cups -custom-cflags -dos +fontconfig -gecko -gphoto2 +gstreamer -kerberos -llvm-libunwind -mingw -mono -netapi +nls -opencl +opengl -osmesa -pcap -perl -pulseaudio -samba -scanner +sdl -smartcard +ssl +strip +truetype -udev -udisks +unwind -usb -v4l +vulkan -wayland -wow64 +xcomposite -xinerama
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=368a264f5f0bd1cfe1107a131e0f0c4c3128d867 commit 368a264f5f0bd1cfe1107a131e0f0c4c3128d867 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2024-01-04 17:30:55 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2024-01-04 18:05:29 +0000 app-emulation/wine-staging: skip patches broken with USE=-mingw Closes: https://bugs.gentoo.org/921360 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> app-emulation/wine-staging/wine-staging-8.21.ebuild | 7 ++++++- app-emulation/wine-staging/wine-staging-9999.ebuild | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-)