When I try to emerge nvidia-kernel, portage aborts with this error message: # emerge nvidia-kernel Calculating dependencies ...done! >>> emerge (1 of 1) media-video/nvidia-kernel-1.0.6111-r3 to / x86 >>> md5 src_uri ;-) NVIDIA-Linux-x86-1.0-6111-pkg1.run x86 * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.6.9-gentoo-r9 * These sources do not support loading external modules. * to be able to use this module please enable "Loadable modules support" * in your kernel, recompile and then try merging this module again. !!! ERROR: media-video/nvidia-kernel-1.0.6111-r3 failed. !!! Function check_modules_supported, Line 343, Exitcode 0 !!! No support for external modules in 2.6.9-gentoo-r9 config !!! If you need support, post the topmost build error, NOT this status message. I created my kernel with genkernel, and I have several modules loaded, compiling them manually works fine. With portage, though, all I get is this message. I have found out that the check is done in linux-info.eclass, and if I change the check to always pass, the ebuild is complaining about my kernel not having MTRR support. My kernel definitely has support for MTRR, since I used the NVIDIA-installer script to install and everything worked fine. I don't want to change the ebuild, too, I guess there is a "clean" solution to this problem. Reproducible: Always Steps to Reproduce: 1. genkernel --kerneldir=/usr/src/linux-2.6.9-gentoo-r9 all 2. boot the new kernel 3. emerge nvidia-kernel Actual Results: Calculating dependencies ...done! >>> emerge (1 of 1) media-video/nvidia-kernel-1.0.6111-r3 to / x86 >>> md5 src_uri ;-) NVIDIA-Linux-x86-1.0-6111-pkg1.run x86 * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.6.9-gentoo-r9 * These sources do not support loading external modules. * to be able to use this module please enable "Loadable modules support" * in your kernel, recompile and then try merging this module again. Expected Results: Install the nvidia-kernel module Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r9 i686) ================================================================= System uname: 2.6.9-gentoo-r9 i686 AMD Athlon(tm) XP 2500+ Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/ share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/ texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/ platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks grc sandbox sfperms" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/ distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex X X509 Xaw3d a52 aac aalib acl acpi acpi4linux alsa apache2 apm audiofile avi bash-completion bdf bitmap-fonts blas blender-game bmp bootsplash bzlib cdinstall cdparanoia cdr codecs crypt css cups curlwrappers directfb divx4linux djbfft dmx dts dvd dvdr dvdread encode escreen esd evo exif f2c fam fame fbcon fftw flac flash fmod font-server foomaticdb fortran fpx ftp gd gdbm gif gimp gimpprint gmtfull gmthigh gmtsuppl gmttria gphoto2 gpm graphviz gs gtk gtk2 gtkhtml iconv icq idea idl imagemagick imap imlib imlib2 jack java javascript jbig jikes jp2 jpeg junit ladcca lapack lcms libcaca libwww live lzo lzw lzw-tiff mad mbrola mikmod mime ming mjpeg mmx mmx2 mng motif mozsvg mpeg mplayer mysql mysqli nas ncurses network nls nntp nocd nodrm nowin ntlm nvidia nviz offensive oggvorbis openal opengl operanom2 opie oscar pam pcre pda pdflib perl pg-hier php plotutils png portaudio posix postgres ppds python qt quicktime readline real recode rtc scanner sdk sdl slang smime sndfile snmp sockets softquota soundtouch speex spell spl sqlite sse sse2 ssl stencil-buffer svg svga sysvipc szip tcltk tcpd tetex tga theora threads tidy tiff tokenizer transcode truetype unicode usb userlocales v4l2 vcd vcdimager videos vim-with-x wmf wxwindows xanim xchatdccserver xchattext xface xfs xine xml xml2 xmms xosd xpm xv xvid xvmc yv12 zlib linguas_de"
You do have /usr/src/linux -> /usr/src/linux-2.6.9-gentoo-r9 If you dont then the sources in /usr/src/linux werent actually used by genkernel. Can you attach your kernel config file in plain text format please.
Created attachment 47014 [details] kernel config As requested
I am definitely sure the symlink in /usr/src is correct, I have checked it several times since experiencing this problem. I always use genkernel with the --kerneldir switch to make sure it's using the correct sources.
John: CONFIG_MODULES and CONFIG_MTRR are set in the config (see attached), but linux-*.eclass still appear to be saying no...
are you using KBUILD_OUTPUT? if so the .config in /usr/src/linux wont be the one being used.
No, I am not using KBUILD_OUTPUT, neither as environment variable nor anyhow else.
Im at a loss... it should work. Try building 6629-r1 we'll at least know something at that point.
I've tried that already. same problem there...
What version of bash are you using? Can you try app-shells/bash-3.0-r7 if you are not already using it...
interesting. can you please attach the linux-mod.eclass linux-info.eclass and nvidia-kernel ebuild you are using?
Andrew, same problem even with bash-3.0-r7.
Created attachment 47139 [details] linux-info.eclass
Created attachment 47140 [details] linux-mod.eclass
Created attachment 47141 [details] nvidia-kernel-1.0.6111-r3.ebuild
Well your eclasses are definately old, sync up your tree and go from there. You dont have any ebuilds for nvidia (or the eclasses) in your overlay do you?
My PORTDIR_OVERLAY (which points to /usr/local/portage) is empty. I am somewhat surprised that my eclasses are old - i've synced almost every day since i've been experiencing this problem. Is there any other way to update them? I don't think so. At least I haven't heard of any... I've just tried to sync again, and still have the same problem.
Do you still experience the problem with 2.6.10?
Yes, still the same with 2.6.10. If I edit linux-mod.eclass and change the check for loadable module support so that it will always be true, I need to change the ebuild to do the same for its check for MTRR support. after doing this, I get the following message: castor modn # emerge nvidia-kernel Calculating dependencies ...done! >>> emerge (1 of 1) media-video/nvidia-kernel-1.0.6111-r3 to / x86 >>> md5 src_uri ;-) NVIDIA-Linux-x86-1.0-6111-pkg1.run x86 * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.6.10 * Checking for suitable kernel configuration options * Using KV_OBJ=o * Checking for MTRR support... [ !! ] x86 >>> Unpacking source... /usr/portage/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r3.ebuild: line 74: [: 6: integer expression expected Creating directory NVIDIA-Linux-x86-1.0-6111-pkg1 Verifying archive integrity... OK Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-6111.......................................................................................................................................................................................................... /usr/portage/eclass/linux-mod.eclass: line 73: [: 2: integer expression expected >>> Source unpacked. x86 * Preparing nvidia module NVIDIA: calling KBUILD... make -C /usr/src/linux \ KBUILD_SRC=/usr/src/linux-2.6.10 KBUILD_VERBOSE=1 \ KBUILD_CHECK= KBUILD_EXTMOD="/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv" \ -f /usr/src/linux-2.6.10/Makefile modules mkdir -p /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.tmp_versions make -f /usr/src/linux-2.6.10/scripts/Makefile.build obj=/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv_compiler.h make[4]: *** Lese Pipe f
Yes, still the same with 2.6.10. If I edit linux-mod.eclass and change the check for loadable module support so that it will always be true, I need to change the ebuild to do the same for its check for MTRR support. after doing this, I get the following message: castor modn # emerge nvidia-kernel Calculating dependencies ...done! >>> emerge (1 of 1) media-video/nvidia-kernel-1.0.6111-r3 to / x86 >>> md5 src_uri ;-) NVIDIA-Linux-x86-1.0-6111-pkg1.run x86 * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.6.10 * Checking for suitable kernel configuration options * Using KV_OBJ=o * Checking for MTRR support... [ !! ] x86 >>> Unpacking source... /usr/portage/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r3.ebuild: line 74: [: 6: integer expression expected Creating directory NVIDIA-Linux-x86-1.0-6111-pkg1 Verifying archive integrity... OK Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-6111.......................................................................................................................................................................................................... /usr/portage/eclass/linux-mod.eclass: line 73: [: 2: integer expression expected >>> Source unpacked. x86 * Preparing nvidia module NVIDIA: calling KBUILD... make -C /usr/src/linux \ KBUILD_SRC=/usr/src/linux-2.6.10 KBUILD_VERBOSE=1 \ KBUILD_CHECK= KBUILD_EXTMOD="/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv" \ -f /usr/src/linux-2.6.10/Makefile modules mkdir -p /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.tmp_versions make -f /usr/src/linux-2.6.10/scripts/Makefile.build obj=/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv_compiler.h make[4]: *** Lese Pipe für die Jobs: Datei oder Verzeichnis nicht gefunden. Schluss. make[4]: *** Warte auf noch nicht beendete Prozesse... make[3]: *** [_module_/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv] Fehler 2 make[2]: *** [modules] Fehler 2 NVIDIA: left KBUILD. nvidia.ko failed to build! make[1]: *** [module] Fehler 1 make: *** [module] Fehler 2 !!! ERROR: media-video/nvidia-kernel-1.0.6111-r3 failed. !!! Function linux-mod_src_compile, Line 278, Exitcode 2 !!! 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, NOT this status message. Any ideas? I cant use the ebuild, but if I use the NVIDIA package itself, all works like a charm. Andrew mentioned something about syncing, that's what I do almost every day now, but my eclasses stay the same I guess.
A friend of mine just pointet out that the message "/usr/portage/eclass/linux-mod.eclass: line 73: [: 2: integer expression expected" looks like a parse error. Since I have grc and such funky stuff enabled, he told me to disable it. Guess what: It works! So I am to blame. Sorry for the bother, guys.