Skip to contentSkip to conversation

current kvm userspace git doesn't compile on i386

DISCUSSION Christoph Hellwig 2 participants 5 messages Jan 12, 2008 – Jan 15, 2008 3 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

Current kvm userspace git configured with ./configure --prefix=/opt/kvm --with-patched-kernel --qemu-cc=/usr/bin/gcc-3.4 gives:

/usr/bin/gcc-3.4 -L /home/hch/work/kvm-userspace/qemu/../libkvm -g -o qemu-system-x86_64 vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o migration.o block-raw-posix.o lsi53c895a.o usb-ohci.o eeprom93xx.o eepro100.o ne2000.o pcnet.o rtl8139.o hypercall.o virtio.o virtio-net.o virtio-blk.o ide.o pckbd.o ps2.o vga.o sb16.o es1370.o dma.o fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o usb-uhci.o vmmouse.o vmport.o vmware_vga.o extboot.o gdbstub.o ../libqemu_common.a libqemu.a /home/hch/work/kvm-userspace/qemu/../libkvm/libkvm.a -lm -lz -lkvm -lgnutls -L/usr/lib -lSDL -lrt -lpthread -lutil
libqemu.a(kvm-tpr-opt.o): In function `enable_vapic':
/home/hch/work/kvm-userspace/qemu/kvm-tpr-opt.c:221: undefined reference to kvm_enable_vapic' libqemu.a(kvm-tpr-opt.o): In function kvm_tpr_opt_setup':
/home/hch/work/kvm-userspace/qemu/kvm-tpr-opt.c:287: undefined reference to `kvm_enable_tpr_access_reporting'
collect2: ld returned 1 exit status
make[2]: *** [qemu-system-x86_64] Error 1
make[2]: Leaving directory
`/home/hch/work/kvm-userspace/qemu/x86_64-softmmu'
make[1]: *** [subdir-x86_64-softmmu] Error 2
make[1]: Leaving directory `/home/hch/work/kvm-userspace/qemu'
make: *** [qemu] Error 2

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

#2 lore raw
In reply to a message not in the archive
Quoted 15 lines · Christoph Hellwig

Current kvm userspace git configured with ./configure --prefix=/opt/kvm --with-patched-kernel --qemu-cc=/usr/bin/gcc-3.4 gives:

/usr/bin/gcc-3.4 -L /home/hch/work/kvm-userspace/qemu/../libkvm -g -o qemu-system-x86_64 vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o migration.o block-raw-posix.o lsi53c895a.o usb-ohci.o eeprom93xx.o eepro100.o ne2000.o pcnet.o rtl8139.o hypercall.o virtio.o virtio-net.o virtio-blk.o ide.o pckbd.o ps2.o vga.o sb16.o es1370.o dma.o fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o usb-uhci.o vmmouse.o vmport.o vmware_vga.o extboot.o gdbstub.o ../libqemu_common.a libqemu.a /home/hch/work/kvm-userspace/qemu/../libkvm/libkvm.a -lm -lz -lkvm -lgnutls -L/usr/lib -lSDL -lrt -lpthread -lutil
libqemu.a(kvm-tpr-opt.o): In function `enable_vapic':
/home/hch/work/kvm-userspace/qemu/kvm-tpr-opt.c:221: undefined reference to kvm_enable_vapic' libqemu.a(kvm-tpr-opt.o): In function kvm_tpr_opt_setup':
/home/hch/work/kvm-userspace/qemu/kvm-tpr-opt.c:287: undefined reference to `kvm_enable_tpr_access_reporting'
collect2: ld returned 1 exit status
make[2]: *** [qemu-system-x86_64] Error 1
make[2]: Leaving directory
`/home/hch/work/kvm-userspace/qemu/x86_64-softmmu'
make[1]: *** [subdir-x86_64-softmmu] Error 2
make[1]: Leaving directory `/home/hch/work/kvm-userspace/qemu'
make: *** [qemu] Error 2

Try to build the kernel modules too (remove '--with-patched-kernel' from ./configure arguments ):
./configure --prefix=/opt/kvm --qemu-cc=/usr/bin/gcc-3.4 ; make -C kernel LINUX=<path-to-linux-git-tree> sync; make
You will have to rmmod current kvm modules and insmod the built modules under <KVMDIR>/kernel.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

#4 lore raw
In reply to a message not in the archive
Quoted 6 lines · Uri Lublin

Try to build the kernel modules too (remove '--with-patched-kernel' from ./configure arguments ):
./configure --prefix=/opt/kvm --qemu-cc=/usr/bin/gcc-3.4 ; make -C kernel LINUX=<path-to-linux-git-tree> sync; make
You will have to rmmod current kvm modules and insmod the built modules under <KVMDIR>/kernel.

This doesn't work with rsync complaining. But I don't really want new kernel code anyway, and I would be very surprised if building a different kernel would fix a userspace link error given the obvious boundary between kernel and userspace code.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

#6 lore raw
In reply to a message not in the archive
Quoted 10 lines · Christoph Hellwig
Quoted 7 lines · Uri Lublin

Try to build the kernel modules too (remove '--with-patched-kernel' from ./configure arguments ):
./configure --prefix=/opt/kvm --qemu-cc=/usr/bin/gcc-3.4 ; make -C kernel LINUX=<path-to-linux-git-tree> sync; make
You will have to rmmod current kvm modules and insmod the built modules under <KVMDIR>/kernel.

Quoted 5 lines

This doesn't work with rsync complaining. But I don't really want new kernel code anyway, and I would be very surprised if building a different kernel would fix a userspace link error given the obvious boundary between kernel and userspace code.

I'm not suggesting to build the whole kernel, just the kvm-modules (instead of using the kvm-modules that came with linux).
It seems that your current kvm modules know nothing about vapic, while your kvm-userspace assumes they do.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

#7 lore raw
In reply to a message not in the archive
Quoted 6 lines · Uri Lublin

Try to build the kernel modules too (remove '--with-patched-kernel' from ./configure arguments ):
./configure --prefix=/opt/kvm --qemu-cc=/usr/bin/gcc-3.4 ; make -C kernel LINUX=<path-to-linux-git-tree> sync; make
You will have to rmmod current kvm modules and insmod the built modules under <KVMDIR>/kernel.

A ./configure --prefix=/opt/kvm --kerneldir=/home/hch/work/linux-2.6-xfs gives the same error as in my first post. Your suggestion (./configure --prefix=/opt/kvm --qemu-cc=/usr/bin/gcc-3.4;
make -C kernel/ LINUX=/home/hch/work/linux-2.6-xfs) gives the following:

make[4]: *** No rule to make target /home/hch/work/kvm-userspace/kernel/svm.o', needed by /home/hch/work/kvm-userspace/kernel/kvm.o'. Stop.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/