When trying to compile glibc with nptl, it refuses to compile (running kernel 2.6.4 here) In file included from ../nptl/sysdeps/x86_64/tls.h:26, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:26, from <stdin>:1: ../sysdeps/generic/stdint.h:37: warning: redefinition of `int8_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:109: warning: `int8_t' previously declared here ../sysdeps/generic/stdint.h:38: warning: redefinition of `int16_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:111: warning: `int16_t' previously declared here ../sysdeps/generic/stdint.h:39: warning: redefinition of `int32_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:113: warning: `int32_t' previously declared here ../sysdeps/generic/stdint.h:41: error: conflicting types for `int64_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:124: error: previous declaration of `int64_t' ../sysdeps/generic/stdint.h:49: warning: redefinition of `uint8_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:117: warning: `uint8_t' previously declared here ../sysdeps/generic/stdint.h:50: warning: redefinition of `uint16_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:118: warning: `uint16_t' previously declared here ../sysdeps/generic/stdint.h:52: warning: redefinition of `uint32_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:119: warning: `uint32_t' previously declared here ../sysdeps/generic/stdint.h:56: error: conflicting types for `uint64_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:122: error: previous declaration of `uint64_t' In file included from ../include/sys/types.h:1, from ../stdlib/stdlib.h:416, from ../include/stdlib.h:8, from ../nptl/sysdeps/x86_64/tls.h:27, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:26, from <stdin>:1: ../posix/sys/types.h:35: warning: redefinition of `u_char' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:94: warning: `u_char' previously declared here ../posix/sys/types.h:36: warning: redefinition of `u_short' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:95: warning: `u_short' previously declared here ../posix/sys/types.h:37: warning: redefinition of `u_int' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:96: warning: `u_int' previously declared here ../posix/sys/types.h:38: warning: redefinition of `u_long' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:97: warning: `u_long' previously declared here ../posix/sys/types.h:46: error: conflicting types for `loff_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:56: error: previous declaration of `loff_t' ../posix/sys/types.h:50: warning: redefinition of `ino_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:24: warning: `ino_t' previously declared here ../posix/sys/types.h:62: error: conflicting types for `dev_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:23: error: previous declaration of `dev_t' ../posix/sys/types.h:67: warning: redefinition of `gid_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:52: warning: `gid_t' previously declared here ../posix/sys/types.h:72: warning: redefinition of `mode_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:25: warning: `mode_t' previously declared here ../posix/sys/types.h:77: warning: redefinition of `nlink_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:26: warning: `nlink_t' previously declared here ../posix/sys/types.h:82: warning: redefinition of `uid_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:51: warning: `uid_t' previously declared here ../posix/sys/types.h:88: warning: redefinition of `off_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:27: warning: `off_t' previously declared here ../posix/sys/types.h:100: warning: redefinition of `pid_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:28: warning: `pid_t' previously declared here ../posix/sys/types.h:110: warning: redefinition of `ssize_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:70: warning: `ssize_t' previously declared here ../posix/sys/types.h:116: warning: redefinition of `daddr_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:29: warning: `daddr_t' previously declared here ../posix/sys/types.h:117: warning: redefinition of `caddr_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:90: warning: `caddr_t' previously declared here ../posix/sys/types.h:123: warning: redefinition of `key_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:30: warning: `key_t' previously declared here In file included from ../include/time.h:3, from ../posix/sys/types.h:133, from ../include/sys/types.h:1, from ../stdlib/stdlib.h:416, from ../include/stdlib.h:8, from ../nptl/sysdeps/x86_64/tls.h:27, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:26, from <stdin>:1: ../time/time.h:60: warning: redefinition of `clock_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:85: warning: `clock_t' previously declared here ../time/time.h:76: warning: redefinition of `time_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:80: warning: `time_t' previously declared here ../time/time.h:92: warning: redefinition of `clockid_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:33: warning: `clockid_t' previously declared here ../time/time.h:104: error: conflicting types for `timer_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:32: error: previous declaration of `timer_t' In file included from ../include/sys/types.h:1, from ../stdlib/stdlib.h:416, from ../include/stdlib.h:8, from ../nptl/sysdeps/x86_64/tls.h:27, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:26, from <stdin>:1: ../posix/sys/types.h:141: warning: redefinition of `suseconds_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:31: warning: `suseconds_t' previously declared here In file included from ../include/sys/types.h:1, from ../stdlib/stdlib.h:416, from ../include/stdlib.h:8, from ../nptl/sysdeps/x86_64/tls.h:27, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:26, from <stdin>:1: ../posix/sys/types.h:151: warning: redefinition of `ulong' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:103: warning: `ulong' previously declared here ../posix/sys/types.h:152: warning: redefinition of `ushort' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:101: warning: `ushort' previously declared here ../posix/sys/types.h:153: warning: redefinition of `uint' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:102: warning: `uint' previously declared here ../posix/sys/types.h:197: warning: redefinition of `u_int8_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:108: warning: `u_int8_t' previously declared here ../posix/sys/types.h:198: warning: redefinition of `u_int16_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:110: warning: `u_int16_t' previously declared here ../posix/sys/types.h:199: warning: redefinition of `u_int32_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:112: warning: `u_int32_t' previously declared here ../posix/sys/types.h:200: error: conflicting types for `u_int64_t' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:123: error: previous declaration of `u_int64_t' In file included from ../include/sys/types.h:1, from ../stdlib/stdlib.h:416, from ../include/stdlib.h:8, from ../nptl/sysdeps/x86_64/tls.h:27, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:26, from <stdin>:1: ../posix/sys/types.h:208:1: warning: "__BIT_TYPES_DEFINED__" redefined In file included from /lib/modules/2.6.4-gentoo-r1/build/include/asm/unistd.h:720, from ../sysdeps/unix/sysv/linux/sys/syscall.h:25, from ../sysdeps/unix/sysdep.h:21, from ../sysdeps/unix/x86_64/sysdep.h:19, from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:23, from <stdin>:1: /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:106:1: warning: this is the location of the previous definition In file included from ../include/sys/select.h:2, from ../posix/sys/types.h:216, from ../include/sys/types.h:1, from ../stdlib/stdlib.h:416, from ../include/stdlib.h:8, from ../nptl/sysdeps/x86_64/tls.h:27, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:26, from <stdin>:1: ../misc/sys/select.h:78: error: conflicting types for `fd_set' /lib/modules/2.6.4-gentoo-r1/build/include/linux/types.h:22: error: previous declaration of `fd_set' make[2]: *** [/var/tmp/portage/glibc-2.3.3_pre20040207/work/glibc-2.3.2/buildhere/tcb-offsets.h] Error 1 make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.3_pre20040207/work/glibc-2.3.2/csu' make[1]: *** [csu/subdir_lib] Error 2 make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.3_pre20040207/work/glibc-2.3.2' make: *** [all] Error 2 !!! ERROR: sys-libs/glibc-2.3.3_pre20040207 failed. !!! Function src_compile, Line 527, Exitcode 2 !!! (no error message) bash-2.05b# Reproducible: Always Steps to Reproduce: 1. 2. 3. Portage 2.0.50-r1 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.4-gentoo-r1) ================================================================= System uname: 2.6.4-gentoo-r1 x86_64 4 Gentoo Base System version 1.4.3.13p1 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/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="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/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 aalib acpi alsa amd64 apm arts avi berkdb bonobo cdr crypt cups dvd encode esd foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 imlib java jpeg kde libg++ libwww mikmod motif mozilla mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl slang spell ssl tcpd tetex truetype unicode xml2 xmms xv zlib"
Forgot... I'm emerging [ebuild R ] sys-libs/glibc-2.3.3_pre20040207
I get the same errors here. Also amd64.
Got the same issue with a fresh install from stage1. Anyone was able to build glibc using nptl under amd64 ?
I just noted that the nptl-fix for the nvidia-x drivers hasn't made it's way into the amd64 drivers. As long they don't I'm not really able to test this - but I'm glad not to be the only one having this problem
good news for the nvidia users... i'm currently using nptl with nvidia on amd64. [ebuild R ] media-video/nvidia-kernel-1.0.5332-r1 [ebuild R ] media-video/nvidia-glx-1.0.5332-r2 [ebuild R ] x11-base/xorg-x11-6.7.0 [ebuild R ] sys-libs/glibc-2.3.3_pre20040207 there seems to be a bug where nvidia-kernel is depending on vanilla-sources-2.4.25... so i merged it with --nodeps (and that may be part of why it's working, which is why i mention it) ayanami root # glxinfo | grep vendor server glx vendor string: NVIDIA Corporation client glx vendor string: NVIDIA Corporation OpenGL vendor string: NVIDIA Corporation ayanami root # /lib/libc.so.6 GNU C Library stable release version 2.3.3, by Roland McGrath et al. Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 3.3.3 20040217 (Gentoo Linux 3.3.3, propolice-3.3-7).Compiled on a Linux 2.6.3 system on 2004-04-10. Available extensions: GNU libio by Per Bothner crypt add-on version 2.1 by Michael Glad and others NPTL 0.60 by Ulrich Drepper BIND-8.2.3-T5B NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk Thread-local storage support included. Report bugs using the `glibcbug' script to <bugs@gnu.org>. and no, I dont have a fix for this bug... note that glibc was built against 2.6.3 and this bug seems to be about compiling with 2.6.4 or greater. but you no longer have to worry about using nptl with nvidia on amd64 like you used to... at least if you use xorg-x11 (i've never used nptl+nvidia with xfree).
linux/types.h, asm/types.h, linux/posix_types.h, asm/posix_types.h, and linux/config.h are the same between the two kernels (2.6.3-r1 and 2.6.4). I hope x86-kernel doesn't mind if I ask for help ^_^; and yes, this seems to be an amd64-only problem. :(
i guess all i needed to do was complain, cuz as soon as i did i managed to figure it out. *hangs head* just take a look at asm/unistd.h i'm going to bed. i'll take a fresh look at it after class tomorrow, but i should have a patch for this relatively soon.
ayanami linux-headers # /lib/libc.so.6 GNU C Library stable release version 2.3.3, by Roland McGrath et al. Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 3.3.3 20040217 (Gentoo Linux 3.3.3, propolice-3.3-7).Compiled on a Linux 2.6.4 system on 2004-04-11. Available extensions: GNU libio by Per Bothner crypt add-on version 2.1 by Michael Glad and others NPTL 0.60 by Ulrich Drepper BIND-8.2.3-T5B NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk Thread-local storage support included. Report bugs using the `glibcbug' script to <bugs@gnu.org>. and it works. for a cheap hack until i submit a patch, just copy the old 2.6.3-r1 unistd.h into /usr/include/asm after upgrading linux-headers
Created attachment 29157 [details, diff] patch to fix asm-x86_64/unistd.h for nptl this patch encloses some craziness in an #ifdef __KERNEL__ so that it doesn't break userspace. you need to cd ${S}/include/asm-x86_64/ before applying
Created attachment 29159 [details, diff] nptl patch that isnt broken oooops. this version of the patch actually works. honest. i accidentally catted the new version of the patch onto the file with append instead of over-write, so the previous patch attempts to patch the same thing twice.
ok, tested this patch and compiling nptl against 2.6.4 and 2.6.5. both work, so i'm closing this bug. the update might take a little bit to reach rsync, but after that... sync up and enjoy. ;)
*** Bug 49025 has been marked as a duplicate of this bug. ***
update still on it's way on the mirrors? (it's now 2 weeks later)
glibc-2.3.3_pre20040420 ?
Look at Bug 49025..it's a duplicate of this bug and reports the problem for 2.3.3_pre20040420.
what you have is a bug in linux-headers, not glibc. it wont compile with your kernel's headers. rm /usr/src/linux && rm /lib/modules/(kernel_version_here)/build && emerge /usr/portage/sys-kernel/linux-headers/linux-headers-2.6.5.ebuild if it still fails after that let us know. nptl isn't really supported as well as it should be yet...
*** Bug 49150 has been marked as a duplicate of this bug. ***
Are you sure that my (41950) bug is duplicate of this? I have seen this bug before reporting my, but the error message in my bug was different and showed no direct connection with kernel headers. BTW. I currently have 2.6.2-rc2-mm? (+ some patches) kernel.
Try to renave your kernel source tree (so that /lib/modules/<ver>/build and /usr/src/linux wont resolve. Install linux-headers-2.6.5. If that still do not work, try with gcc-3.3.3-r3 and latest binutils - might be that it needs a new attribute that I missed.
ok it works with linux-headers-2.6.5. why is the neccessary patch in linux-headers -2.6.5 but not in gentoo-dev-sources-2.6.5?
Compilation succeded after relinking /lib/modules/<ver>/build and /usr/src/linux to more or less vanilla 2.6.6-rc2-bk3 dir (kernel was compiled in this dir before). I did not installed linux-headers-2.6.5. I still have linux-headers-2.4.?. Thanks.
if the patch were included in gentoo-dev-sources it risks breaking the kernel itself, without fixing anything for anyone not using gentoo-dev-sources. it's good to hear that this bug is finally fixed upstream... i'll be looking forward to using nptl without jumping through hoops of fire.
I should just get glibc to check and fail if linux-headers is not 2.6.x.
that's a bad idea. a lot of other packages break with 2.6 kernel headers. if it were up to me, they wouldnt get installed until everything works with them. i think bundled headers just for glibc+nptl would work better, and having an upstream fix would be even better.
'a lot of other packages break with 2.6 kernel headers' ... do you have a list of packages to back that up ? ive been building my systems now with 2.6 headers and havent hit snags ... the ones i have hit, ive worked with plasmaroo to fix of course, this is just x86/hppa/ppc/arm that ive done this on ... i cant vouch for amd64/sparc/alpha :P
Kernel developers are yelling on LKML about once a week that kernel headers should not be used to build userspace apps _excluding_ glibc. And there is set of sanitized 2.6 kernel headers (with some pieces from 2.4 headers) that can be (probably) used by userspace. They are "maintained" by Mariusz Mazur <mmazur@kernel.pl> and probably used by PLD - Polish(ed) Linux Distribution. There are anounces on LKML from time to time... [Warning: I have never used it. And I have not very good opinion about this distro and its developers... But maybe headers are ok?]
we have researched other 'sanitized headers' and we know the state of what lkml feels on the subject ... we've just rejected other packages because they diverge so much from the actual kernel our linux-headers-2.6.x are patched to make them work with user space
i should harass lordkow to give a list, he's been using 2.6 headers... but on amd64, sash has yet to be fixed. i thought it would be good to go, but it isnt. i cant recall any other apps off the top of my head. also, i just recently fixed this bug that allowed NPTL to compile... which should compile with 2.6 headers without problem to begin with. at least on amd64, i would like not to push 2.6 headers yet. anyone on this bug like to comment on applications that give you a hard time with 2.6 headers?
are you refering to this bug with sash ? /usr/include/linux/percpu.h:45: error: `GFP_KERNEL' undeclared (first use in this function)