Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 425418 - app-emulation/qemu-kvm-1.1.1 with QEMU_SOFTMMU_TARGETS="arm": build fails (../libhw32/virtio-pci.o: In function `virtio_pci_set_guest_notifiers': virtio-pci.c:(.text+0xaf7): undefined reference to `kvm_kernel_irqchip')
Summary: app-emulation/qemu-kvm-1.1.1 with QEMU_SOFTMMU_TARGETS="arm": build fails (.....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords:
: 426516 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-09 08:25 UTC by jannis
Modified: 2012-07-24 14:05 UTC (History)
8 users (show)

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


Attachments
emerge --info qemu-kvm (einfo,19.93 KB, text/plain)
2012-07-09 08:26 UTC, jannis
Details
build.log (build.log,25.17 KB, text/plain)
2012-07-09 08:26 UTC, jannis
Details
my used Kernel Config (kernel-3.4.config,86.25 KB, text/plain)
2012-07-09 12:45 UTC, Delete ME
Details
build.log on AMD64 Hardened (build.log,27.01 KB, text/plain)
2012-07-09 12:48 UTC, Delete ME
Details
emerge-info (emerge-info.txt,5.61 KB, text/plain)
2012-07-21 00:14 UTC, Marko D
Details
build log - failed to build with undefined reference to `kvm_kernel_irqchip' (build.log,81.40 KB, text/plain)
2012-07-21 00:15 UTC, Marko D
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jannis 2012-07-09 08:25:25 UTC
app-emulation/qemu-kvm-1.1.0 fails on ~amd64.

build.log and emerge --info follows

Reproducible: Always
Comment 1 jannis 2012-07-09 08:26:05 UTC
Created attachment 317666 [details]
emerge --info qemu-kvm

emerge --info qemu-kvm
Comment 2 jannis 2012-07-09 08:26:28 UTC
Created attachment 317668 [details]
build.log
Comment 3 Delete ME 2012-07-09 12:45:21 UTC
Created attachment 317686 [details]
my used Kernel Config

Hardened Sources 3.4.4-r1
Comment 4 Delete ME 2012-07-09 12:46:40 UTC
I can confirm the issue on AMD64 Hardened

notebook ~ # emerge --info
Portage 2.1.10.65 (hardened/linux/amd64, gcc-4.5.3, glibc-2.14.1-r3, 3.4.4-hardened-r1-v1 x86_64)
=================================================================
System uname: Linux-3.4.4-hardened-r1-v1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Mon, 09 Jul 2012 10:45:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ rsync://mirror.netcologne.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://ftp-stud.hs-esslingen.de/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync1.de.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 apng bash-completion berkdb bluetooth branding bzip2 cairo cdr clamav cli consolekit cracklib crypt css cups cxx dbus device-mapper dri dts dvd dvdr encode exif extras ffmpeg firefox flac fontconfig ftp gdbm gdu gif gnutls gpm gtk gudev gzip hardened hwdb iconv icu ieee1394 imap imlib ipc ipv6 java java6 javascript jpeg jpeg2k justify lame llvm lm_sensors lock lvm lzma lzo mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses networkmanager nls nptl nsplugin ogg openal opengl openmp pam pax_kernel pcmcia pcre pdf perl png policykit posix pppd python qemu quicktime raw readline sdl session smp sna sockets socks5 sound speex sse sse2 sse3 sse4_1 ssl ssse3 startup-notification subversion svg syslog-ng tcpd theora threads thunar tiff truetype udev unicode urandom usb vaapi virt-network vorbis wifi wmf x264 xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

notebook ~ # emerge -pav qemu-kvm

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ~] app-emulation/qemu-kvm-1.1.0 [1.0.1-r1] USE="aio alsa bluetooth curl ncurses opengl python%* sdl vhost-net -brltty -debug -doc% -fdt -pulseaudio (-rbd) -sasl -smartcard -spice -static -tci% -tls -usbredir -vde -xattr -xen -xfs% (-qemu-ifup%) (-test%) (-threads%*)" QEMU_SOFTMMU_TARGETS="arm i386 x86_64 -alpha% -cris -m68k -microblaze -microblazeel% -mips -mips64 -mips64el -mipsel -ppc -ppc64 -ppcemb -s390x% -sh4 -sh4eb -sparc -sparc64 -xtensa% -xtensaeb%" QEMU_USER_TARGETS="arm i386 x86_64 -alpha -armeb -cris -m68k -microblaze -microblazeel% -mips -mipsel -ppc -ppc64 -ppc64abi32 -s390x% -sh4 -sh4eb -sparc -sparc32plus -sparc64 -unicore32%" 0 kB

Total: 1 package (1 upgrade), Size of downloads: 0 kB
Comment 5 Delete ME 2012-07-09 12:48:38 UTC
Created attachment 317688 [details]
build.log on AMD64 Hardened
Comment 6 Göktürk Yüksek archtester gentoo-dev 2012-07-10 17:56:18 UTC
Can you check if Bug 425498 also solves your problem?
Comment 7 jannis 2012-07-10 18:27:00 UTC
(In reply to comment #6)
> Can you check if Bug 425498 also solves your problem?

The warnings mentioned there don't have to do anything with the build failure and the fix commited by flameeyes "only" fixes the spurious warning, not the compilation error:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-1.1.0.ebuild?r1=1.8&r2=1.9
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2012-07-10 18:38:54 UTC
I unfortunately can't confirm this. Its possible you built this while the package was masked before all the patches were integrated in.

Please try again with a new emerge --sync.
Comment 9 Delete ME 2012-07-11 07:17:28 UTC
OK the issue still persist even after a new "emerge --sync". But i was able to compile it after i removed the "arm" target from "QEMU_SOFTMMU_TARGETS" and "QEMU_USER_TARGETS" in "/etc/make.conf".

I also searched the internet for the issue and found (http://lists.fedoraproject.org/pipermail/scm-commits/2012-July/812985.html) but i don't know if it's related to the issue. 
My set/not set virtio options in the kernel.

xyz@notebook ~ $ grep -i virtio /boot/kernel-3.4.config
CONFIG_NET_9P_VIRTIO=y
CONFIG_VIRTIO_BLK=y
CONFIG_SCSI_VIRTIO=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_HW_RANDOM_VIRTIO=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_RING=y
# Virtio drivers
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_MMIO=y
Comment 10 Juergen Rose 2012-07-11 11:34:55 UTC
I have the same behavior as Steven. If "arm" is included in QEMU_SOFTMMU_TARGETS
and QEMU_USER_TARGETS, 'emerge qemu-kvm' fails, if it is removed, it compiles.


My VIRTIO settings are much easier:

root@wildcat:/root(16)# grep -i virtio /usr/src/linux/.config
# Virtio drivers
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_BALLOON is not set
# CONFIG_VIRTIO_MMIO is not set
Comment 11 jannis 2012-07-11 11:38:15 UTC
Updated title since I also have arm in QEMU_SOFTMMU_TARGETS. Didn't test if it works without.
Comment 12 jannis 2012-07-11 11:39:13 UTC
reverted status. seems to work with arm-support disabled but is definitely an error with arm enabled.
Comment 13 Göktürk Yüksek archtester gentoo-dev 2012-07-11 13:24:06 UTC
Could this[0] be related?

[0] http://www.spinics.net/lists/kvm/msg75406.html
Comment 14 Robert Piasek (RETIRED) gentoo-dev 2012-07-16 14:39:22 UTC
http://git.qemu.org/?p=qemu.git;a=patch;h=bbf3b80401d55ac3339160cefa17f0015317f512

fixes the problem for me.
Comment 15 Doug Goldstein (RETIRED) gentoo-dev 2012-07-16 22:07:13 UTC
Fixed in qemu-kvm-1.1.1
Comment 16 vltg0903 2012-07-17 00:05:52 UTC
Nope.

../libhw32/virtio-pci.o: In function `virtio_pci_set_guest_notifiers':
virtio-pci.c:(.text+0xaf7): undefined reference to `kvm_kernel_irqchip'
virtio-pci.c:(.text+0xb4c): undefined reference to `kvm_kernel_irqchip'
../libhw32/msi.o: In function `msi_init':
msi.c:(.text+0x727): undefined reference to `kvm_kernel_irqchip'
../libhw32/msi.o: In function `msi_uninit':
msi.c:(.text+0x8a8): undefined reference to `kvm_kernel_irqchip'
../libhw32/msi.o: In function `msi_reset':
msi.c:(.text+0x978): undefined reference to `kvm_kernel_irqchip'
../libhw32/msi.o:msi.c:(.text+0xc60): more undefined references to `kvm_kernel_irqchip' follow
collect2: ld returned 1 exit status
make[1]: *** [qemu-system-arm] Error 1
make: *** [subdir-arm-softmmu] Error 2
 * ERROR: app-emulation/qemu-kvm-1.1.1 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-kvm-1.1.1'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-kvm-1.1.1'`.
 * The complete build log is located at '/var/log/portage/app-emulation:qemu-kvm-1.1.1:20120716-234848.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1/work/qemu-kvm-1.1.1'
 * S: '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1/work/qemu-kvm-1.1.1'

>>> Failed to emerge app-emulation/qemu-kvm-1.1.1, Log file:
Comment 17 Torsten Kaiser 2012-07-17 18:13:43 UTC
Same error for me. but with target arch ppc64 instead of arm:
  LINK  ppc64-softmmu/qemu-system-ppc64
../libhw64/msix.o: In function `msix_free_irq_entries':
msix.c:(.text+0x1cf): undefined reference to `kvm_kernel_irqchip'
../libhw64/msix.o: In function `msix_init':
msix.c:(.text+0x497): undefined reference to `kvm_kernel_irqchip'
../libhw64/msix.o: In function `msix_notify':
msix.c:(.text+0x987): undefined reference to `kvm_kernel_irqchip'
../libhw64/msix.o: In function `msix_mmio_write':
msix.c:(.text+0xbfa): undefined reference to `kvm_kernel_irqchip'
../libhw64/msix.o: In function `msix_vector_use':
msix.c:(.text+0x116b): undefined reference to `kvm_kernel_irqchip'
../libhw64/msix.o:msix.c:(.text+0x130f): more undefined references to `kvm_kernel_irqchip' follow
collect2: ld returned 1 exit status
make[1]: *** [qemu-system-ppc64] Error 1
Comment 18 Marko D 2012-07-21 00:14:24 UTC
Created attachment 318776 [details]
emerge-info
Comment 19 Marko D 2012-07-21 00:15:36 UTC
Created attachment 318778 [details]
build log - failed to build with undefined reference to `kvm_kernel_irqchip'
Comment 20 Marko D 2012-07-21 00:16:40 UTC
The error still persist after updating to app-emulation/qemu-kvm-1.1.1.
emerge --info : attached
build.log : attached
Comment 21 jannis 2012-07-21 06:54:22 UTC
Indeed, not fixed with -1.1.1
Comment 22 Torsten Kaiser 2012-07-21 08:47:49 UTC
While vanilla qemu-kvm-1.1.1.ebuild still fails for me, adding the patch that is linked from comment #13 into /etc/portage/patches/app-emulation/qemu-kvm-1.1.1 works for me.
Comment 23 Doug Goldstein (RETIRED) gentoo-dev 2012-07-21 19:29:33 UTC
Should be fixed with qemu-kvm-1.1.1-r1 in CVS.
Comment 24 Doug Goldstein (RETIRED) gentoo-dev 2012-07-24 14:05:58 UTC
*** Bug 426516 has been marked as a duplicate of this bug. ***