After installing sys-kernel/gentoo-sources-3.3.8 I cannot emerge x11-drivers/nvidia-drivers-96.43.20 on x86: >>> Emerging (1 of 1) x11-drivers/nvidia-drivers-96.43.20 * NVIDIA-Linux-x86-96.43.20-pkg0.run SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/3.3.8-gentoo/build * Found sources for kernel version: * 3.3.8-gentoo * Checking for MTRR support ... [ ok ] >>> Unpacking source... >>> Unpacking NVIDIA-Linux-x86-96.43.20-pkg0.run to /var/tmp/portage/x11-drivers/nvidia-drivers-96.43.20/work/NVIDIA-Linux-x86-96.43.20-pkg0 >>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-96.43.20/work >>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-96.43.20/work/NVIDIA-Linux-x86-96.43.20-pkg0 ... * Applying NVIDIA_glx-defines.patch ... [ ok ] * Applying NVIDIA_glx-glheader.patch ... [ ok ] * Converting NVIDIA-Linux-x86-96.43.20-pkg0/usr/src/nv/Makefile.kbuild to use M= instead of SUBDIRS= ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/x11-drivers/nvidia-drivers-96.43.20/work/NVIDIA-Linux-x86-96.43.20-pkg0 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-96.43.20/work/NVIDIA-Linux-x86-96.43.20-pkg0 ... * Preparing nvidia module 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/3.3.8-gentoo/build 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. *** This is because conftest.sh in /var/tmp/portage/x11-drivers/nvidia-drivers-96.43.20/work/NVIDIA-Linux-x86-96.43.20-pkg0/usr/src/nv cannot compile: #include <linux/version.h> #include <linux/utsname.h> #if defined(TEST_2_4) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) #error \"!KERNEL_2_4\" #endif #if defined(TEST_2_6_OR_3) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) #error \"!KERNEL_2_6_OR_3\" #endif" > conftest$$.c This reason is: # i686-pc-linux-gnu-gcc -O2 -D__KERNEL__ -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/include -I/usr/src/linux/include/asm-i386/mach-default -I/usr/src/linux/include/asm-x86/mach-default -I/usr/src/linux/arch/x86/include/asm/mach-default -I/lib/modules/3.3.8-gentoo/build/include2 -I/lib/modules/3.3.8-gentoo/build/include -I/usr/src/linux/include -include /lib/modules/3.3.8-gentoo/build/include/generated/autoconf.h -I/usr/src/linux/arch/x86/include -DTEST_2_6_OR_3 -c conftest11221.c In file included from /lib/modules/3.3.8-gentoo/build/include/linux/unistd.h:7:0, from /usr/src/linux/arch/x86/include/asm/seccomp_32.h:4, from /usr/src/linux/arch/x86/include/asm/seccomp.h:2, from /lib/modules/3.3.8-gentoo/build/include/linux/seccomp.h:8, from /lib/modules/3.3.8-gentoo/build/include/linux/sched.h:80, from /lib/modules/3.3.8-gentoo/build/include/linux/utsname.h:35, from conftest11221.c:5: /usr/src/linux/arch/x86/include/asm/unistd.h:7:29: fatal error: asm/unistd_32.h: No such file or directory compilation terminated. The problem is in /usr/src/linux/arch/x86/include/asm/unistd.h if __KERNEL__ is defined: #ifndef _ASM_X86_UNISTD_H #define _ASM_X86_UNISTD_H 1 #ifdef __KERNEL__ # ifdef CONFIG_X86_32 # include <asm/unistd_32.h> # define __ARCH_WANT_IPC_PARSE_VERSION # define __ARCH_WANT_STAT64 # define __ARCH_WANT_SYS_IPC # define __ARCH_WANT_SYS_OLD_MMAP # define __ARCH_WANT_SYS_OLD_SELECT # else # include <asm/unistd_64.h> # define __ARCH_WANT_COMPAT_SYS_TIME # endif # define __ARCH_WANT_OLD_READDIR # define __ARCH_WANT_OLD_STAT # define __ARCH_WANT_SYS_ALARM # define __ARCH_WANT_SYS_FADVISE64 # define __ARCH_WANT_SYS_GETHOSTNAME # define __ARCH_WANT_SYS_GETPGRP # define __ARCH_WANT_SYS_LLSEEK # define __ARCH_WANT_SYS_NICE # define __ARCH_WANT_SYS_OLDUMOUNT # define __ARCH_WANT_SYS_OLD_GETRLIMIT # define __ARCH_WANT_SYS_OLD_UNAME # define __ARCH_WANT_SYS_PAUSE # define __ARCH_WANT_SYS_RT_SIGACTION # define __ARCH_WANT_SYS_RT_SIGSUSPEND # define __ARCH_WANT_SYS_SGETMASK # define __ARCH_WANT_SYS_SIGNAL # define __ARCH_WANT_SYS_SIGPENDING # define __ARCH_WANT_SYS_SIGPROCMASK # define __ARCH_WANT_SYS_SOCKETCALL # define __ARCH_WANT_SYS_TIME # define __ARCH_WANT_SYS_UTIME # define __ARCH_WANT_SYS_WAITPID /* * "Conditional" syscalls * * What we want is __attribute__((weak,alias("sys_ni_syscall"))), * but it doesn't work on all toolchains, so we just do it by hand */ # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") #else # ifdef __i386__ # include <asm/unistd_32.h> # else # include <asm/unistd_64.h> # endif #endif #endif /* _ASM_X86_UNISTD_H */ The asm/unistd_32.h does not exist in "standard" path anymore. It has been moved to arch/x86/include/generated: # find /usr/src/linux-3.3.8-gentoo/ -name unistd_32.h /usr/src/linux-3.3.8-gentoo/arch/sh/include/asm/unistd_32.h /usr/src/linux-3.3.8-gentoo/arch/x86/include/generated/asm/unistd_32.h /usr/src/linux-3.3.8-gentoo/tools/perf/util/include/asm/unistd_32.h Either the -D__KERNEL__ should be removed (I don't this so), or the kernel headers should be fixed.
I had the same issue after installing 3.3.8. I created the attached patches based on <http://weltall.heliohost.org/wordpress/2012/01/20/linux-kernel-3-3-rc1-and-nvidia-drivers/>. These are the steps I followed to get this working on my system. (1) Put 'nvidia-drivers-96.43.20-kernel-3.3.8-bug-427202.patch' in '/usr/portage/x11-drivers/nvidia-drivers/files'. (2) Put 'nvidia-drivers-96.43.20-r1.ebuild' in '/usr/portage/x11-drivers/nvidia-drivers'. ('nvidia-drivers-96.43.20.ebuild.patch' shows my changes from 'nvidia-drivers-96.43.20.ebuild'.) (3) Run 'ebuild /usr/portage/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20-r1.ebuild manifest'. (4) Remerge nvidia-drivers.
Created attachment 318920 [details, diff] Patch for nvidia-drivers-96.43.20.
Created attachment 318922 [details] New ebuild to take advantage of patch.
Created attachment 318924 [details, diff] Patch to ebuild.
The patch works for me.
Created attachment 319882 [details] successful-build.log I've tested -r1 ebuild with the patch both with 3.2.21-gentoo and 3.3.8-gentoo on x86.
I recently switched from nouveau to nvidia while running the 3.3.8-gentoo kernel and encountered the same problem which was fixed by the patch given here
Not sure whether I should open a new bug? I installed testing branch(kernel-3.5.0) on a Dell Inspiron 8000 with Geforce2 MX graphics. Having found nouveau would not work I tried nvidia-96.43.20 and applied this patch, however it still failed and I had to apply the workaround found here https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/993506 All works well now, but there should be a better way I imagine?
Unfortunately the x86 arch stabilization is slacking and once the newer version is stable this problem would be solved.
Should be fixed since the newer version is stable.