[pkg-wine-party] Bug#833956: wine-development: FTBFS on hurd-i386 and kfreebsd-i386

Pino Toscano pino at debian.org
Wed Aug 10 20:41:09 UTC 2016


Hi,

In data mercoledì 10 agosto 2016 22:20:10 CEST, Jens Reyer ha scritto:
> ~~~~~
> 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
> ~~~~~

sysinfo(2) is strictly specific to Linux.

> The code is only called conditionally (ifdef HAVE_SYS_SYSINFO_H).
> 
> It has "include <sys/sysinfo.h>", which is provided in:
> /usr/include/i386-gnu/sys/sysinfo.h           libc0.3-dev [hurd-i386] 
> /usr/include/i386-kfreebsd-gnu/sys/sysinfo.h  libc0.1-dev [kfreebsd-i386] 
> 
> However "totalram" and "mem_unit" are only in:
> /usr/include/linux/sysinfo.h                  linux-libc-dev
> 
> So sysinfo.h exists on hurd/kfreebsd, but doesn't provide everything
> necessary!? Is there a fix for this, or should we disable this code
> on hurd/kfreebsd explicitly? Or am I on a completely wrong track here?

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).

Hope it helps -- feel free to ask more.

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-wine-party/attachments/20160810/f022f263/attachment.sig>


More information about the pkg-wine-party mailing list