Since kernel-v3.7-rc1, version.h has moved from "${KV_OUT_DIR}/include/linux/version.h" to "${KV_OUT_DIR}/include/generated/uapi/linux/version.h" However, in linux-info.eclass, the check_kernel_built()-function still looks in the old path. This breaks the builds for out-of-tree modules (and other builds calling this function). Proposed solution: Conditionally check different paths depending on kernel version. Reproducible: Always Steps to Reproduce: 1. Build kernel >= 3.7-rc1 2. emerge virtualbox-modules or any other out-of-tree module against this kernel Actual Results: Emerge dies with error: * These sources have not yet been prepared. * We cannot build against an unprepared tree. * To resolve this, please type the following: * * # cd /usr/src/linux * # make oldconfig * # make modules_prepare Expected Results: Module builds without problem #emerge --info Portage 2.1.11.27 (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.7.0-rc1 x86_64) ================================================================= System uname: Linux-3.7.0-rc1-x86_64-AMD_Athlon-tm-_II_X3_445_Processor-with-gentoo-2.2 Timestamp of tree: Thu, 18 Oct 2012 23:30:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 3.1.8 [enabled] app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.12 dev-lang/python: 2.7.3-r2, 3.2.3-r1 dev-util/ccache: 3.1.8 dev-util/cmake: 2.8.9-r1 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.10.5 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.6, 1.12.4 sys-devel/binutils: 2.22.90 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.6 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo x-portage mozilla sunrise jxh mistafunk daks proaudio ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=amdfam10 -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="-j4 --load-average=2.85 --quiet n --quiet-build y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs candy ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://ftp.ds.karen.hj.se/gentoo/" LANG="sv_SE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="sv en en_GB" MAKEOPTS="-j4 -l2.95" PKGDIR="/usr/portage/" 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 /var/lib/layman/mozilla /var/lib/layman/sunrise /var/lib/layman/jxh /var/lib/layman/mistafunk /var/lib/layman/daks /var/lib/layman/pro-audio" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X a52 aac acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cleartype cli colord consolekit corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam fbcondecor ffmpeg firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 hddtemp iconv icu ipv6 java javascript jpeg kerberos lcms ldap libnotify lm_sensors mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pppd pulseaudio qt3 qt3support qt4 readline sdl session smp socialweb spell sse sse2 ssl startup-notification svg tcpd tiff truetype type1 udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xcb xml xv xvid zlib zsh-completion" 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="authn_core authz_core socache_shmcb unixd 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 proxy proxy_ajp proxy_balancer proxy_ftp proxy_http proxy_scgi" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="gensplash plymouth" ELIBC="glibc" FOO2ZJS_DEVICES="hp1018" 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="sv en en_GB" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" 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
Created attachment 327002 [details, diff] Make check_kernel_built() look in different paths for version.h depending on kernel version The coding style might be off, change if necessary.
With the patch virtualbox-modules compiles for you with 3.7 git kernels?
No, it doesn't but that's because of an unrelated issue found in this bug: https://bugs.gentoo.org/show_bug.cgi?id=438518 . Applying that patch too and it compiles fine! I should have used a better example of a module that broke. Sorry for that. net-misc/r8168-8.032.00 compiles with no issues after applying the eclass patch.
(In reply to comment #3) > No, it doesn't but that's because of an unrelated issue found in this bug: > https://bugs.gentoo.org/show_bug.cgi?id=438518 . Applying that patch too and > it compiles fine! ok, just checking. Thanks for the working example.
Thanks, for the patch. + 22 Oct 2012; Michael Pagano <mpagano@gentoo.org> linux-info.eclass: + Update for new location of version.h. Thanks to Magnus Helmersson. Bug + #438876 +