http://www.ussg.iu.edu/hypermail/linux/kernel/0305.2/0392.html http://forums.gentoo.org/viewtopic.php?p=330398#330398 Recent changes in 2.5 regarding sysctl.h to make use of __user seems to break glibc compilation - the lkml threads seems to state the need for sanitized headers (provided by RH?) instead of the current approach. Reproducible: Always Steps to Reproduce: 1. Install 2.5.69-mm7 (or any other kernel which has this changeset) 2. compile glibc 3. notice failure Actual Results: gcc version.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -fprefetch-loop-arrays -freorder-blocks -march=athlon-xp -pipe -I../include -I. -I/var/tmp/portage/glibc-2.3.2-r2/work/glibc-2.3.2/buildhere/csu -I.. -I../libio -I../nptl -I/var/tmp/portage/glibc-2.3.2-r2/work/glibc-2.3.2/buildhere -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../nptl/sysdeps/unix/sysv -I../nptl/sysdeps/unix -I../nptl/sysdeps/i386/i686 -I../nptl/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include -isystem /lib/modules/2.5.69-mm7/build/include -D_LIBC_REENTRANT -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -o /var/tmp/portage/glibc-2.3.2-r2/work/glibc-2.3.2/buildhere/csu/version.o -MD -MP -MF /var/tmp/portage/glibc-2.3.2-r2/work/glibc-2.3.2/buildhere/csu/version.o.dt In file included from ../sysdeps/unix/sysv/linux/sys/sysctl.h:29, from ../include/sys/sysctl.h:2, from ../sysdeps/unix/sysv/linux/dl-osinfo.h:22, from ../sysdeps/generic/libc-start.c:33: /lib/modules/2.5.69-mm7/build/include/linux/sysctl.h:39: error: parse error before '*' token /lib/modules/2.5.69-mm7/build/include/linux/sysctl.h:41: error: parse error before '*' token /lib/modules/2.5.69-mm7/build/include/linux/sysctl.h:42: error: parse error before '*' token /lib/modules/2.5.69-mm7/build/include/linux/sysctl.h:43: error: parse error before '*' token /lib/modules/2.5.69-mm7/build/include/linux/sysctl.h:46: error: parse error before '}' token ../stdio-common/_itoa.h:40: warning: inlining failed in call to `_itoa_word' ../nptl/sysdeps/pthread/list.h:76: warning: called from here make[2]: *** [/var/tmp/portage/glibc-2.3.2-r2/work/glibc-2.3.2/buildhere/csu/libc-start.o] Error 1 make[2]: *** Waiting for unfinished jobs.... ../stdio-common/_itoa.h:40: warning: inlining failed in call to `_itoa_word' ../string/bits/string2.h:76: warning: called from here make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.2-r2/work/glibc-2.3.2/csu' make[1]: *** [csu/subdir_lib] Error 2 make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.2-r2/work/glibc-2.3.2' make: *** [all] Error 2 Expected Results: succusful emerge Portage 2.0.48_pre6 (default-x86-1.4, gcc-3.3, glibc-2.3.2-r2) ================================================================= System uname: 2.5.69-mm7 i686 AMD Athlon(tm) XP 1600+ GENTOO_MIRRORS="http://gentoo.linux.no/" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/overlay" USE="x86 apm avi crypt jpeg libg++ mpeg ncurses pdflib png spell xml2 xv zlib gtkhtml gdbm berkdb readline bonobo tcltk guile sdl tcpd pam libwww ssl perl python imlib motif opengl -slang -nas -pda tetex X gtk gtk2 gnome esd alsa -oss -kde -arts -qt -qtmt pic smooth truetype -xinerama -emacs mmx sse 3dnow mozilla -static -debug nptl java -gpm -svga tiff gif quicktime oggvorbis cdr dvd encode xmms mikmod -gphoto2 -scanner moznoirc moznomail moznocompose mozsvg -mozcalendar -mozaccess nls -mysql -cups" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mfpmath=387 -fprefetch-loop-arrays -fmerge-all-constants -ftracer -fnew-ra -fno-cprop-registers -fsched-spec-load-dangerous" CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mfpmath=387 -fprefetch-loop-arrays -fmerge-all-constants -ftracer -fnew-ra -fno-cprop-registers -fsched-spec-load-dangerous" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage/" FEATURES="sandbox ccache"
Yes, I did start that lovely thread on this issue. Nobody took me up yet on leading a project to get the api seperated from kernel stuff as suggested (a bit later in the thread than the 'sanitized' crap). For now whoever should please just apply the following patch to 2.5 kernels: ---------------------------------------------------------------------- --- linux-2.5.69-bk13/include/linux/sysctl.h 2003-05-19 22:29:18.000000000 +0200 +++ linux-2.5.69-bk14/include/linux/sysctl.h 2003-05-20 21:42:20.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;
az seems to have provided the fix. closing.
That's not a real fix - it's a hack, what we need is to get an API to communicate with the kernel instead of using the kernel headers but this is not for Gentoo to fix.
agreed - i should have used "workaround"... nonetheless, this bug can be closed.
*** Bug 25483 has been marked as a duplicate of this bug. ***