Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280282 - app-emulation/kvm-kmod-88-r1 fails to build with gentoo-sources-2.6.30-r4
Summary: app-emulation/kvm-kmod-88-r1 fails to build with gentoo-sources-2.6.30-r4
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-04 09:57 UTC by Dragos Delcea
Modified: 2010-04-29 01:57 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dragos Delcea 2009-08-04 09:57:35 UTC
(stable gentoo x86/32) after moving to gentoo-sources-2.6.30-r4 (recently keyworded stable), kvm-kmod-88-r1 no longer builds:
...
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from include/linux/sysdev.h:25,
                 from include/linux/cpu.h:22,
                 from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/../external-module-compat-comm.h:15,
                 from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/external-module-compat.h:16,
                 from <command-line>:0:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:256:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from include/linux/sysdev.h:25,
                 from include/linux/cpu.h:22,
                 from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/../external-module-compat-comm.h:15,
                 from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/external-module-compat.h:16,
                 from <command-line>:0:
include/linux/mmzone.h:290: error: ‘MAX_NR_ZONES’ undeclared here (not in a function)
In file included from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/../external-module-compat-comm.h:312,
                 from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/external-module-compat.h:16,
                 from <command-line>:0:
include/linux/mm.h:446:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:494:62: warning: "NR_PAGEFLAGS" is not defined
In file included from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/../external-module-compat-comm.h:312,
                 from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/external-module-compat.h:16,
                 from <command-line>:0:
include/linux/mm.h:446:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:494:62: warning: "NR_PAGEFLAGS" is not defined
In file included from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/../external-module-compat-comm.h:312,
                 from /var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/external-module-compat.h:16,
                 from <command-line>:0:
include/linux/mm.h:446:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:494:62: warning: "NR_PAGEFLAGS" is not defined
make[3]: *** [/var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/vmx-debug.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [/var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/svm.o] Error 1
make[3]: *** [/var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/vmx.o] Error 1
make[2]: *** [/var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86] Error 2
make[1]: *** [_module_/var/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.30-gentoo-r4'
make: *** [all] Error 2
...



Reproducible: Always

Steps to Reproduce:
1. compile and boot gentoo-sources-2.6.20-r4
2. change /usr/src/linux symlink to point to linux-2.6.30-r4 dir
3. emerge kvm-kmod

Actual Results:  
fail to build

Expected Results:  
succesful build

I can provide additional details on request.
Comment 1 James Earl Spahlinger 2009-08-09 23:56:30 UTC
Please paste the output of 'emerge --info' into a bugzilla comment to assist the maintainers in resolving this issue

Comment 2 Dragos Delcea 2009-08-10 06:27:36 UTC
(In reply to comment #1)
here it is:

Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-i686-Intel-R-_Core-TM-_Duo_CPU_T2400_@_1.83GHz-with-glibc2.0
Timestamp of tree: Mon, 10 Aug 2009 06:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r3
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages noinfo parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="ro en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi alsa bluetooth cdr cups dbus dri hal iconv kdehiddenvisibility mime mmap mmx mmx2 ncurses nls nptl opengl pam pcmcia pulseaudio sse sse2 ssl threads unicode usb x86 xattr xinerama xml zlib" ALSA_CARDS="hda_intel" ALSA_PCM_PLUGINS="plug ioplug dmix adpcm alaw asym copy dshare dsnoop empty extplug file hooks iec958 ladspa lfloat linear meter mulaw multi null rate route share shm softvol mmap_emul" 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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ro en" USERLAND="GNU" VIDEO_CARDS="vesa radeon radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-08-14 09:11:45 UTC
Please attach the build.log file of the failed emerge to this bug, too.
Comment 4 Dragos Delcea 2009-08-15 18:22:27 UTC
actually, I figured this out already.
One has to have CONFIG_KVM_TRACE=y along with CONFIG_KVM=m in 2.6.30 in order for kvm-kmod to compile against it.
at this point, I would suggest assigning the bug to dang@gentoo.org, in order to make kvm-kmod ebuild check for that option (as I presume it does for CONFIG_KVM=m)
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-08-19 15:34:49 UTC
That's not it.  kvm-kmod-88-r1 build for me against 2.6.30-r4 without CONFIG_KVM_TRACE:

[11:33 athena] src# grep KVM linux-2.6.30-gentoo-r4/.config
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
# CONFIG_KVM_AMD is not set
# CONFIG_KVM_TRACE is not set
Comment 6 Dragos Delcea 2009-08-19 21:38:22 UTC
(In reply to comment #5)
> That's not it.  kvm-kmod-88-r1 build for me against 2.6.30-r4 without
> CONFIG_KVM_TRACE:

ok, ok, but I may be getting closer; when 2.6.30-r5 got out, I moved to it, only to find out that kvm-kmod again won't compile even though I used the same config.

now, I'm compiling my kernels using genkernel and supplying the kernel .config; it looks like genkernel cleans after itself (/usr/src/linux/), which is nice, but prevents kvm-kmod from building.

now, just by copying the .config to /usr/src/linux/ and doing a "make oldconfig" before "emerge kvm-kmod" will not work; I had to actually copy the .config, do a "make oldconfig" and a "make" to actually build the kernel - it's only after that the kvm-kmod build completed succesfully.

this must be something new; I certainly didn't have that issue before, and I'm using kvm for a quite a while (by the way, thanks for your work on maintaining those gentoo packages - I really do appreciate it, and I suspect I'm not alone).

Comment 7 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-08-19 23:41:22 UTC
Okay, that makes a lot more sense.  I've never used genkernel (I always build my own).  In 88, the entire build system for kvm changed, so it's quite likely that it broke building without a built kernel.

I'll play with it a bit and see if I can figure out a solution, but I'm going to guess there's no good solution.
Comment 8 Dragos Delcea 2009-08-20 07:20:00 UTC
(In reply to comment #7)
> Okay, that makes a lot more sense.  I've never used genkernel (I always build
> my own).
When I reinstalled (a while back), I discovered that since I was moving to LVM I needed to have a initramfs; since then I started using genkernel.
> 
> I'll play with it a bit and see if I can figure out a solution, but I'm going
> to guess there's no good solution.
now that I think of it, I'm not sure genkernel is the one cleaning the kernel tree; I think I've ran a "make clean" myself.

I'm curious, what is a "make" doing for kvm that a "make oldconfig" is not? It's not like it's using the binaries...

Anyway, I think a warning would be in place: "you need to have the built kernel...".
Comment 9 Michael J Coss 2009-08-24 15:16:34 UTC
Not sure if it's helpful in tracking down the problem or not, but I'm using 2.6.31-r6 (git-sources) which I realize means that any tweaks that were made for gentoo are missing, but the emerge of kvm-kmod-88-r1 fails to build here as well.  I have all the CONFIG_KVM_XXX options set. It fails to compile complaining of missing header files.  I am manually configuring and building the kernel, i.e. not using genkernel.
Comment 10 Dragos Delcea 2009-08-25 07:23:40 UTC
(In reply to comment #9)
> complaining of missing header files.  I am manually configuring and building
> the kernel, i.e. not using genkernel.
..and you haven't ran a "make clean" between compiling the kernel and emerging kvm-kmod, right? seems to make a difference for me.

Anyway, the kernel modules part of kvm has some compatibility glue to compile against a range of kernels, but it is for backward compatibility purposes (ie you can't be forward-compatible with kernels unreleased yet).

I think your best bet would be for you to use the kvm modules your kernel provides, they should be about the same if not newer than kvm-88.
Comment 11 Anton Bolshakov 2009-09-09 01:19:18 UTC
(In reply to comment #6)

> oldconfig" before "emerge kvm-kmod" will not work; I had to actually copy the
> .config, do a "make oldconfig" and a "make" to actually build the kernel - it's
> only after that the kvm-kmod build completed succesfully.

How about running "make prepare" instead of "make"?

ps. it compiles without CONFIG_KVM_TRACE here.
Comment 12 Joe Sapp (RETIRED) gentoo-dev 2009-09-15 20:17:30 UTC
I solved a similar problem by running `make modules_prepare` before being able to compile modules outside of the kernel.
Comment 13 Aidan Marks 2009-09-18 11:16:15 UTC
same here, not compiling with gentoo-sources-2.6.31.

  CC [M]  /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/x86_emulate.o
  CC [M]  /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/../anon_inodes.o
  CC [M]  /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/irq.o
  CC [M]  /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/i8259.o
  CC [M]  /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/lapic.o
  CC [M]  /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/ioapic.o
In file included from /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/mmutrace.h:220,
                 from /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/mmu.c:184:
include/trace/define_trace.h:53:43: error: ./mmutrace.h: No such file or directory
make[3]: *** [/ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/mmu.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/trace.h:355,
                 from /ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/x86.c:83:
include/trace/define_trace.h:53:43: error: arch/x86/kvm/trace.h: No such file or directory
make[3]: *** [/ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86/x86.o] Error 1
make[2]: *** [/ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88/x86] Error 2
make[1]: *** [_module_/ebuild/tmp/portage/app-emulation/kvm-kmod-88-r1/work/kvm-kmod-devel-88] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.31-gentoo'
make: *** [all] Error 2

CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
# CONFIG_KVM_AMD is not set
# CONFIG_KVM_TRACE is not set

Portage 2.2_rc40 (default/linux/amd64/10.0/no-multilib, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31-gentoo x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_950_@_3.07GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 17 Sep 2009 12:45:01 +0000
app-shells/bash:     4.0_p33
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1, 3.1.1
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -msse4 -msse4.1 -msse4.2 -mcx16 -msahf -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -msse4 -msse4.1 -msse4.2 -mcx16 -msahf -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://192.168.100.3 ftp://ftp.iinet.net.au/linux/Gentoo"
LANG="it_IT@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="en_AU en_GB it"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/ebuild/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/devnull /usr/local/portage/layman/x11 /usr/local/portage/layman/sunrise /usr/local/portage/local_overlay"
SYNC="rsync://192.168.100.3/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 asf bash-completion berkdb bitmap-fonts bzip2 cleartype cli cracklib crypt cups dbus dri dts dvd dvdr emacs ethereal exif fam ffmpeg flac fortran ftp gdbm gif gpm hal iconv ipv6 isdnlog java jpeg kde kdehiddenvisibility kerberos ldap live logrotate matroska mmx mmxext mng mp3 mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre perl plasma png pppd python readline reflection samba server session spl sse sse2 sse3 ssl svg sysfs tcpd theora tiff truetype-fonts type1-fonts v4l2 wmf x264 xinerama xinetd xorg xpm xulrunner xvid zlib" ALSA_CARDS="ctxfi" 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 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" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_AU en_GB it" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 14 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-09-21 15:08:58 UTC
I can't maintain kvm anymore.
Comment 15 Anton Bolshakov 2009-09-22 07:13:38 UTC
(In reply to comment #13)
> same here, not compiling with gentoo-sources-2.6.31.
> 

This is a different issue, please open a separate bug report.
See the following link as well:
http://www.mail-archive.com/kvm@vger.kernel.org/msg22580.html
Basically, kvm-kmod has not been released for 2.6.31 yet and kvm-88-r1.ebuild should check it.
Comment 16 Aidan Marks 2009-09-22 07:19:28 UTC
(In reply to comment #15)

yes, that is my thread with Jan :)  I've assisted him in the last few days in getting kvm-kmod git working with 2.6.31.  It now compiles cleanly and they will release for 2.6.31 soon.

will open a request after they release.

thanks
Comment 17 Anton Bolshakov 2009-09-23 03:32:30 UTC
> (In reply to comment #15) 
> yes, that is my thread with Jan :)

Hah. Thanks Aidan for the useful sharing. I've opened a separate bug #286042 with a workaround.

Comment 18 Doug Goldstein (RETIRED) gentoo-dev 2010-04-29 01:57:59 UTC
Closing these since they're out of date and dealing with versions no longer in tree.