This is related to bug #21326. In glibc-2.3.2-r9.ebuild, there is a test for a broken version of sysctl.h. When I fixed sysctl.h by applying the patch displayed with the error message, the same error message still appeared. The test is done by compiling a test program (test-sysctl_h.c). I invoked gcc in exactly the same way as in the ebuild, and it issued the following warning: In file included from /lib/modules/2.6.0/build/include/linux/sysctl.h:23, from /usr/portage/sys-libs/glibc/files/test-sysctl_h.c:1: /lib/modules/2.6.0/build/include/linux/list.h:588:2: warning: #warning "don't include kernel headers in userspace" This seems to be the reason that the test fails even with a fixed sysctl.h. Reproducible: Always Steps to Reproduce: 1. emerge --update glibc 2. 3. Actual Results: fails with the following error message: --- SNIP --- * Checking kernel headers for broken sysctl.h ... yes * Your version of: * /lib/modules/2.6.0/build/include/linux/sysctl.h * is broken (from a user space perspective). Please apply * the following patch: * ******************************************************* --- linux.orig/include/linux/sysctl.h.orig 2003-05-18 22:12:39.000000000 +0200 +++ linux.fixed/include/linux/sysctl.h 2003-05-18 22:13:58.000000000 +0200 @@ -35,6 +35,10 @@ the largest acceptable value for the nlen member of a struct __sysctl_args to have? */ +#ifndef __user +#define __user +#endif + struct __sysctl_args { int __user *name; int nlen; * ******************************************************* !!! ERROR: sys-libs/glibc-2.3.2-r9 failed. !!! Function pkg_setup, Line 217, Exitcode 0 !!! Broken linux/sysctl.h header included in kernel sources! --- SNIP --- Expected Results: Compile and emerge updated glibc emerge info Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.0) ================================================================= System uname: 2.6.0 i686 Intel(R) Pentium(R) III Mobile CPU 1133MHz Gentoo Base System version 1.4.3.10p1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O3 -pipe" CHOST="i686-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/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acpi alsa arts avi berkdb cdr crypt cups dvd encode esd fbcon foomaticdb gdbm gif gtk gtk2 guile imlib java jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pcmcia pda pdflib perl png postgres python qt quicktime readline sdl slang spell sse ssl tcltk tcpd tetex tiff truetype x86 xml2 xmms xosd xv zlib" gcc --version gcc (GCC) 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice) Kernel version: 2.6.0
After upgrading to kernel version 2.6.1, emerge --update glibc seems to work fine. Perhaps a somewhat premature bug report. Sorry!