https://bugs.winehq.org/show_bug.cgi?id=41117
Bug ID: 41117 Summary: Fails to build on hurd and kfreebsd Product: Wine Version: 1.9.15 Hardware: x86 URL: https://bugs.debian.org/833956 OS: FreeBSD Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: jre.winesim@gmail.com CC: michael@fds-team.de Regression SHA1: d0832cdf428696e2c08b1aa27382baad4d1e376f
Since 1.9.15 Wine fails to build on hurd-i386 and kfreebsd-i386 . It built successfully before.
Wine 1.8.3 still builds successfully.
Build log for hurd-i386: https://buildd.debian.org/status/fetch.php?pkg=wine-development&arch=hur...
Build log kfreebsd-i386: https://buildd.debian.org/status/fetch.php?pkg=wine-development&arch=kfr... ~~~~~ gcc -c -o virtual.o virtual.c -I. -I../../include -D__WINESRC__ -D_NTSYSTEM_ -D_REENTRANT -fPIC -Wall \ -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \ -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith \ -Wlogical-op -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -Werror -Wdate-time -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wno-error virtual.c: In function 'virtual_get_system_info': virtual.c:1363:20: error: storage size of 'sinfo' isn't known struct sysinfo sinfo; ^ virtual.c:1372:10: warning: implicit declaration of function 'sysinfo' [-Wimplicit-function-declaration] if (!sysinfo(&sinfo)) ^ virtual.c:1363:20: warning: unused variable 'sinfo' [-Wunused-variable] struct sysinfo sinfo; ^ Makefile:711: recipe for target 'virtual.o' failed ~~~~~
This should be because of:
commit d0832cdf428696e2c08b1aa27382baad4d1e376f Author: Michael Müller michael@fds-team.de Date: Fri Jul 8 05:40:22 2016 +0200
ntdll: Use sysinfo to report correct number of physical pages.
Signed-off-by: Michael Müller michael@fds-team.de Signed-off-by: Sebastian Lackner sebastian@fds-team.de Signed-off-by: Alexandre Julliard julliard@winehq.org
I reported this in Debian (https://bugs.debian.org/833956) and got a reply from a hurd guy: ~~~~~ sysinfo(2) is strictly specific to Linux.
Headers in sys/ and bits/ usually are implementations for the platform; since sys/sysinfo.h is not standard, you cannot assume that it exists only on a platform, nor what it provides. In this case, the upstream check is wrong: it should not check for sys/sysinfo.h and assume it's a Linux-ish implementation, but either: a) just limit the implementation to Linux unconditionally (as in the busybox code b) check for sys/sysinfo.h *and* sysinfo() in it Considering sysinfo() is not portable anyway, (b) might fail one day if a platform provide a different implementation with the same name (it's not standard after all). ~~~~~
There was a similar busybox bug (https://bugs.debian.org/677254), which got fixed by: https://git.busybox.net/busybox/commit/?id=ac42e3de90ebf4b921035893e3670da63...
Greets jre
https://bugs.winehq.org/show_bug.cgi?id=41117
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #1 from Sebastian Lackner sebastian@fds-team.de --- Created attachment 55325 --> https://bugs.winehq.org/attachment.cgi?id=55325 Proposed fix
Does this patch fix the issue?
https://bugs.winehq.org/show_bug.cgi?id=41117
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Summary|Fails to build on hurd and |Insufficient check for |kfreebsd |sysinfo function breaks | |build on hurd and kfreebsd
https://bugs.winehq.org/show_bug.cgi?id=41117
Jens Reyer jre.winesim@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jre.winesim@gmail.com
--- Comment #2 from Jens Reyer jre.winesim@gmail.com --- Thanks for the quick answer. So that's solution b), which might break someday.
I'll commit it and report after the next build (probably 1.7.17, I don't have access to a porter box just yet).
https://bugs.winehq.org/show_bug.cgi?id=41117
--- Comment #3 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Jens Reyer from comment #2)
Thanks for the quick answer. So that's solution b), which might break someday.
In my opinion its always better to test the functionality instead of the operating system. If it breaks because of name conflicts, the code can still be updated at some later time.
I'll commit it and report after the next build (probably 1.7.17, I don't have access to a porter box just yet).
I decided to submit the patch and it already got accepted: http://source.winehq.org/git/wine.git/patch/9815806f16441004b87b11e3c0bbc190... Please report back if the issue is fixed for you or if further changes are required.
https://bugs.winehq.org/show_bug.cgi?id=41117
Jens Reyer jre.winesim@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #4 from Jens Reyer jre.winesim@gmail.com --- I can now confirm this fixes the build failures. 1.9.17 just built successfully again on hurd-i386 and kfreebsd-i386.
Thanks Sebastian!
https://bugs.winehq.org/show_bug.cgi?id=41117
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |9815806f16441004b87b11e3c0b | |bc190e9011044
https://bugs.winehq.org/show_bug.cgi?id=41117
--- Comment #5 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Jens Reyer from comment #4)
I can now confirm this fixes the build failures. 1.9.17 just built successfully again on hurd-i386 and kfreebsd-i386.
Thanks Sebastian!
No problem, glad that it works :)
https://bugs.winehq.org/show_bug.cgi?id=41117
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.18.