Created attachment 241927 [details] Patch to update emulators/wine-devel from 7.x to 8.4 I see wine-devel has not been updated yet this year, so here is a patch that brings it from 7.x to 8.4. files/patch-configure is a hack to restore build with a mixture of GCC ("native") and clang (MinGW), which is what may have been holding up the update based in my last conversation with Damjan in December. Everyone, please feel free to copy anyone interested in Wine on FreeBSD for input and testing.
(In reply to Gerald Pfeifer from comment #0) I've tested this in poudriere, and there seems two files missing in pkg-plist: Error: Orphaned: lib/wine/%%WINEARCH%%-unix/winewayland.so Error: Orphaned: lib/wine/%%WINEARCH%%-windows/winewayland.drv
Created attachment 241945 [details] Patch to update emulators/wine-devel from 7.x to 8.4 (v2) Thank you, Li-Wen. Looks like I had disabled Wayland in my test builds, and Wayland and Wine don't go well together yet, so let's explicitly disable this for the time being (which should address the pkg-plist difference). In any case a good trigger to make this explicit - one way or the other, like I have done for essentially all other configure options.
(In reply to Gerald Pfeifer from comment #2) Yes disabling wayland does fix the plist issue. BTW, the v2 patch doesn't include patch-configure in v1. Poudriere build is fine after adding patch-configure back.
^Triage: reporter is committer, assign accordingly
Created attachment 241977 [details] Patch to update emulators/wine-devel from 7.x to 8.4 (v1+v2=v3) Thank you, Li-Wen! Let me provide a consolidated patch for the benefit of others looking in this (and Damjan for review/approval).
The port with this patch applied reproducibly fails to build on i386, due to some bizarre error in LLVM ("LLVM ERROR: out of memory"); fiddling with the ASLR sysctls doesn't help, and I have no further ideas at this stage: tools/winegcc/winegcc -o dlls/shell32/i386-windows/shell32.dll --wine-objdir . -b i686-windows -Wl,--wine-builtin -shared \ dlls/shell32/shell32.spec dlls/shell32/i386-windows/appbar.o dlls/shell32/i386-windows/assoc.o \ dlls/shell32/i386-windows/autocomplete.o dlls/shell32/i386-windows/brsfolder.o \ dlls/shell32/i386-windows/changenotify.o dlls/shell32/i386-windows/classes.o \ dlls/shell32/i386-windows/clipboard.o dlls/shell32/i386-windows/control.o \ dlls/shell32/i386-windows/cpanelfolder.o dlls/shell32/i386-windows/dataobject.o \ dlls/shell32/i386-windows/dde.o dlls/shell32/i386-windows/debughlp.o \ dlls/shell32/i386-windows/dialogs.o dlls/shell32/i386-windows/dragdrophelper.o \ dlls/shell32/i386-windows/ebrowser.o dlls/shell32/i386-windows/enumidlist.o \ dlls/shell32/i386-windows/folders.o dlls/shell32/i386-windows/iconcache.o \ dlls/shell32/i386-windows/pidl.o dlls/shell32/i386-windows/recyclebin.o \ dlls/shell32/i386-windows/shell32_main.o dlls/shell32/i386-windows/shelldispatch.o \ dlls/shell32/i386-windows/shellitem.o dlls/shell32/i386-windows/shelllink.o \ dlls/shell32/i386-windows/shellole.o dlls/shell32/i386-windows/shellord.o \ dlls/shell32/i386-windows/shellpath.o dlls/shell32/i386-windows/shellreg.o \ dlls/shell32/i386-windows/shellstring.o dlls/shell32/i386-windows/shfldr_desktop.o \ dlls/shell32/i386-windows/shfldr_fs.o dlls/shell32/i386-windows/shfldr_mycomp.o \ dlls/shell32/i386-windows/shfldr_netplaces.o dlls/shell32/i386-windows/shfldr_printers.o \ dlls/shell32/i386-windows/shlexec.o dlls/shell32/i386-windows/shlfileop.o \ dlls/shell32/i386-windows/shlfolder.o dlls/shell32/i386-windows/shlfsbind.o \ dlls/shell32/i386-windows/shlmenu.o dlls/shell32/i386-windows/shlview.o \ dlls/shell32/i386-windows/shlview_cmenu.o dlls/shell32/i386-windows/shpolicy.o \ dlls/shell32/i386-windows/systray.o dlls/shell32/shell32.res \ dlls/shell32/i386-windows/shell32_classes_r.res dlls/shell32/i386-windows/shell32_tlb_t.res \ libs/uuid/i386-windows/libuuid.a dlls/shlwapi/i386-windows/libshlwapi.a \ dlls/user32/i386-windows/libuser32.a dlls/gdi32/i386-windows/libgdi32.a \ dlls/advapi32/i386-windows/libadvapi32.a dlls/ole32/i386-windows/libole32.a \ dlls/oleaut32/i386-windows/liboleaut32.a dlls/shdocvw/i386-windows/libshdocvw.a \ dlls/version/i386-windows/libversion.a dlls/comctl32/i386-windows/libcomctl32.a \ dlls/comdlg32/i386-windows/libcomdlg32.a dlls/gdiplus/i386-windows/libgdiplus.a \ dlls/winecrt0/i386-windows/libwinecrt0.a dlls/ucrtbase/i386-windows/libucrtbase.a \ dlls/kernel32/i386-windows/libkernel32.a dlls/ntdll/i386-windows/libntdll.a \ -Wl,-delayload,ole32.dll -Wl,-delayload,oleaut32.dll -Wl,-delayload,shdocvw.dll \ -Wl,-delayload,version.dll -Wl,-delayload,comctl32.dll -Wl,-delayload,comdlg32.dll \ -Wl,-delayload,gdiplus.dll -Wl,--disable-stdcall-fixup LLVM ERROR: out of memory PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /usr/bin/clang -cc1as -triple i686-unknown-windows-msvc19.11.0 -filetype obj -main-file-name shell32-00000000.spec-00000000.s -target-cpu pentium4 -fdebug-compilation-dir /usr/ports/emulators/wine-devel/work/wine-8.4 -dwarf-debug-producer FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) -dwarf-version=4 -mrelocation-model static -mincremental-linker-compatible -o tmp645dc369/shell32-00000000.spec.o tmp645dc36a/shell32-00000000.spec-00000000.s #0 0x03894ae4 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:13 #1 0x03894eee /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:624:3 #2 0x03892cfe RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:67:5 #3 0x038951bc SignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3 #4 0x24ae93f9 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:303:3 clang: error: unable to execute command: Abort trap clang: error: clang integrated assembler command failed due to signal (use -v to see invocation) FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: i686-unknown-windows-msvc Thread model: posix InstalledDir: /usr/bin clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs. winebuild: /usr/bin/clang failed with status 254 winegcc: ./tools/winebuild/winebuild failed gmake: *** [Makefile:111901: dlls/shell32/i386-windows/shell32.dll] Error 2
(In reply to Damjan Jovanovic from comment #6) This happens on both LLVM 13 and 16.
A git bisect to find what Wine commit broke building newer versions on i386 gives this: ---snip--- 0b3f90ab1485d5bd32bd72d41c7fd8213b3b95b9 is the first bad commit commit 0b3f90ab1485d5bd32bd72d41c7fd8213b3b95b9 Author: Rémi Bernon <rbernon@codeweavers.com> Date: Sat Feb 11 11:05:22 2023 +0100 winebuild: Use .incbin instead of printf for resource data. tools/winebuild/res32.c | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) ---snip---
(In reply to Damjan Jovanovic from comment #8) Using res32.c from ca398e27 in the Wine repo fixes i386 builds. I have it working fine now and there appear to be no issues running any of my current software. Just remember to run wine64 instead of wine. Thanks for finding the issue.
Hey Gerald, I had a go at updating this patch to 8.9, but the build fails at finding wtypes.h, have you had success here? I also noticed that the current patch for GNU configure is on "${WRKSRC}/configure", should that be on "${WRKSRC}/configure.ac" so configure will be updated with the required patch, instead of being overwritten by the GNU build platform? I had a look at updating the Wine ports some months ago when I was exploring MinGW-w64 (I do hope to return to that soon). I was under the impression the Clang build of the PE Code (Wine is moving it's libraries to PE objects over ELF) is natively produced from the Clang tool chain, not the MinGW-w64 tool project? Thanks for the patch too.
Wine now supposedly pays attention to the loader name?, so the wow64 script with the unnaming to .bin etc.. doesn't seem to work anymore.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=af6f5b25dae5b50b05a6b525e64e38370581317b commit af6f5b25dae5b50b05a6b525e64e38370581317b Author: Gerald Pfeifer <gerald@FreeBSD.org> AuthorDate: 2023-07-10 08:49:17 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2023-07-10 08:49:17 +0000 emulators/wine-devel: Remove the STAGING option The Wine Staging patchset is experimental and goes on top of bi-weekly development snapshots of Wine on top of a non-standard (in the world of Wine) operating system. That's a lot of moving parts and has proven too much to reasonably handle and user uptake has been limited at best. Plus upstream has completely reinvented the mechanism to apply this patchset and adjusting to that (and the additional dependencies) would further slow down finally upgrading this port. [1] (files/extra-gitapply was about the previous mechanism around Wine Staging.) PR: 271201 [1] Discussed with: Damjan Jovanovic <damjan.jov@gmail.org> emulators/wine-devel/Makefile | 31 +---------- emulators/wine-devel/distinfo | 4 +- emulators/wine-devel/files/extra-gitapply (gone) | 66 ------------------------ emulators/wine-devel/pkg-plist | 18 ------- 4 files changed, 2 insertions(+), 117 deletions(-)
(In reply to Amar Takhar from comment #9) > Using res32.c from ca398e27 in the Wine repo fixes i386 builds. > I have it working fine now and there appear to be no issues running > any of my current software. Can you extract/create a patch to accomplish this on top of my 8.4 patch here? (In reply to Alastair Hogge from comment #10) > I had a go at updating this patch to 8.9, but the build fails at > finding wtypes.h, have you had success here? I have an update to 8.12 on my disk which I need to refine a bit and will then share here, with the plan to update wine-devel. This port is now more than half a year, and some 13 snapshots, behind. By updating, even if not working (fully), hopefully we can work together to move it forward. For regular use there is still the classic emulators/wine port. > I also noticed that the current patch for GNU configure is on > "${WRKSRC}/configure", should that be on "${WRKSRC}/configure.ac" > so configure will be updated with the required patch, instead of > being overwritten by the GNU build platform? The former is what is used building Wine and this port. It should only be regenerated if the latter is newer. (This is, of course, not a final solution, just gets us going.) > I had a look at updating the Wine ports some months ago when I was exploring > MinGW-w64 (I do hope to return to that soon). I was under the impression th > Clang build of the PE Code (Wine is moving it's libraries to PE objects over > ELF) is natively produced from the Clang tool chain, not the MinGW-w64 tool > project? Yes, this seems to be the direction now, I believe. (In reply to Alexander Vereeken from comment #11) > Wine now supposedly pays attention to the loader name?, so the wow64 > script with the unnaming to .bin etc.. doesn't seem to work anymore. I think we need to align with top of the upstream Wine tree and then, hopefully with the help and minds of volunteers and Damjan, when he becomes available again, sort out 32-bit and others questions - or decide to focus on 64-bit here for now.
(In reply to Gerald Pfeifer from comment #13) Thank you for your answer.
Just short notice, I don't have currently too much time to test it: Wine 8.11, I'm not sure about the next versions, compiles without problems or patches both, 64 and 32 bit on FreeBSD 14 with LLVM 16. I think it is worth to try to compile them on 13.2 with LLVM 16 too. The compiler was updated since the issue was created, so maybe the patch is available in 13.2 too.
Created attachment 243702 [details] Patch to update emulators/wine-devel from 7.x to 8.11 Here is a patch to move to Wine 8.11. Wine 8.12 runs into troubles for yet another new set of reasons, which confirms the point we need to finally get this moving again and work out issues together along the way (instead of waiting for a perfect moment), this being a -devel port after all. I plan to push this in about two weeks - which may be my farewell present for the Wine on FreeBSD ports. (I really do not, and haven't had for years, the time.) Feedback and improvements welcome!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=aa30cdd58163b585c63f5319861ff1c72c791349 commit aa30cdd58163b585c63f5319861ff1c72c791349 Author: Gerald Pfeifer <gerald@FreeBSD.org> AuthorDate: 2023-07-30 21:57:39 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2023-07-30 21:57:39 +0000 emulators/wine7: New port, cloning emulators/wine Wine 8 has been released late last year and we have not seen corresponding updates to wine-devel and the main wine port yet, partly because there's unresolved breakage on FreeBSD/i386. To unstall the situation, create emulators/wine7 as a clone of emulators/wine for those who want/need that version. This will allow moving the latter forward. PR: 272710, 271201 Suggested by: lwhsu emulators/Makefile | 1 + emulators/wine7/Makefile (new) | 162 ++ emulators/wine7/distinfo (new) | 3 + emulators/wine7/files/pkg-message.in (new) | 13 + emulators/wine7/files/pkg32.sh (new) | 20 + emulators/wine7/files/wine-wow64.sh (new) | 58 + emulators/wine7/files/wine.sh (new) | 14 + emulators/wine7/pkg-descr (new) | 15 + emulators/wine7/pkg-plist (new) | 3616 ++++++++++++++++++++++++++++ 9 files changed, 3902 insertions(+)
(In reply to Gerald Pfeifer from comment #16) Heya Gerald, Thanks for the updating the patch again, I am stuck with some problems on my machine that has prevented me from testing, unfortunate. It will be sad to see you move on from the Wine Ports, thanks for your efforts over the years, and especially of recent. I have no idea how I can participate, Wine is a complex system, tho upstream appear to be very helpful, I am not at all clear on the aims of Wine on FreeBSD, how those aims are to be obtained, and I suspect others may be in a similar situation, the Wine fun on FreeBSD has slowed, and even halted at one point (of course until you created this bug report)?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=7b73514fd141265edee67e0d675bc6802990aaaa commit 7b73514fd141265edee67e0d675bc6802990aaaa Author: Gerald Pfeifer <gerald@FreeBSD.org> AuthorDate: 2023-08-13 13:26:25 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2023-08-13 13:29:15 +0000 emulators/wine-devel: Update to Wine 8.11 This includes changes from release candidates of version 8.0 and the actual 8.0 release as well as 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 8.10, and ultimately 8.11, specifically the following: - Bundled vkd3d upgraded to version 1.6. - Vulkan and OpenGL thunking optimizations. - More support for print processors. - Improved joystick control panel. - Long types printf format conversion finished. - Windows version set to Windows 10 for new prefixes. - Many code cleanups that were deferred during code freeze. - Better debug information in Wow64 mode. - Wow64 thunks in the WPCAP library. - Indeo IV50 codec support. - Monitor names set from EDID data. - Support for the Low Fragmentation Heap. - Smard card support using PCSC-Lite. [not enabled] - Bundled Zydis library for more correct disassembly. - Initial step of the Wayland graphics driver. - Cleanups in IME support. - A number of test fixes. - Bundled vkd3d upgraded to version 1.7. - Better error reporting in the IDL compiler. - Support for shared Wow64 Classes registry key. - More cleanups in IME support. - Support for configuring a WinRT dark theme. - Bundled math library from Musl libc. - Improved spool file support in the PostScript driver. - DXBC shader parsing delegated to vkd3d. - More spool file improvements in the PostScript driver. - More work towards full PE support in the PostScript driver. - Initial support for loading ARM64EC modules. - More work on IME restructuration. - Completion of PE conversion in the PostScript driver. - Doppler shift support in DirectSound. - GdiPlus performance improvements. - All PE->Unix transitions go through the syscall interface. - Mouse cursor clipping improvements. - Support for virtual memory placeholders. - Locale and timezone data updates. - More mouse cursor clipping improvements. - Support for TLS alerts. - Increased available address space in WoW64 mode. - Various bug fixes. Now configure --without-pcap since the requirements have changed since upstream commit 032e8d9c362b881a4213c819d1cc6262f2df4b35 on February 7th 2023 and stock FreeBSD does not meet them any longer. Finally, Wine 8.x so far does not appear to work on FreeBSD/i386, so mark as BROKEN. Still better to progress than being stuck. PR: 271201, 272710 emulators/wine-devel/Makefile | 11 ++-- emulators/wine-devel/distinfo | 6 +- emulators/wine-devel/files/patch-configure (new) | 12 ++++ emulators/wine-devel/pkg-plist | 79 +++++++++++++++++++++--- 4 files changed, 92 insertions(+), 16 deletions(-)
Voila! This moves us ahead by some seventeen(!) snapshots and nine months of upstream development work. If you want to help move this and Wine on FreeBSD forward - file a distinct bug report against LLVM based on comment #6 (which is about building on i386), or - see to move this port forward to version 8.12 or 8.13 (on amd64).
(In reply to Gerald Pfeifer from comment #20) So awesome, thank so much.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a9a707cc8f112c79b6d8cbf9ab0f75bd99294cfa commit a9a707cc8f112c79b6d8cbf9ab0f75bd99294cfa Author: Gerald Pfeifer <gerald@FreeBSD.org> AuthorDate: 2023-11-01 12:17:22 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2023-11-01 12:32:50 +0000 emulators/wine-devel: Unbreak on i386 Revert an upstream change to tools/winebuild/res32.c that exposed resource contraints for clang on i386 (cf. the upstream reports at https://github.com/llvm/llvm-project/issues/62339 and https://bugs.winehq.org/show_bug.cgi?id=54889 ). Apply this patch only on i386 to minimize divergence and risk on 64-bit x86. PR: 273987 [1], 271201 [2] Bi-sected by: Damjan Jovanovic <damjan.jov@gmail.com> [2] Motivated by: scf [1] emulators/wine-devel/Makefile | 2 +- .../files/extra-patch-tools-winebuild-res32 (new) | 95 ++++++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8fdba0f4a3ede84338bd09686c554a7e2fdb2acf commit 8fdba0f4a3ede84338bd09686c554a7e2fdb2acf Author: Gerald Pfeifer <gerald@FreeBSD.org> AuthorDate: 2023-12-23 06:53:06 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2023-12-23 07:25:53 +0000 emulators/wine7: Deprecate, to expire 2024-01-29 We created this port to make up for emulators/wine not providing 32-bit support nor WoW64 when we moved to Wine 8. Since then both have been addressed, one after the other, so time to sunset this wine7 port. PR: 271201, 272710, 275677 emulators/wine7/Makefile | 2 ++ 1 file changed, 2 insertions(+)