Cannot compile 1.1.0

Bug #1008136 reported by Jorge Bastos
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Won't Fix
Undecided
Unassigned

Bug Description

Howdy,

Testing QEMU 1.1.0 but doesn't compile:

  CC fsdev/virtfs-proxy-helper.o
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:28:2: error: unknown type name '__u64'
/usr/include/i386-linux-gnu/asm/sigcontext.h:191:2: error: unknown type name '__u64'
/usr/include/i386-linux-gnu/asm/sigcontext.h:192:2: error: unknown type name '__u64'
/usr/include/i386-linux-gnu/asm/sigcontext.h:193:2: error: unknown type name '__u64'
make: *** [fsdev/virtfs-proxy-helper.o] Error 1

Ideas?
GCC 4.7, kernel 3.2x

Thanks in advanced,
Jorge,

Revision history for this message
Anthony Liguori (anthony-codemonkey) wrote :

What distro/architecture is this? What's the configure command and output from the command?

Revision history for this message
Jorge Bastos (mysql-jorge) wrote :

Debian SID on x86.

Configure output:

Install prefix /usr/local
BIOS directory /usr/local/share/qemu
binary directory /usr/local/bin
library directory /usr/local/lib
include directory /usr/local/include
config directory /usr/local/etc
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /usr/local/src/qemu/qemu-1.1.0
C compiler gcc
Host C compiler gcc
CFLAGS -O2 -g
QEMU_CFLAGS -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
LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m32 -g
make make
install install
python python
smbd /usr/sbin/smbd
host CPU i386
host big endian no
target list i386-softmmu x86_64-softmmu alpha-softmmu arm-softmmu cris-softmmu lm32-softmmu m68k-softmmu microblaze-softmmu microblazeel-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu s390x-softmmu xtensa-softmmu xtensaeb-softmmu i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user microblaze-linux-user microblazeel-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user unicore32-linux-user s390x-linux-user
tcg debug enabled no
Mon debug enabled no
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
-Werror enabled yes
SDL support no
curses support yes
curl support no
mingw32 support no
Audio drivers oss
Extra audio cards ac97 es1370 sb16 hda
Block whitelist
Mixer emulation no
VirtFS support yes
VNC support yes
VNC TLS support no
VNC SASL support no
VNC JPEG support yes
VNC PNG support yes
VNC thread no
xen support no
brlapi support no
bluez support no
Documentation yes
NPTL support yes
GUEST_BASE yes
PIE yes
vde support no
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support yes
TCG interpreter no
fdt support no
preadv support yes
fdatasync yes
madvise yes
posix_madvise yes
uuid support yes
libcap-ng support no
vhost-net support yes
Trace backend nop
Trace output file trace-<pid>
spice support no
rbd support no
xfsctl support no
nss used no
usb net redir no
OpenGL support no
libiscsi support no
build guest agent yes
coroutine backend ucontext
flecha:/usr/local/src/qemu/qemu-1.1.0#

Revision history for this message
Jorge Bastos (mysql-jorge) wrote :

Extra info, the header exists, QEMU doesn't seems to find it, it's on this place:

http://packages.debian.org/search?searchon=contents&keywords=int-ll64.h&mode=exactfilename&suite=stable&arch=any

and provided by linux-libc-dev debian package.

How can I force configure to include this dir?

Revision history for this message
Anthony Liguori (anthony-codemonkey) wrote :

Can you include the output of 'make V=1'?

Do you have custom kernel headers installed? Is it possible that you installed them without sanitizing them first?

Revision history for this message
Jorge Bastos (mysql-jorge) wrote :

What do you mean about custom kernel headers?

The kernel headers are from the debian package "linux-libc-dev"

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:28:2: error: unknown type name '__u64'
/usr/include/i386-linux-gnu/asm/sigcontext.h:191:2: error: unknown type name '__u64'
/usr/include/i386-linux-gnu/asm/sigcontext.h:192:2: error: unknown type name '__u64'
/usr/include/i386-linux-gnu/asm/sigcontext.h:193:2: error: unknown type name '__u64'
make: *** [fsdev/virtfs-proxy-helper.o] Error 1
flecha:/usr/local/src/qemu/qemu-1.1.0#

Revision history for this message
Stefan Weil (ubuntu-weilnetz) wrote :
Download full text (3.3 KiB)

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

Read more...

Revision history for this message
Jorge Bastos (mysql-jorge) wrote :

Hi Stef,

Well, it works OK on another Debian machine, wierd, have to dig to find why.

Thanks for your help!

Ken Sharp (kennybobs)
Changed in qemu:
status: New → Incomplete
Revision history for this message
Thomas Huth (th-huth) wrote :

Since there hasn't been any response to this ticket anymore, I assume the problem has been solved by other means on that machine - or by a newer version of QEMU. So I'm closing this ticket now - if you still got problems, please feel free to open it again.

Changed in qemu:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.