When emerging ati-drivers-8.8.25-r3 against gentoo-sources-2.4.28-r2, an error occurs: * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.4.28-gentoo-r2 * Using KV_OBJ=o * X11 implementation is xorg-x11. >>> Unpacking source... >>> Unpacking fglrx_6_8_0-8.8.25-1.i386.rpm >>> Source unpacked. * Building the DRM module... ATI module generator V 2.0 ========================== initializing... Error: kernel includes at /usr/src/linux/include do not match current kernel. they are versioned as "2.4.28-gentoo-r2" instead of "". you might need to adjust your symlinks: - /usr/include - /usr/src/linux Reproducible: Always Steps to Reproduce: 1. run a 2.4 gentoo-sources kernel 2. emerge media-video/ati-drivers-8.8.25-r3 3. pick up the pieces Actual Results: Build fails Expected Results: Build succeeds The relevant portion of make.log (deep inside the work directory) has this: ATI module generator V 2.0 ========================== initializing... build_date =Wed Jan 26 23:11:11 EST 2005 uname -a =Linux chef.neosouth.net 2.4.28-gentoo-r2 #2 Sun Nov 28 10:42:17 EST 2004 i686 AMD Athlon(tm) XP 2100+ AuthenticAMD GNU/Linux uname -s =Linux uname -m =i686 uname -r = uname -v =#2 Sun Nov 28 10:42:17 EST 2004 uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video) Note that uname -r is supposed to be the kernel version. There is a sed expression in the ebuild: sed -e 's:`id -u`:0:' \ -e 's:`uname -r`:${KV_FULL}:' \ -i make.sh Therefore, it seems that ${KV_FULL} is a null string. The kernel-2.eclass seems to use ${KV_FULL}, and linux-info.eclass seems to set it, and seems to be echoing out the "Found sources for kernel version:" line above, so something seems to be nuking it between pkg_setup and src_compile. Removing this part of the sed expression: -e 's:`uname -r`:${KV_FULL}:' \ seems to fix it; at least the build runs to normal completion. I think emerge info would waste your time, but I'll attach it upon request.
The resulting build after removing that part of the sed expression seems to work fine (just a quick test of doom3). I don't know if that breaks the build for other kernel trees, though.
*** This bug has been marked as a duplicate of 78870 ***