Red Hat Bugzilla – Bug 483644
glibc-headers/kernel-headers declaration conflicts
Last modified: 2015-04-26 06:14:02 EDT
glibc-headers-2.9.90-2 and kernel-headers-2.6.29-0.74.rc3.git3.fc11 appear to have declaration conflicts. If so, I don't know which one should be fixed, assigning initially to glibc.
/usr/include/sys/types.h:62: error: conflicting declaration 'typedef __dev_t dev_t'
/usr/include/linux/types.h:13: error: 'dev_t' has a previous declaration as 'typedef __kernel_dev_t dev_t'
/usr/include/sys/types.h:67: error: conflicting declaration 'typedef __gid_t gid_t'
/usr/include/linux/types.h:27: error: 'gid_t' has a previous declaration as 'typedef __kernel_gid_t gid_t'
/usr/include/sys/types.h:72: error: conflicting declaration 'typedef __mode_t mode_t'
/usr/include/linux/types.h:15: error: 'mode_t' has a previous declaration as 'typedef __kernel_mode_t mode_t'
/usr/include/sys/types.h:77: error: conflicting declaration 'typedef __nlink_t nlink_t'
/usr/include/linux/types.h:16: error: 'nlink_t' has a previous declaration as 'typedef __kernel_nlink_t nlink_t'
/usr/include/sys/types.h:82: error: conflicting declaration 'typedef __uid_t uid_t'
/usr/include/linux/types.h:26: error: 'uid_t' has a previous declaration as 'typedef __kernel_uid_t uid_t'
...etc. Full build log of vdr build failure due to this:
The problem persists with glibc-headers 2.9.90-3 and kernel-headers 2.6.29-0.93.rc3.git10.fc11:
Could someone have a look at this?
That's a bug in kernel-headers.
Add -D__KERNEL_STRICT_NAMES to your CFLAGS. You've asked for <linux/types.h> why would it be a suprise that it defines said types?
Not disputing that the kernel headers are stupid, but intermixing linux headers and glibc headers is invariably going to be fraught with problems.
Anyway, I added this to your CFLAGS, and a scratch build survived past dvbdevice.c, and then guttered later for unrelated reasons.
Finally, I suspect this was caused by a change from <asm/types.h> to <linux/types.h> in one of the DVB headers. This is going to break a whole lot of userspace and make me very grumpy, since userspace isn't defining the guard to prevent dev_t et al from being typedef'd.
Sorry for this Jakub, but I think this is only the top of the mountain.
(In reply to comment #3)
> You've asked for <linux/types.h>
> why would it be a suprise that it defines said types?
For the record, nothing in vdr directly includes <linux/types.h> so this is probably caused by problems elsewhere indeed, perhaps in the DVB headers like you mentioned.
I've also seen errors like this after adding -D__KERNEL_STRICT_NAMES and managing to get past some other compilation failures:
In file included from dvbdevice.h:13,
/usr/include/linux/dvb/frontend.h:92: error: '__u8' does not name a type
/usr/include/linux/dvb/frontend.h:93: error: '__u8' does not name a type
/usr/include/linux/dvb/frontend.h:98: error: '__u8' does not name a type
/usr/include/linux/dvb/frontend.h:99: error: '__u8' does not name a type
/usr/include/linux/dvb/frontend.h:330: error: '__u8' does not name a type
I don't know if this is related in any way, but I thought I'd mention it.
(In reply to comment #4)
> (In reply to comment #3)
> > You've asked for <linux/types.h>
> > why would it be a suprise that it defines said types?
> For the record, nothing in vdr directly includes <linux/types.h> so this is
> probably caused by problems elsewhere indeed, perhaps in the DVB headers like
> you mentioned.
Hm, in case the problem is in the DVB headers, it's in the kernel, no? Reopening in case the reason for closing this was the apparently mistaken thought that vdr would include <linux/types.h> itself.
Same behaviour in 22.214.171.124-102.fc11.x86_64
The problem is indeed that the dvb include files in the /usr/include directories are not in sync with the same include files in the /usr/src/linux/include directories.
VDR's make environment (Make.config) contains a variable DVBDIR that must point to the dvb include files for structures to be used to interface in the linux kernel DVB api.
To get to the right modules they in most cases will be defined as /usr/src/linux/
The variable is used in the compile phase to generate the -I<DVBDIR>/include flag.
So you can see what is happening now, the include files in the kernel that might conflict with the /usr/include/sys directory are now in the compilers include search mechanism.
So the bug really is that the dvb kernel include files are not in sync with the include files in /usr/include/linux.
So should the /usr/include/linux not be a symbolic link to /usr/src/linux/include/linux ?
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
Please forgive me if I am in the wrong place. I am new to this type of forum.
I am attempting to build glibc-2.5 under 2.6.9-89.ELsmp V5 32bit x86
and I believe I am running into the problem discussed here.
gcc ../sysdeps/unix/sysv/linux/if_index.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes -mpreferred-stack-boundary=2 -I../include -I/usr/local/src/glibc-2.5/build/inet -I/usr/local/src/glibc-2.5/build -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -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../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -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 -I../nptl -I.. -I../libio -I. -I /lib/modules/2.6.9-89.ELsmp/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -o /usr/local/src/glibc-2.5/build/inet/if_index.o -MD -MP -MF /usr/local/src/glibc-2.5/build/inet/if_index.o.dt -MT /usr/local/src/glibc-2.5/build/inet/if_index.o
In file included from /lib/modules/2.6.9-89.ELsmp/build/include/linux/netlink.h:5,
/lib/modules/2.6.9-89.ELsmp/build/include/linux/types.h:158: error: syntax error before "__sum16"
/lib/modules/2.6.9-89.ELsmp/build/include/linux/types.h:158: warning: type defaults to `int' in declaration of `__sum16'
/lib/modules/2.6.9-89.ELsmp/build/include/linux/types.h:158: warning: data definition has no type or storage class
/lib/modules/2.6.9-89.ELsmp/build/include/linux/types.h:159: error: syntax error before "__wsum"
/lib/modules/2.6.9-89.ELsmp/build/include/linux/types.h:159: warning: type defaults to `int' in declaration of `__wsum'
/lib/modules/2.6.9-89.ELsmp/build/include/linux/types.h:159: warning: data definition has no type or storage class
make: *** [/usr/local/src/glibc-2.5/build/inet/if_index.o] Error 1
make: Leaving directory `/usr/local/src/glibc-2.5/inet'
make: *** [inet/subdir_lib] Error 2
make: Leaving directory `/usr/local/src/glibc-2.5'
make: *** [all] Error 2
Please let me know if there is another venue where I could/should pursue this issue, Thanks!
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '11'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 11's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 11 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.