Source code of nvidia-drivers has some mistakes. I don't know what's going on but I've got similar problem like there: http://www.linuxinsight.com/nvidia-linux-driver-100.14.11-and-linux-kernel-2.6.23.html I found that patch (http://www.linuxinsight.com/files/nvidia-fix.patch) has been included to Gentoo portage for nvidia-drivers-100.xx but not for 1.0.7185 and 1.0.9639. Log of that problem is included in 'Actual Results' section. Description of this problem (in Polish) is here: http://forums.gentoo.org/viewtopic-p-4548293.html Reproducible: Always Steps to Reproduce: 1. Simply try to compile x11-drivers/nvidia-drivers-1.0.7185 or 1.0.9639 with any 2.6.23 kernel. Actual Results: # emerge nvidia-drivers Calculating dependencies... done! >>> Verifying ebuild Manifests... >>> Emerging (1 of 1) x11-drivers/nvidia-drivers-1.0.7185 to / * NVIDIA-Linux-x86-1.0-7185-pkg0.run MD5 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * checking NVIDIA-Linux-x86-1.0-7185-pkg0.run ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.6.23-gentoo-r2 * Checking for MTRR support ... [ ok ] >>> Unpacking source... Creating directory NVIDIA-Linux-x86-1.0-7185-pkg0 Verifying archive integrity... OK Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-7185........................................................................ * Applying NVIDIA_glx-defines.patch ... [ ok ] * Applying NVIDIA_glx-glheader.patch ... [ ok ] * Converting Makefile.kbuild to use M= instead of SUBDIRS= ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv ... * Preparing nvidia module NVIDIA: calling KBUILD... make CC=i686-pc-linux-gnu-gcc KBUILD_VERBOSE=1 -C /usr/src/linux M=/var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv modules test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \ echo; \ echo " ERROR: Kernel configuration is invalid."; \ echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \ echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo; \ /bin/false) mkdir -p /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/.tmp_versions rm -f /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/.tmp_versions/* make -f scripts/Makefile.build obj=/var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv echo \#define NV_COMPILER \"`i686-pc-linux-gnu-gcc -v 2>&1 | tail -n 1`\" > /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv_compiler.h i686-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/.nv.o.d -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -pipe -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=pentium3 -mtune=generic -ffreestanding -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -Iinclude/asm-i386/mach-generic -Iinclude/asm-i386/mach-default -fomit-frame-pointer -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -I/var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wno-multichar -Werror -O -fno-common -MD -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=7185 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -UDEBUG -U_DEBUG -DNDEBUG -DNV_SIGNAL_STRUCT_RLIM -DNV_MULTIPLE_BRIDGE_AGPGART_PRESENT -DNV_PCI_GET_CLASS_PRESENT -DNV_PM_MESSAGE_T_PRESENT -DNV_PCI_CHOOSE_STATE_PRESENT -DNV_VM_INSERT_PAGE_PRESENT -DNV_REMAP_PFN_RANGE_PRESENT -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_VMAP_4_PRESENT -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)" -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.o /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:93: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c: In function 'nvos_create_alloc': /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:392: error: 'nv_pte_t_cache' undeclared (first use in this function) /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:392: error: (Each undeclared identifier is reported only once /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:392: error: for each function it appears in.) /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c: In function 'nvos_free_alloc': /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:429: error: 'nv_pte_t_cache' undeclared (first use in this function) /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c: In function 'nvidia_init_module': /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:1332: error: 'nv_pte_t_cache' undeclared (first use in this function) /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:1332: error: too many arguments to function 'kmem_cache_create' /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:1466: error: void value not ignored as it ought to be /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c: In function 'nvidia_exit_module': /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:1491: error: void value not ignored as it ought to be /var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.c:1596: error: 'nv_pte_t_cache' undeclared (first use in this function) make[3]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv/nv.o] Error 1 make[2]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/work/NVIDIA-Linux-x86-1.0-7185-pkg0/usr/src/nv] Error 2 NVIDIA: left KBUILD. nvidia.ko failed to build! make[1]: *** [module] Error 1 make: *** [module] Error 2 * * ERROR: x11-drivers/nvidia-drivers-1.0.7185 failed. * Call stack: * ebuild.sh, line 1762: Called dyn_compile * ebuild.sh, line 891: Called qa_call 'src_compile' * ebuild.sh, line 35: Called src_compile * environment, line 3552: Called linux-mod_src_compile * environment, line 2634: Called die * The specific snippet of code: * emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} || diefunc "$FUNCNAME" "$LINENO" "$?" "Unable to make ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}."; * The die message: * Unable to make IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/usr/src/linux clean module. * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/temp/build.log'. * * Messages for package x11-drivers/nvidia-drivers-1.0.7185: * * ERROR: x11-drivers/nvidia-drivers-1.0.7185 failed. * Call stack: * ebuild.sh, line 1762: Called dyn_compile * ebuild.sh, line 891: Called qa_call 'src_compile' * ebuild.sh, line 35: Called src_compile * environment, line 3552: Called linux-mod_src_compile * environment, line 2634: Called die * The specific snippet of code: * emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} || diefunc "$FUNCNAME" "$LINENO" "$?" "Unable to make ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}."; * The die message: * Unable to make IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/usr/src/linux clean module. * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-1.0.7185/temp/build.log'. Expected Results: To adapt and apply that patch: http://www.linuxinsight.com/files/nvidia-fix.patch Adapting that patch is too difficult to me. Sorry for my English, because this isn't my native language.
*** This bug has been marked as a duplicate of bug 186490 ***