Fails to build with "spice" useflag enabled, builds fine without "spice". >>> Emerging (1 of 1) app-emulation/qemu-kvm-0.15.0 * qemu-kvm-0.15.0.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/3.0.1-gentoo/build * Found sources for kernel version: * 3.0.1-gentoo >>> Unpacking source... >>> Unpacking qemu-kvm-0.15.0.tar.gz to /var/tmp/portage/app-emulation/qemu-kvm-0.15.0/work >>> Source unpacked in /var/tmp/portage/app-emulation/qemu-kvm-0.15.0/work >>> Preparing source in /var/tmp/portage/app-emulation/qemu-kvm-0.15.0/work/qemu-kvm-0.15.0 ... * Applying qemu-0.11.0-mips64-user-fix.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-emulation/qemu-kvm-0.15.0/work/qemu-kvm-0.15.0 ... * Building the following softmmu targets: i386-softmmu x86_64-softmmu * Building the following user targets: i386-linux-user x86_64-linux-user Install prefix /usr BIOS directory /usr/share/qemu binary directory /usr/bin library directory /usr/lib config directory /etc Manual directory /usr/share/man ELF interp prefix /usr/gnemul/qemu-%M Source path /var/tmp/portage/app-emulation/qemu-kvm-0.15.0/work/qemu-kvm-0.15.0 C compiler x86_64-pc-linux-gnu-gcc Host C compiler x86_64-pc-linux-gnu-gcc CFLAGS -O2 -g -O2 -pipe -march=native QEMU_CFLAGS -m64 -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/spice-server -I/usr/include/pixman-1 -I/usr/include/alsa -I/usr/include/spice-1 -I$(SRC_PATH)/libcacard -I/usr/include/nss -I/usr/include/nspr LDFLAGS -Wl,--warn-common -m64 -g -Wl,-z,execheap -Wl,-O1 -Wl,--as-needed make make install install python python host CPU x86_64 host big endian no target list i386-softmmu x86_64-softmmu i386-linux-user x86_64-linux-user tcg debug enabled no Mon debug enabled no gprof enabled no sparse enabled no strip binaries no profiler no static build no -Werror enabled no SDL support yes curses support yes curl support yes check support no mingw32 support no Audio drivers sdl pa alsa oss Extra audio cards ac97 es1370 sb16 hda Block whitelist Mixer emulation no VNC support yes VNC TLS support yes VNC SASL support no VNC JPEG support yes VNC PNG support yes VNC thread yes xen support no CPU emulation yes brlapi support no bluez support yes Documentation yes NPTL support yes GUEST_BASE yes PIE user targets no vde support no IO thread yes Linux AIO support yes ATTR/XATTR support yes Install blobs yes KVM support yes KVM PIT support yes KVM device assig. yes fdt support no preadv support yes fdatasync yes madvise yes posix_madvise yes uuid support yes vhost-net support yes Trace backend nop Trace output file trace-<pid> spice support yes rbd support no xfsctl support no nss used yes usb net redir no OpenGL support yes build guest agent yes >>> Source configured. >>> Compiling source in /var/tmp/portage/app-emulation/qemu-kvm-0.15.0/work/qemu-kvm-0.15.0 ... make -j4 GEN i386-softmmu/config-devices.mak GEN x86_64-softmmu/config-devices.mak GEN i386-linux-user/config-devices.mak GEN x86_64-linux-user/config-devices.mak GEN config-all-devices.mak GEN qemu-options.texi GEN qemu-monitor.texi GEN qemu-img-cmds.texi GEN qemu-tech.html GEN qemu-nbd.8 GEN QMP/qmp-commands.txt GEN config-host.h GEN trace.h GEN qemu-options.def GEN qapi-generated/qga-qapi-visit.h GEN trace.c GEN qemu-img-cmds.h GEN qemu-doc.html AS optionrom/multiboot.o AS optionrom/linuxboot.o AS optionrom/extboot.o AS optionrom/vapic.o GEN qemu.1 Building optionrom/multiboot.img Building optionrom/linuxboot.img Building optionrom/extboot.img Building optionrom/vapic.img Building optionrom/multiboot.raw Building optionrom/linuxboot.raw Building optionrom/extboot.raw Building optionrom/vapic.raw Signing optionrom/multiboot.bin GEN qemu-img.1 Signing optionrom/linuxboot.bin Signing optionrom/extboot.bin Signing optionrom/vapic.bin GEN qapi-generated/qga-qapi-types.h GEN qapi-generated/qga-qmp-marshal.c CC qapi/qapi-visit-core.o In file included from qapi/qapi-visit-core.c:14:0: ./qapi/qapi-visit-core.h:31:57: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:32:36: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:34:54: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:35:63: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:36:34: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:39:59: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:41:66: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:42:64: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:43:64: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:45:25: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:49:28: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:50:38: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:53:44: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:54:36: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:55:1: warning: no semicolon at end of struct or union [enabled by default] ./qapi/qapi-visit-core.h:58:43: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:59:35: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:61:56: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:62:35: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:63:53: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:64:62: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:65:33: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:67:27: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:68:37: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:70:58: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:71:65: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:72:63: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:73:63: error: unknown type name ‘Error’ ./qapi/qapi-visit-core.h:74:67: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:17:43: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:24:35: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:32:56: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:39:35: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:46:53: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:53:62: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:62:33: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:70:27: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:77:37: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:85:58: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:92:65: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:99:63: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:106:63: error: unknown type name ‘Error’ qapi/qapi-visit-core.c:113:67: error: unknown type name ‘Error’ make: *** [qapi/qapi-visit-core.o] Błąd 1 make: *** Oczekiwanie na niezakończone zadania.... rm extboot.img vapic.o multiboot.o extboot.o linuxboot.raw linuxboot.img vapic.raw vapic.img multiboot.raw extboot.raw multiboot.img linuxboot.o emake failed * ERROR: app-emulation/qemu-kvm-0.15.0 failed (compile phase): * emake failed
"Error" is defined in error.h in the root of the qemu src tree. qapi-types-core.h tries to include this using '#include "error.h"', but because there is a -I/usr/include/alsa on the compiler commandline it ends up including /usr/include/alsa/error.h instead, at least that is what happens in a manual build with --enable-spice and -save-temps in CFLAGS. I have not yet figured out where -I/usr/include/alsa comes from (the alsa check in qemu itself really should not be adding this, as alsaaudio.c quite sensibly includes <alsa/asoundlib.h> instead of just asoundlib.h). I think the right fix will involve not getting -I/usr/include/alsa included.
Ok, this is slightly less simple than I thought. It slips in through: $ pkg-config --cflags spice-protocol spice-server -I/usr/include/spice-server -I/usr/include/pixman-1 -I/usr/include/alsa -I/usr/include/spice-1 And it's in there because spice-server.pc has "alsa" in its "Requires:" (presumably correct), and alsa.pc has: # -I${includedir}/alsa below is just for backward compatibility # (it was set so mistakely in the older version) Cflags: -I${includedir} -I${includedir}/alsa So I think the correct fix would involve getting alsa to drop that backwards compatibility hack (likely a good idea anyway, as there are files like conf.h and global.h in there), but for now the workaround for qemu-kvm might need to be stuffing a -I. into the compiler flags somewhere early (manually hacking this in gets me past the failure).
Created attachment 283123 [details, diff] hack around the bogus include path The attached hack at least gets it to compile. A better solution may exist, though. Use at your own risk.
Fix is in spice, upstream: http://cgit.freedesktop.org/spice/spice/commit/?h=0.8&id=54c660470a5aea19f799c5574cc0d4a707696712 Applying this in spice-0.8.2 and eautoreconf'ing fix this for me.
Yes, that is a better fix (and not just because it is in some upstream already). CC-ing the spice maintainer hoping he'll apply it :)
*** Bug 379073 has been marked as a duplicate of this bug. ***
*** Bug 379871 has been marked as a duplicate of this bug. ***
Upstream tagged spice-0.9.1 and spice-protocol-0.9.0 ten days ago. I just bumped the ebuilds in a local overlay, with a minor change to the spice-protocol ebuild to remove a patch that was being applied because of this issue. Things compiled without a problem. I might not have time to do proper testing to verify that everything is working properly. Would someone else be able to verify that there are no runtime issues introduced by doing this?
Created attachment 285733 [details] spice-0.8.2.ebuild (In reply to comment #4) > Fix is in spice, upstream: > http://cgit.freedesktop.org/spice/spice/commit/?h=0.8&id=54c660470a5aea19f799c5574cc0d4a707696712 > > Applying this in spice-0.8.2 and eautoreconf'ing fix this for me. Same here. Here's an ebuild for this...
Created attachment 285735 [details, diff] spice-deps.patch ...and the patch.
*** Bug 383293 has been marked as a duplicate of this bug. ***
Fixed in 0.8.2-r1. Sorry for the delay, thanks for the help. 0.9.* will be added soon, but p.masked since it is the unstable development tree of spice.