nvidia-drivers-71.86.07 (legacy) fails to compile on kernel 2.6.28 with a 'cannot find kernel sources' error. Further testing reveals that it's looking for headers in /usr/linux/include/asm (which is a symlink to asm-<arch>) which are now located at /usr/linux/arch/<arch>/include/asm. After symlinking the headers from linux/arch/<arch>/include/asm/* to linux/include/asm/* , the driver compiles and runs properly. Reproducible: Always Steps to Reproduce: 1. Have a system with kernel 2.6.28 running. 2. Attempt to emerge nvidia-drivers-71.86.07. Will fail. 3. `cd /usr/src/linux/include/asm-<arch> && ln -s ../../arch/<arch>/include/asm/* .` Replace <arch> with your arch (/usr/src/linux/include/asm points to asm-<arch>). This is an ugly hack. 4. nvidia-drivers-71.86.07 should build (and run) fine now. Actual Results: make -j2 HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.28-gentoo/build HOST_CC=i686-pc-linux-gnu-gcc clean module If you are using a Linux 2.4 kernel, please make sure you either have configured kernel sources matching your kernel or the correct set of kernel headers installed on your system. If you are using a Linux 2.6 kernel, please make sure you have configured kernel sources matching your kernel installed on your system. If you specified a separate output directory using either the "KBUILD_OUTPUT" or the "O" KBUILD parameter, make sure to specify this directory with the SYSOUT environment variable or with the equivalent nvidia-installer command line option. Depending on where and how the kernel sources (or the kernel headers) were installed, you may need to specify their location with the SYSSRC environment variable or the equivalent nvidia-installer command line option. *** Unable to determine the target kernel version. *** make: *** [select_makefile] Error 1 Expected Results: Module should have compiled properly.
http://www.nvnews.net/vbulletin/showpost.php?p=1821409&postcount=11
Same here. Kernel is gentoo-sources-2.6.28-r1 and hitchhiker-sources-2.6.28-r1. nvidia-drivers is 71.86.07. The hack given in the original post works as a temporary solution. The patch linked to in Comment #1 doesn't apply.
71.86.08 which is now in tree fixes this issues plus a few other incompatibilities with newer kernels.