While doing an 'emerge system -U' linux-headers got updated from 2.4.21 to 2.4.21-r1. After that I wanted to recompile glibc. So I did: emerge glibc -v Calculating dependencies ...done! >>> emerge (1 of 1) sys-libs/glibc-2.3.2-r9 to / >>> md5 src_uri ;-) glibc-2.3.2.tar.bz2 >>> md5 src_uri ;-) glibc-linuxthreads-2.3.2.tar.bz2 >>> md5 src_uri ;-) glibc-2.3.2-branch-update-20031115.patch.bz2 * Checking for sufficient version kernel headers ... no * Could not find a kernel source tree or headers with * version 2.6.0 or later! Please correct this * and try again. !!! ERROR: sys-libs/glibc-2.3.2-r9 failed. !!! Function pkg_setup, Line 190, Exitcode 0 !!! Insufficient kernel headers present! I do have a 2.6.x kernel tree (check below). So why of a sudden doesn't glibc want to recompile? Some more informations: $ ls -l /usr/src/ insgesamt 4 lrwxr-xr-x 1 root root 11 7. Apr 14:58 linux -> linux-2.6.5/ drwxr-xr-x 18 root root 4096 7. Apr 16:23 linux-2.6.5/ $ equery list linux-headers Searching for package 'linux-headers' in all categories among: * installed packages [I--] [ -] sys-kernel/linux-headers-2.4.21-r1 (0) $ emerge info Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5) ================================================================= System uname: 2.6.5 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.4.8 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="-march=athlon-tbird -O2 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/s hare/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dv ipdfm/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-tbird -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox strict userpriv usersandbox" GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.easynet .nl/mirror/gentoo/ http://gentoo.tiscali.nl/gentoo/ http://ftp.lug.ro/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X X509 aalib alsa avi berkdb chroot crypt cups dga encode foomaticdb gdbm gif gimpprint gnome gphoto2 gpm gstreamer gtk gtk2 imap imlib java jpeg lib g++ mad maildir matroska mbox mmx mng motif mozilla mpeg ncurses nls nptl objc o ggvorbis opengl pam pdflib perl pic png ppds python quicktime readline ruby samb a sdl skey slang ssl svga tcpd tetex truetype x86 xface xml2 xmms xv zlib"
try this and post the results here: headers="/lib/modules/`uname -r`/build/include \ /lib/modules/`uname -r`/build/include \ /usr/src/linux/include \ /usr/src/linux/include \ /usr/include" for x in ${headers} ; do header="${x}/linux/version.h" if [ -f ${header} ] ; then version="`grep 'LINUX_VERSION_CODE' ${header} | \ sed -e 's:^.*LINUX_VERSION_CODE[[:space:]]*::'`" echo "$version in $header" else echo "No version.h in $header" fi done
No version.h in /lib/modules/2.6.5/build/include/linux/version.h No version.h in /lib/modules/2.6.5/build/include/linux/version.h No version.h in /usr/src/linux/include/linux/version.h No version.h in /usr/src/linux/include/linux/version.h 132117 in /usr/include/linux/version.h
you need to setup your /usr/src/linux tree in other words, do what you have to do to make sure /usr/src/linux/include/linux/version.h exists ... perhaps `make menuconfig ; make` ?
Cool that did it. version.h was missing because I did "make clean" after compiling and installing the kernel.
*** Bug 49035 has been marked as a duplicate of this bug. ***