I'm running kernel linux-2.6.7-ck6 with /usr/src/linux correctly symlinked. emerge nvidia-kernel reports.. Calculating dependencies ...done! >>> emerge (1 of 1) media-video/nvidia-kernel-1.0.6111 to / x86 >>> md5 src_uri ;-) NVIDIA-Linux-x86-1.0-6111-pkg1.run x86 x86 >>> Unpacking source... * /usr/src/linux is a symbolic link * Determining the real directory of the Linux kernel source code * Building for Linux 2.6.7-ck6 found in /usr/src/linux * which outputs to /usr/src/linux * By not using the kernel's ability to output to an alternative * directory, some external module builds may fail. * See <insert link to user doc here> Creating directory NVIDIA-Linux-x86-1.0-6111-pkg1 Verifying archive integrity... OK Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-6111.......................................................................................................................................................................................................... >>> Source unpacked. x86 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 appropriate nvidia-installer command line option. *** Unable to determine the target kernel version. *** make: *** [select_makefile] Error 1 !!! ERROR: media-video/nvidia-kernel-1.0.6111 failed. !!! Function src_compile, Line 87, Exitcode 2 !!! Failed to build module emerge info Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.3.4, glibc-2.3.4.20040619-r1, 2.6.7-ck6) ================================================================= System uname: 2.6.7-ck6 i686 AMD Athlon(tm) processor Gentoo Base System version 1.5.2 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon-tbird -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-tbird -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="ftp://cs.ubishops.ca/pub/gentoo ftp://sunsite.ualberta.ca/pub/unix/Linux/gentoo/ ftp://gentoo.risq.qc.ca/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage" USE="3dnow S3TC X acpi alsa apm artswrappersuid avi berkdb cdparanoia cdr codecs crypt cups curl dga divx4linux dv dvd dvdread encode escreen faac faad fam fbcon fbdev flac foomaticdb gdbm gif gimp gimpprint gtk gtk2 idea imagemagick imlib java jikes jpeg kde lesstif libg++ libwww live lzo mad mldonkeypango mmap mmx mng motif mozilla moznocompose moznoircmoznomail mozp3p mozsvg mpeg ncurses network nls nogcj noreiserfs nowin nptl oggvorbis ooo-kde opengl oss pam pdflib perl pic png ppds psyco python qt quicktime readline samba scanner sdl serial slang spell ssl svg tcpd tga theora threads tiff truetype usb v4l v4l2 x86 xinerama xml xml2 xmms xv xvid zlib"
seems as though this line is making it fail make IGNORE_CC_MISMATCH="yes" SYSSRC="${KERNEL_DIR}" SYSOUT="${KV_OUTPUT}" \ clean module V=1 || die "Failed to build module" when I set SYSOUT="/usr/src/kernel-out" the directory I set the kernel sources to output to, it installs fine, seems KV_OUTPUT is not getting setup correctly.
To quote your original comment >>> Unpacking source... * /usr/src/linux is a symbolic link * Determining the real directory of the Linux kernel source code * Building for Linux 2.6.7-ck6 found in /usr/src/linux * which outputs to /usr/src/linux * By not using the kernel's ability to output to an alternative * directory, some external module builds may fail. * See <insert link to user doc here> KV_OUTPUT and hence SYSOUT is dynamically determined from the kernel sources, this works in accordance with how kbuild is meant to be implemented. The output directory is found from /usr/src/linux/Makefile and the KBUILD_OUTPUT variable... is this set on your system?
Well I changed it to compile into the same directory and it works fine. My old kernel build command was 'make O=/usr/src/kernel-out -j3' so does that change the makefile, or do I have to do it manually?
See sys-kernel/config-kernel It will make the appropriate changes... resolving bug.
sys-kernel/config-kernel is masked out (says its broken).