Sometime after March 16, 2010, qemu-kvm-9999 (upstream git) build started failing with a compile error. A bug was filed with upstream (see bug URL), but upstream reports compilation without error. Attaching build.log and emerge --info, perhaps something with gentoo config is different from upstream's expected environment. Reproducible: Always
Created attachment 229161 [details] build.log
Created attachment 229163 [details] emerge --info
Forgot to describe the compile error: ... CC arm-softmmu/syborg_rtc.o /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c: In function ‘main’: /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3290: error: ‘kvm_irqchip’ undeclared (first use in this function) /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3290: error: (Each undeclared identifier is reported only once /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3290: error: for each function it appears in.) /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3291: error: ‘kvm_pit’ undeclared (first use in this function) /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3299: error: ‘kvm_pit_reinject’ undeclared (first use in this function) /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3303: error: lvalue required as left operand of assignment make[1]: *** [vl.o] Error 1 make: *** [subdir-mips-softmmu] Error 2 make: *** Waiting for unfinished jobs.... CC arm-softmmu/syborg_virtio.o CC arm-softmmu/arch_init.o CC arm-softmmu/cpus.o CC arm-softmmu/monitor.o CC arm-softmmu/pci.o CC arm-softmmu/machine.o CC arm-softmmu/gdbstub.o CC arm-softmmu/vl.o CC arm-softmmu/virtio-blk.o /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c: In function ‘main’: /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3290: error: ‘kvm_irqchip’ undeclared (first use in this function) /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3290: error: (Each undeclared identifier is reported only once /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3290: error: for each function it appears in.) /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3291: error: ‘kvm_pit’ undeclared (first use in this function) /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3299: error: ‘kvm_pit_reinject’ undeclared (first use in this function) /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/vl.c:3303: error: lvalue required as left operand of assignment make[1]: *** [vl.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [subdir-arm-softmmu] Error 2
Created attachment 232625 [details] build.log Update current build.log as of 2010-05-23.
Created attachment 232627 [details] emerge --info Update for current as of 2010-05-23.
I'm still experiencing the problem: CC i386-softmmu/e1000.o In file included from /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/gdbstub.c:38: /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/qemu-kvm.h:815: error: expected ‘)’ before ‘start_addr’ /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/qemu-kvm.h:818: error: expected ‘)’ before ‘start_addr’ /var/tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/qemu-kvm.h:820: error: expected ‘)’ before ‘start’ make[1]: *** [gdbstub.o] Error 1 make: *** [subdir-i386-linux-user] Error 2 make: *** Waiting for unfinished jobs.... CC i386-softmmu/exec.o I'm aware of bug 318413. Is there a consensus to merge these bugs as duplicates. I find the workarounds mentioned there have no effect. Can this be fixed with a patch to qemu-kvm.h, or is there C-preprocessor manipulation that's causing this?
I'm currently hitting the first issue in this bug, but not the second.
Per conversation on IRC #kvm, I have pared down my QEMU options in /etc/make.conf, and have been building qemu-kvm-9999 since. QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="" It's unfortunate that the build system doesn't handle all cases, though. If I summarize the information conveyed there correctly, the QEMU_USER_TARGET is not applicable for kvm in the case of 64-bit hardware supporting vmx. Other cases actually fall back to qemu: jfkw| Hi, Gentoo Linux is having an issue building qemu-kvm git master with its system package. For the newb, what is the difference between a softmmu target and a user target? We seem to build OK "target list x86_64-softmmu" but "target list x86_64-softmmu x86_64-linux-user" will fail with bug http://sourceforge.net/tracker/?func=detail&atid=893831&aid=2984626&group_id=180599. iggy| jfkw: with qemu-kvm, you only want to build x86_64-softmmu iggy| -user targets are for userspace emulation (i.e. not emulating an entire system) jfkw| iggy: thanks, that clears things up quite a bit. OK, I'm on amd64 linux, but if I want 32-bit guests, I still only need x86_64-softmmu ? iggy| yeah, well, an x86_64 cpu can run 32bit code right? jfkw| iggy: Right, I was just checking for purposes of resource efficiency, several 32-bit guests on one machine, didn't know if there would be a memory savings with the i386 target. iggy| no, the x86_64-softmmu target is the only one that utilizes kvm, so using anything else is like qemu murb| iggy: hmm x86_64-softmmu will happily boot a 32b kernel. iggy| that's what I said
I'm getting the same error from a "clean" git clone when running the following: ./configure --prefix=/usr --disable-strip --enable-kvm --enable-nptl --enable-uuid --enable-linux-user --extra-ldflags=-Wl,-z,execheap --sysconfdir=/var/tmp/portage/app-emulation/qemu-kvm-9999/image/etc --enable-linux-aio --disable-bluez --disable-curl --disable-fdt --disable-xen --disable-darwin-user --disable-bsd-user --audio-drv-list="sdl alsa oss" --target-list=" i386-softmmu arm-softmmu cris-softmmu m68k-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu ppc-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu x86_64-softmmu mips64-softmmu mips64el-softmmu ppcemb-softmmu i386-linux-user arm-linux-user cris-linux-user m68k-linux-user microblaze-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user alpha-linux-user armeb-linux-user ppc64abi32-linux-user sparc32plus-linux-user" --cc=x86_64-pc-linux-gnu-gcc --host-cc=x86_64-pc-linux-gnu-gcc make So I'll check with upstream about this.
I've queried upstream on #kvm and iggy explained that at this point qemu-kvm should only be used to build kvm and that the only supported target is x86_64-softmmu. I'm going to update the ebuild to reflect that.
Please sync and test with the updated ebuild. I restricted the targets per the previous comment.