updating from kbd 1.12-r3 to r4 causes error Reproducible: Always Steps to Reproduce: 1. ACCEPT_KEYWORDS="~amd64" emerge kdb 2. 3. Actual Results: In file included from dumpkeys.c:13: /usr/include/linux/keyboard.h:7:2: warning: #warning Gentoo Linux Headers Warning: GNU Libc Linux Headers Override Detected. /usr/include/linux/keyboard.h:8:2: warning: #warning Gentoo Linux Headers Warning: This is bad. Removing override and continuing. /usr/include/linux/keyboard.h:9:2: warning: #warning Gentoo Linux Headers Warning: If your compilation dies here, mention this when /usr/include/linux/keyboard.h:10:2: warning: #warning Gentoo Linux Headers Warning: filing a bug! In file included from /usr/include/linux/keyboard.h:11, from dumpkeys.c:13: /usr/include/linux/types.h:182: error: redefinition of `struct ustat' make[1]: *** [dumpkeys.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/kbd-1.12-r4/work/kbd-1.12/src' make: *** [all] Error 1 !!! ERROR: sys-apps/kbd-1.12-r4 failed. !!! Function src_compile, Line 69, Exitcode 2 !!! emake failed !!! If you need support, post the topmost build error, NOT this status message. Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r6 x86_64) ================================================================= System uname: 2.6.11-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 20 2005, 07:21:22)] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r3, 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X acpi alsa berkdb bitmap-fonts crypt fam font-server fortran gif gpm ipv6 jp2 jpeg kde lzw lzw-tiff motif mp3 ncurses nls opengl oss pam perl png python qt readline ssl tcpd tiff truetype truetype-fonts type1-fonts usb userlocales xml2 xpm xrandr xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
I have the same error. walnut src # emerge info Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r6 x86_64) ================================================================= System uname: 2.6.11-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 20 2005, 19:44:39)] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="amd64 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -pipe -w -march=k8" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/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 -pipe -w -march=k8" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox strict" GENTOO_MIRRORS="http://ftp.du.se/pub/os/gentoo" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://localhost/gentoo-portage" USE="amd64 acpi alsa berkdb bitmap-fonts cdr crypt dvd dvdr font-server gif gnome gpm gtk ipv6 jp2 jpeg lzw lzw-tiff mp3 ncurses nls opengl oss pam perl png python readline ssl tcpd tiff truetype truetype-fonts type1-fonts usb userlocales xml2 xpm xrandr xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Never mind my ACCEPT_KEYWORDS btw :-)
Same here on a stage1 2005.0 install. livecd portage # emerge --info Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r3-k8 x86_64) ================================================================= System uname: 2.6.11-gentoo-r3-k8 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 20 2005, 17:28:18)] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-march=k8 -O3 -ffast-math -funroll-all-loops -funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/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="-march=k8 -O3 -ffast-math -funroll-all-loops -funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 S3TC X Xaw3d acpi aim alsa apache2 audiofile authdaemond berkdb bitmap-fonts bonobo bzlib cddb cdinstall cdparanoia cgi chroot crypt curl cyrus dba dbase dga dnd dvd dvdr dvdread emacs encode evo exif faac faad fastcgi fbcon ffmpeg font-server foomaticdb fortran ftp gd gif gimpprint gpm gtk2 gtkhtml imap imlib2 ipv6 java javascript jikes joystick jp2 jpeg jpeg2k kerberos lcms libgda lzw lzw-tiff maildir mbox mdb mime mng moznocompose moznoirc moznomail mozsvg mp3 mpeg mpeg4 mplayer ncurses net nls nptl nvidia openal opengl oss pam perl php png posix python quicktime readline rogue sasl spell ssl svg tcpd theora tiff timidity transcode truetype truetype-fonts type1-fonts unicode usb userlocales v4l v4l2 vhosts videos wmf wxwindows xatrix xine xml2 xpm xrandr xv xvid zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
I receive the same error, this is during the emerge system on a fresh stage 1 install. Here's my emerge info Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.4.21-gss i686) ================================================================= System uname: 2.4.21-gss i686 Pentium III (Katmai) Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 20 2005, 12:30:53)] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.7.9-r1, 1.5, 1.9.5, 1.6.3, 1.4_p6, 1.8.5-r3 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: [Not Present] virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium3 -pipe -mmmx -msse -mfpmath=sse,387 -fomit-frame-pointer -maccumulate-outgoing-args" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/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 -march=pentium3 -pipe -mmmx -msse -mfpmath=sse,387 -fomit-frame-pointer -maccumulate-outgoing-args" DISTDIR="/tmp/disfiles" FEATURES="autoaddcvs autoconfig ccache distlocks parallel-fetch sandbox sfpermsstrict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/tmp/packages" PORTAGE_TMPDIR="/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa apm arts avi berkdb bitmap-fonts crypt cups emboss encode foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib ipv6 jpeg kde libg++ libwww mad mikmod motif mp3 mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl spell ssl svga tcpd truetype truetype-fonts type1-fonts xml2 xmms xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS Please note that it affects 1.12-r4, 1.12-r3, and 1.12-r2. (I masked those three versions, and kbd was no longer going to be built using the emerge system, so I continued the install from there.)
I commented out the #ifndef down to the #endif that contains the warnings and it compiles fine.
tim: care to take a look ? :)
commenting out the stuff in the header file got me a clean compile too. I am running a 32-bit system. (i686)
Also got it to work by commenting out the ifndef-block. Hardware is i686 (pentium-m) and I'm using ACCEPT_KEYWORDS="~x86".
*** Bug 89902 has been marked as a duplicate of this bug. ***
Was also able to emerge by commenting the following out of /usr/include/linux/keyboard.h //#ifndef __le64 //#ifdef _LINUX_TYPES_H //#undef _LINUX_TYPES_H //#warning Gentoo Linux Headers Warning: GNU Libc Linux Headers Override Detect$//#warning Gentoo Linux Headers Warning: This is bad. Removing override and con$//#warning Gentoo Linux Headers Warning: If your compilation dies here, mention$//#warning Gentoo Linux Headers Warning: filing a bug! //#include <linux/types.h> //#endif //#endif
Fixed in CVS, please emerge sync, remerge linux-headers and things should work now - please reopen bug if failures persist. Thanks!
*** Bug 89952 has been marked as a duplicate of this bug. ***
*** Bug 90000 has been marked as a duplicate of this bug. ***
*** Bug 90013 has been marked as a duplicate of this bug. ***
*** Bug 90235 has been marked as a duplicate of this bug. ***
Hi I just ran into the same error with linux-headers-2.6.11 on ~x86 (emerge --synced on 2005-05-08, timestamp is 2005-04-21). First while emerging libsdl - worked around there by adding -svga to $USE. Next while emerging aalib - no workaround there but fiddling with keyboard.h (now, _this_ is bad!). It now reads: #ifndef _LINUX_TYPES_H //#undef _LINUX_TYPES_H #warning Gentoo Linux Headers Warning: GNU Libc Linux Headers Override Detected.#warning Gentoo Linux Headers Warning: This is bad. Removing override and continuing. #warning Gentoo Linux Headers Warning: If your compilation dies here, mention this when #warning Gentoo Linux Headers Warning: filing a bug! #include <linux/types.h> #endif I mean, WHAT IS THIS CODE DOING THERE ANYWAY?!? What's the point in including types.h twice or even more often? Isnt' this what #define _LINUX_TYPES_H was meant to prevent? And what is such a gentoo extension doing in a - supposedly - vanilla kernel header?!? I don't know why this warning is there, as double-including the same file is definitely an error. But some source files do include various kernel headers (in this case: aalinuxkbd.c includes both <linux/types.h> and <linux/keyboard.h> with keyboard.h having that imho silly switch that will actually FORCE types.h to be re-included!), relying on the preprocessor to filter out those conflicts (one of its duties, isn't it?). I'm sorry if I'm a nuisance by reopening the bug, but it wasn't there before the last emerge -Duv world. If the version from CVS that's mentioned in the closing message contains the fix, something else has gone awry and it's not being pushed to us humble users. krgds /markus
here's a tip ... when filing a bug, learn to not be a spaz if you had read & *understood* the message you would see that the kernel headers are warning about a bug *glibc* introduces and they refuse/dont care to fix do `emerge sync && emerge linux-headers aalib` if it still fails, file a NEW bug
Hi I'm sorry for annoying the CCs on this bug if they feel annoyed. I've read the warning messages included in keyboard.h. They say that a glibc error has been detected. They determine that by checking #ifdef _LINUX_TYPES_H. This will be set whenever <linux/types.h> has been included before. There appear to be numerous source files that do that (eg. include first types.h and then keyboard.h, which includes types.h). It is by design that this will happen. This is why there is a preprocessor. This software will prevent re-includes, except when it's told not to. What the lines in keyboard.h do is exactly that: prevent the preprocessor from doing its job. If I unset _LINUX_TYPES_H I want to force inclusion of types.h. I would not do that without a reason. And I would want at least some sort of hint as to who the culprit is. Just claiming that it's a "glibc error" without checking where the #include came from and then blowing up the whole compile seems - to say the least - helpless. So, if someone with more wits than me, and despite of my rant, is still willing to explain to me why this would be a "glibc error" and why the kernel headers should force re-inclusion of already included headers, I would be very grateful and humble. In case you determine that including both <linux/types.h> and <linux/keyboard.h> is illegal for a .c source file, I will be happy to file bugs against about half a dozen of packages. And then, still being a rant, I would ask of you why the compile works without the "gentoo double include addon", i.e. if you leave the file as it was in the original kernel headers, and why it doesn't when enhanced with that less than helpful warning, and what the point of adding those lines was. krgds /markus PS: I personally think this is a bug in the gentoo kernel headers. PPS: (excuse my ignorance: what's a "spaz"?)
and after all that, you've just shown you still dont know the issue glibc header files will happily #define _LINUX_TYPES_H without ever actually including linux/types.h and that breaks packages
Hello and sorry for the loud pose. I shouldn't be doing this. I agree that if any .h file defines _LINUX_TYPES_H whithout including types.h, this will certainly break things and is bad. I remember filing a bug against pam where this issue was involved. But my understanding still is that _forcing_ an inclusion will also break things for packages who rely on the correct functioning of prototyping/typedef/... . So it's a tradeoff. And it seems to be more of a political than a technical issue. The current solution will work for builds that luckily don't need two related kernel .h's, and for the "bad" glibc .h files. The others will fail. But I do understand that you want to ensure _LINUX_TYPES_H is only set if types.h has really been included and not work around it by using some makro that checks for whatever struct. So a - albeit little pragmatic - approach might be to #define something like _YES_IVE_REALLY_INCLUDED_LINUX_TYPES_H at the end of types.h and check for #ifdef _YES_IVE_REALLY_INCLUDED_LINUX_TYPES_H at the beginning of types.h. So you might be able to keep the problem within types.h and don't need to proliferate it throughout the kernel headers. But then, this does seem bad practice. But it might just work as long as the political issue is unresolved ... lg /markus
... plus (reluctantly) keep the current practice of forcing inclusion of types.h
*** Bug 92472 has been marked as a duplicate of this bug. ***
*** Bug 93299 has been marked as a duplicate of this bug. ***
Could someone give an example of a misbehaving glibc header file? If what vapier said is true this needs to be fixed within glibc. I still think it's bad to introduce such a hack into the kernel headers - as many correct builds rely on this to be working.
*** Bug 93534 has been marked as a duplicate of this bug. ***
Created attachment 59583 [details, diff] Patch for gentoo kernel header modification of linux-headers The issue is that I see is that it is invalid to test with the preprocessor for a typedef'ed type in keyboard.h. The C preprocessor knows nothing about typedefs, so checking ifndef __le64 is an incorrect check for linux/types.h For example: #include <stdio.h> typedef int foobar; int main( int argc, const char *argv[] ) { #ifdef foobar printf( "Hello, world!\n" ); #else printf( "Goodbye cruel world.\n" ); #endif return 0; } Will print "Goodbye cruel world.", because foobar is NOT defined as far as the preprocessor is concerned. A (slightly) better check for this is to check for ifndef __bitwise which is just above the typedef for __le64: (in /usr/include/linux/keyboard.h) #ifndef __bitwise instead of #ifndef __le64 - Kimball
*** Bug 93940 has been marked as a duplicate of this bug. ***
*** Bug 94157 has been marked as a duplicate of this bug. ***
*** Bug 103671 has been marked as a duplicate of this bug. ***
*** Bug 116808 has been marked as a duplicate of this bug. ***
*** Bug 138659 has been marked as a duplicate of this bug. ***