# emerge -uD world [...] make -C /lib/modules/2.6.5-gentoo-r1/build SUBDIRS=/var/tmp/portage/svgalib-1.9.18-r1/work/svgalib-1.9.18/kernel/svgalib_helper modules make[1]: Entering directory `/usr/src/linux-2.6.5-gentoo-r1' *** Warning: Overriding SUBDIRS on the command line can cause *** inconsistencies make[2]: `arch/i386/kernel/asm-offsets.s' is up to date. CC [M] /var/tmp/portage/svgalib-1.9.18-r1/work/svgalib-1.9.18/kernel/svgalib_helper/main.o CC [M] /var/tmp/portage/svgalib-1.9.18-r1/work/svgalib-1.9.18/kernel/svgalib_helper/i810.o CC [M] /var/tmp/portage/svgalib-1.9.18-r1/work/svgalib-1.9.18/kernel/svgalib_helper/interrupt.o CC [M] /var/tmp/portage/svgalib-1.9.18-r1/work/svgalib-1.9.18/kernel/svgalib_helper/virtual.o LD [M] /var/tmp/portage/svgalib-1.9.18-r1/work/svgalib-1.9.18/kernel/svgalib_helper/svgalib_helper.o ACCESS DENIED open_wr: /usr/src/linux-2.6.5-gentoo-r1/.tmp_versions/svgalib_helper.mod /bin/sh: line 1: .tmp_versions/svgalib_helper.mod: Permission denied Building modules, stage 2. MODPOST ACCESS DENIED open_wr: /usr/src/linux-2.6.5-gentoo-r1/.__modpost.cmd /bin/sh: line 1: ./.__modpost.cmd: Permission denied make[2]: *** [__modpost] Error 1 make[1]: *** [modules] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.5-gentoo-r1' make: *** [default] Error 2 !!! ERROR: media-libs/svgalib-1.9.18-r1 failed. !!! Function src_compile, Line 95, Exitcode 2 !!! Failed to build kernel module! --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE = "/tmp/sandbox-media-libs_-_svgalib-1.9.18-r1-31364.log" open_wr: /usr/src/linux-2.6.5-gentoo-r1/.tmp_versions/svgalib_helper.mod open_wr: /usr/src/linux-2.6.5-gentoo-r1/.__modpost.cmd -------------------------------------------------------------------------------- # emerge info Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 Pentium II (Deschutes) Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=i586 -funroll-loops -pipe" CHOST="i586-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/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 -mcpu=i586 -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://mirror.pudas.net/gentoo rsync://trumpetti.atm.tut.fi/gentoo/ http://gentoo.linux.no/ ftp://gentoo.linux.no/pub/gentoo/" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X apm arts avi berkdb cjk crypt cups emacs encode esd firebird foomaticdb gdbm gif gnome gpm gtk gtk2 imlib ipv6 jpeg ldap leim libg++ libwww mad mikmod motif mozilla mpeg mule mysql ncurses nls oci8 oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl slang spell sse ssl svga tcpd tiff truetype unicode x86 xml2 xmms xv zlib"
sync up in a bit and try again ... then post the failure message again if it fails ... is your /usr/src/linux symlink pointing to 2.6.5 ?
> is your /usr/src/linux symlink pointing to 2.6.5 ? Ah, that's probably the cause: # ls -l /usr/src total 996 lrwxr-xr-x 1 root root 10 Feb 6 21:10 linux -> linux-beta ... drwxr-xr-x 19 root root 4096 Jun 29 15:44 linux-2.6.5-gentoo-r1 drwxr-xr-x 19 root root 4096 Jun 22 19:01 linux-2.6.7-gentoo-r3 drwxr-xr-x 18 root root 4096 Jun 29 16:46 linux-2.6.7-gentoo-r6 lrwxr-xr-x 1 root root 21 Jun 22 17:52 linux-beta -> linux-2.6.7-gentoo-r3
Yes, worked with an updated (or rather reverted) symlink. So the question is now if the ebuild should detect this problem?
not really ... it's kind of an ugly situation ... if you try to 'get smart' and figure out what the user wants to happen with building kernel modules you'll most likely end up doing exactly what they dont want :) portage requires /usr/src/linux to point to the kernel tree you wish to build against ... this way the user can build modules against either their current running kernel or maybe against a kernel that they'll be deploying on another machine but not run on their own in this case, svgalib has to figure out whether it can build the kernel module for 2.6.x the 'ugly' way (2.6.0 - 2.6.5) or the 'clean' way (2.6.6+) ... choose the wrong way and we see errors like you got or maybe it'll work but the resulting module is unusable :)
True, I didn't suggest a DWIM. I suggested a better diagnostic.
DWIM ? and i dont know what you mean by a 'better' diagnostic
DWIM: Do What I Mean. ie try to guess what the user intended. Better diagnostic: Detect the problem, and inform the user that /usr/src/linux needs to point to the kernel source for the currently running kernel.