Incorrect kernel version detection in Makefile. Reproducible: Always Steps to Reproduce: 1. boot with kernel1 2. eselect kernel set kernel2 3. compile kernel2 4. emerge sys-fs/aufs2 or 1. chroot to system with other kernel version 2. emerge sys-fs/aufs2 Actual Results: ... * Installing aufs module Makefile:22: *** incorrect KDIR. Stop. * ERROR: sys-fs/aufs2-0_p20100524 failed: * (no error message) * * Call stack: * ebuild.sh, line 48: Called src_install * environment, line 3503: Called die * The specific snippet of code: * emake DESTDIR="${D}" install || die;
Same error if the kernel build directory is different from the source directory (using KBUILD_OUTPUT in make.conf)
(In reply to comment #0) ive put KDIR=/usr/src/linux as a workaround in /etc/make.conf. then it installs fine.
Please provide your emerge --info and build.log
Created attachment 234571 [details] build.log I have the same when chrooting from SystemRescueCD to a installed gentoo.
Created attachment 234573 [details] emerge --info
I researched a bit. After a failed emerge I did the following: sysresccd taxi # cd /var/tmp/portage/sys-fs/aufs2-0_p20100524/work ysresccd work # grep -rle KDIR * aufs2-standalone/fs/aufs/whout.c aufs2-standalone/fs/aufs/plink.c aufs2-standalone/include/linux/aufs_type.h aufs2-standalone/README aufs2-standalone/Makefile aufs2-util/sample/shwh/README.txt aufs2-util/auchk aufs2-util/plink.c aufs2-util/README aufs2-util/c2tmac.c aufs2-util/c2sh.c aufs2-util/aubrsync aufs2-util/aufs.in.5 aufs2-util/Makefile aufs2-util/aufs.5 aufs2-util/etc_default_aufs In aufs2-util/Makefile it looks for the KDIR variable and only overwrites it when it doesn't exits but: sysresccd work # head -2 aufs2-standalone/Makefile KDIR = /lib/modules/$(shell uname -r)/build Of course uname -r tells the name or the kernel currently running. I hope this helps a bit :)
I have just committed a fix to that version, it should be on your local rsync server in a few hours, if the issue remains, please comment and reopen this bug.