[Bug 41117] New: Fails to build on hurd and kfreebsd

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Aug 10 17:30:01 CDT 2016


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 at winehq.org
          Reporter: jre.winesim at gmail.com
                CC: michael at 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=hurd-i386&ver=1.9.15-1&stamp=1469253468

Build log kfreebsd-i386:
https://buildd.debian.org/status/fetch.php?pkg=wine-development&arch=kfreebsd-i386&ver=1.9.15-1&stamp=1469253097
~~~~~
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 at 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 at fds-team.de>
    Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
    Signed-off-by: Alexandre Julliard <julliard at 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=ac42e3de90ebf4b921035893e3670da63cad882c

Greets
jre

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list