12.2 amd64. Both emulators/wine-devel and emulators/wine-proton fails to build if devel/libsysinfo installed with same error: ====================================== emulators/wine-devel: -------------------------------------- dlls/bluetoothapis/bluetoothapis.spec -Wb,--prefer-native -mno-cygwin dlls/ucrtbase/libucrtbase.a \ -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -L/usr/local/lib/gcc10 /usr/local/bin/ld: dlls/ntdll/unix/virtual.o: in function `virtual_get_system_info': virtual.c:(.text+0x5bff): undefined reference to `sysinfo' collect2: error: ld returned 1 exit status winegcc: /usr/local/bin/gcc10 failed gmake[2]: *** [Makefile:98093: dlls/ntdll/ntdll.so] Error 2 ====================================== emulators/wine-proton -------------------------------------- dlls/ntdll/unix/version.o dlls/winecrt0/libwinecrt0.a libs/port/libwine_port.a -lpthread \ -lprocstat -L/usr/local/lib -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -L/usr/local/lib/gcc10 /usr/local/bin/ld: dlls/ntdll/unix/virtual.o: in function `virtual_get_system_info': virtual.c:(.text+0x4f17): undefined reference to `sysinfo' collect2: error: ld returned 1 exit status winegcc: /usr/local/bin/gcc10 failed gmake[1]: *** [Makefile:96193: dlls/ntdll/ntdll.so] Error 2 ====================================== Last versions compiled without errors was: wine-devel-6.10,1 and wine-proton-6.3.2.
(In reply to VVD from comment #0) > Last versions compiled without errors was: wine-devel-6.10,1 > and wine-proton-6.3.2. Hmm, isn't wine-proton-6.3.2 the current version? Are you saying that one used to work, and now it does not? Is it possible you installed devel/libsysinfo in between? (Maybe we just should add a conflict? To make this work we'd probably need to explicitly link that library.)
(In reply to Gerald Pfeifer from comment #1) Just checked: it was installed as depends for audio/libopenshot-audio month ago. Probably wine never build fine with devel/libsysinfo installed. BTW: $ winecfg wine: could not load ntdll.so: Cannot open "/usr/local/bin/../lib/wine/x86_64-unix/ntdll.so" $ ls /usr/local/bin/../lib/wine/ amd64-unix amd64-windows
Had the same happen but in my case it was because I enabled JACK in devel/sdl20. devel/libsysinfo was then pulled in by audio/jack.
(In reply to VVD from comment #0) > emulators/wine-devel and emulators/wine-proton fails to build if devel/libsysinfo installed Afaik, that was always the case. The easiest way to disable this code would be something like: post-configure: ${ECHO_CMD} "#undef HAVE_SYS_SYSINFO_H" >> ${WRKSRC}/include/config.h ${ECHO_CMD} "#undef HAVE_STRUCT_SYSINFO_MEM_UNIT" >> ${WRKSRC}/include/config.h ${ECHO_CMD} "#undef HAVE_STRUCT_SYSINFO_TOTALRAM" >> ${WRKSRC}/include/config.h and, conversely, if we want to compile it, we'll need to pass -lsysinfo somewhere. (In reply to Gerald Pfeifer from comment #1) > Maybe we just should add a conflict? Conflict doesn't seem appropriate. > To make this work we'd probably need to explicitly link that library. Yep, although it's a tiny library: https://github.com/bsdimp/libsysinfo/blob/master/sysinfo.c.
That may work, but it's a (bit of a crude) hack. Let's keep more of an eye on maintainability and upstream collaboration. I'll see whether I can come up with something.
I'm happy to update libsysinfo in any useful way too... It's better that it's more complete to allow things to drop into FreeBSD than less complete and require lots of crazy ifdefs.
Here is my upstream submission for Wine, which passed my local testing: https://www.winehq.org/pipermail/wine-devel/2021-August/192401.html Thank you very much for the offer, Warner! I did not consider this a libsysinfo issue, which is why I did not reach out to you. In my mind, Wine should be better at detecting whether sysinfo() is really present and usable, which is what my patch should accomplish. (And enhanced version of my patch might try using -lsysinfo and see whether that makes a difference.) One fundamental change we/you could make is pushing sysinfo into src, i.e., make it an integral part of FreeBSD and its libc. That should also address the issue we ran into here and that Jan reported?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=7d6c458605b7075a8bc6d4c0d80605f49f17dd21 commit 7d6c458605b7075a8bc6d4c0d80605f49f17dd21 Author: Gerald Pfeifer <gerald@FreeBSD.org> AuthorDate: 2021-08-12 07:53:10 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2021-08-12 07:57:34 +0000 emulators/wine-devel: Fix build when devel/libsysinfo is present When devel/libsysinfo is present, <sys/sysinfo.h> exists which misleads Wine into enabling some code that invokes the sysinfo function. That one isn't actually available, though, without additional linking parameters (and we don't want to add another dependency at this point anyway), so properly test for sysinfo() before using it. This is a patch of mine that was accepted upstream and should come in via Wine 6.15. PR: 257398 .../files/patch-dlls-ntdll-unix-virtual.c (new) | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+)
Upstream is good now (my patch having been accepted there) and so is emulators/wine-devel per the previous commit. Which leaves emulators/wine-proton, so handing over to Alex...
(In reply to Gerald Pfeifer from comment #9) > Which leaves emulators/wine-proton, so handing over to Alex... What do you expect me do? If that patch applies to emulators/wine-proton it should work there as well. (Well, it seems to.) Or we can simply ignore the issue until the next Proton update, it's ultimately a very niche problem — I don't expect people to run into it often.
Seriously, I want absolutely nothing to do with it. Especially since I'm not a committer and can't push any patches myself. Not to mention that being spammed by the Bugzilla's automation is not very nice.
Yes, this makes sense to be pushed back to quarterly for wine-devel, just I won't be able to do it myself (capacity-wise). Based on iwtcex' response, no action for wine-proton, which should get fixed with a future updates unless someone bothers to patch it locally. wine-devel has been fixed (first locally, then upstream), so closing this.
^Triage: Leave merge quarterly flag un-acked until merged (if/when merged)
*** Bug 258446 has been marked as a duplicate of this bug. ***
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b75f3b5a79927f27605bee328c36d9d7d8b425ec commit b75f3b5a79927f27605bee328c36d9d7d8b425ec Author: Gerald Pfeifer <gerald@FreeBSD.org> AuthorDate: 2021-12-15 21:27:50 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2021-12-15 21:31:35 +0000 emulators/wine: Fix build with devel/libsysinfo present This back ports the patch I pushed upstream and that wine-devel has inherited from there a few months ago. It will go away with the next major release. PR: 257398, 260165 [1] Suggested by: alt2600@icloud.com [1] emulators/wine/files/patch-sysinfo (new) | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)