Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317205 - qemu-kvm-9999: vl.c undeclared functions, compile error, upstream reports OK
Summary: qemu-kvm-9999: vl.c undeclared functions, compile error, upstream reports OK
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jorge Manuel B. S. Vicetto
URL: http://sourceforge.net/tracker/?func=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-26 01:29 UTC by Jeff Kowalczyk
Modified: 2010-06-12 05:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,18.64 KB, text/plain)
2010-04-26 01:30 UTC, Jeff Kowalczyk
Details
emerge --info (emergeinfo.txt,4.62 KB, text/plain)
2010-04-26 01:31 UTC, Jeff Kowalczyk
Details
build.log (build.log,13.67 KB, text/plain)
2010-05-23 18:50 UTC, Jeff Kowalczyk
Details
emerge --info (emergeinfo.txt,4.82 KB, text/plain)
2010-05-23 18:51 UTC, Jeff Kowalczyk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Kowalczyk 2010-04-26 01:29:39 UTC
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
Comment 1 Jeff Kowalczyk 2010-04-26 01:30:42 UTC
Created attachment 229161 [details]
build.log
Comment 2 Jeff Kowalczyk 2010-04-26 01:31:35 UTC
Created attachment 229163 [details]
emerge --info
Comment 3 Jeff Kowalczyk 2010-04-26 01:32:44 UTC
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
Comment 4 Jeff Kowalczyk 2010-05-23 18:50:01 UTC
Created attachment 232625 [details]
build.log

Update current build.log as of 2010-05-23.
Comment 5 Jeff Kowalczyk 2010-05-23 18:51:00 UTC
Created attachment 232627 [details]
emerge --info

Update for current as of 2010-05-23.
Comment 6 Jeff Kowalczyk 2010-05-23 18:53:27 UTC
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?
Comment 7 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-06-10 20:30:52 UTC
I'm currently hitting the first issue in this bug, but not the second.
Comment 8 Jeff Kowalczyk 2010-06-10 23:16:02 UTC
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
Comment 9 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-06-11 11:59:12 UTC
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.
Comment 10 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-06-12 04:01:55 UTC
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.
Comment 11 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-06-12 05:22:29 UTC
Please sync and test with the updated ebuild.
I restricted the targets per the previous comment.