Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21326 - glibc 2.3.2-r2 fails to compile against 2.5.69-mm7, sysctl.h error
Summary: glibc 2.3.2-r2 fails to compile against 2.5.69-mm7, sysctl.h error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL: http://www.ussg.iu.edu/hypermail/linu...
Whiteboard:
Keywords:
: 25483 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-20 04:55 UTC by David Nielsen
Modified: 2003-08-30 16:24 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Nielsen 2003-05-20 04:55:55 UTC
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"
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-05-20 15:41:13 UTC
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;

Comment 2 Jay Pfeifer (RETIRED) gentoo-dev 2003-06-27 13:58:22 UTC
az seems to have provided the fix. closing.
Comment 3 David Nielsen 2003-06-27 14:59:49 UTC
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.
Comment 4 Jay Pfeifer (RETIRED) gentoo-dev 2003-06-27 15:16:11 UTC
agreed - i should have used "workaround"... nonetheless, this bug can be closed. 
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2003-08-30 16:24:02 UTC
*** Bug 25483 has been marked as a duplicate of this bug. ***