Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75821 - Portage complains about kernel not being able to load external modules,
Summary: Portage complains about kernel not being able to load external modules,
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo X packagers
URL: http://rafb.net/paste/results/3Aic2I2...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-27 10:18 UTC by Thomas Heinrichsdobler
Modified: 2005-01-06 08:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
kernel config (.config,32.24 KB, text/plain)
2004-12-27 23:12 UTC, Thomas Heinrichsdobler
Details
linux-info.eclass (linux-info.eclass,13.87 KB, text/plain)
2004-12-29 11:55 UTC, Thomas Heinrichsdobler
Details
linux-mod.eclass (linux-mod.eclass,9.21 KB, text/plain)
2004-12-29 11:55 UTC, Thomas Heinrichsdobler
Details
nvidia-kernel-1.0.6111-r3.ebuild (nvidia-kernel-1.0.6111-r3.ebuild,4.38 KB, text/plain)
2004-12-29 11:56 UTC, Thomas Heinrichsdobler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Heinrichsdobler 2004-12-27 10:18:26 UTC
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"
Comment 1 Andrew Bevitt 2004-12-27 17:31:55 UTC
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.
Comment 2 Thomas Heinrichsdobler 2004-12-27 23:12:25 UTC
Created attachment 47014 [details]
kernel config

As requested
Comment 3 Thomas Heinrichsdobler 2004-12-27 23:15:32 UTC
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.
Comment 4 Andrew Bevitt 2004-12-28 05:29:51 UTC
John: CONFIG_MODULES and CONFIG_MTRR are set in the config (see attached), but linux-*.eclass still appear to be saying no... 
Comment 5 John Mylchreest (RETIRED) gentoo-dev 2004-12-29 02:57:59 UTC
are you using KBUILD_OUTPUT? if so the .config in /usr/src/linux wont be the one being used.
Comment 6 Thomas Heinrichsdobler 2004-12-29 03:38:04 UTC
No, I am not using KBUILD_OUTPUT, neither as environment variable nor anyhow else.
Comment 7 Andrew Bevitt 2004-12-29 04:55:59 UTC
Im at a loss... it should work.

Try building 6629-r1 we'll at least know something at that point.
Comment 8 Thomas Heinrichsdobler 2004-12-29 05:02:59 UTC
I've tried that already. same problem there...
Comment 9 Andrew Bevitt 2004-12-29 05:21:41 UTC
What version of bash are you using? Can you try app-shells/bash-3.0-r7 if you are not already using it...
Comment 10 John Mylchreest (RETIRED) gentoo-dev 2004-12-29 11:23:21 UTC
interesting.
can you please attach the linux-mod.eclass linux-info.eclass and nvidia-kernel ebuild you are using?
Comment 11 Thomas Heinrichsdobler 2004-12-29 11:54:38 UTC
Andrew, same problem even with bash-3.0-r7.
Comment 12 Thomas Heinrichsdobler 2004-12-29 11:55:23 UTC
Created attachment 47139 [details]
linux-info.eclass
Comment 13 Thomas Heinrichsdobler 2004-12-29 11:55:49 UTC
Created attachment 47140 [details]
linux-mod.eclass
Comment 14 Thomas Heinrichsdobler 2004-12-29 11:56:55 UTC
Created attachment 47141 [details]
nvidia-kernel-1.0.6111-r3.ebuild
Comment 15 Andrew Bevitt 2004-12-29 17:16:05 UTC
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?
Comment 16 Thomas Heinrichsdobler 2004-12-30 00:32:39 UTC
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.
Comment 17 John Mylchreest (RETIRED) gentoo-dev 2005-01-06 06:03:30 UTC
Do you still experience the problem with 2.6.10?
Comment 18 Thomas Heinrichsdobler 2005-01-06 08:10:12 UTC
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
Comment 19 Thomas Heinrichsdobler 2005-01-06 08:10:12 UTC
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.
Comment 20 Thomas Heinrichsdobler 2005-01-06 08:21:52 UTC
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.