Comment 6 for bug 1008136

Revision history for this message
Stefan Weil (ubuntu-weilnetz) wrote :

I just compiled QEMU 1.1.0 on a fresh i386 installation of Debian Sid with the same configuration
which you used (well, nearly the same - I did not build the documentation).

Compilation of fsdev/virtfs-proxy-helper.c works without any error message.

/usr/include/i386-linux-gnu/asm/sigcontext.h uses __u32 and __u64, but you got only error messages
for __u64. That indicates that __u32 was defined. If you want to see were it was defined, you can
modify /usr/include/i386-linux-gnu/asm/sigcontext.h (after making a backup copy):

* Add wrong typedefs for __u32 and __u64 starting in line 23:
  typedef int __u32;
  typedef int __u64;

* Run gcc with fsdev/virtfs-proxy-helper.c (see your previous mail).

Here is what I get:

# gcc -I/usr/local/src/qemu/qemu-1.1.0/slirp -I. -I/usr/local/src/qemu/qemu-1.1.0 -I/usr/local/src/qemu/qemu-1.1.0/fpu -Werror -fPIE -DPIE -m32 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -I/usr/include/libpng12 -pthread -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/local/src/qemu/qemu-1.1.0/include -MMD -MP -MT fsdev/virtfs-proxy-helper.o -MF fsdev/virtfs-proxy-helper.d -O2 -g -c -o fsdev/virtfs-proxy-helper.o fsdev/virtfs-proxy-helper.c
In file included from /usr/include/i386-linux-gnu/bits/sigcontext.h:28:0,
                 from /usr/include/signal.h:339,
                 from ./qemu-common.h:38,
                 from fsdev/virtfs-proxy-helper.c:23:
/usr/include/i386-linux-gnu/asm/sigcontext.h:23:13: error: conflicting types for '__u32'
In file included from /usr/include/asm-generic/types.h:7:0,
                 from /usr/include/i386-linux-gnu/asm/types.h:4,
                 from /usr/include/linux/types.h:4,
                 from /usr/include/sys/capability.h:24,
                 from fsdev/virtfs-proxy-helper.c:15:
/usr/include/asm-generic/int-ll64.h:26:22: note: previous declaration of '__u32' was here
In file included from /usr/include/i386-linux-gnu/bits/sigcontext.h:28:0,
                 from /usr/include/signal.h:339,
                 from ./qemu-common.h:38,
                 from fsdev/virtfs-proxy-helper.c:23:
/usr/include/i386-linux-gnu/asm/sigcontext.h:24:13: error: conflicting types for '__u64'
In file included from /usr/include/asm-generic/types.h:7:0,
                 from /usr/include/i386-linux-gnu/asm/types.h:4,
                 from /usr/include/linux/types.h:4,
                 from /usr/include/sys/capability.h:24,
                 from fsdev/virtfs-proxy-helper.c:15:
/usr/include/asm-generic/int-ll64.h:30:42: note: previous declaration of '__u64' was here

Of course there are errors now (there should be conflicting types for __u32 and __u64, but I guess you will
get only one of those). The error messages also tell the source of the original (correct) definition.
In my case, it was /usr/include/asm-generic/int-ll64.h:26:22 and /usr/include/asm-generic/int-ll64.h:30:42.

Please try these instructions and compare your with my compiler output.