Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253874 - sys-libs/uclibc-0.9.30 fails to emerge with sys-kernel/linux-headers-2.6.28-r1
Summary: sys-libs/uclibc-0.9.30 fails to emerge with sys-kernel/linux-headers-2.6.28-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL: http://sources.busybox.net/index.py?v...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-05 16:58 UTC by Martin von Gagern
Modified: 2009-07-26 19:55 UTC (History)
3 users (show)

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


Attachments
avoids including asm/posix_types_32.h (from uClibc svn 24515) (kernel_types.h.patch,824 bytes, patch)
2009-02-13 23:16 UTC, Jan Psota
Details | Diff
includes kernel_types.h patching in uclibc-0.9.30.ebuild (uclibc-0.9.30.ebuild.patch,290 bytes, patch)
2009-02-13 23:20 UTC, Jan Psota
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2009-01-05 16:58:33 UTC
I get errors when I try to remerge uclibc-0.9.30 on my system. The compiler complains about redefinitions of typedefs:

In file included from /usr/include/asm/posix_types.h:3,
                 from /usr/include/linux/posix_types.h:48,
                 from /usr/include/linux/types.h:7,
                 from /usr/include/linux/if_ether.h:25,
                 from ./include/netinet/if_ether.h:27,
                 from ./include/netinet/ether.h:27,
                 from libc/inet/ether_addr.c:32:
/usr/include/asm/posix_types_32.h:10: error: redefinition of typedef '__kernel_ino_t'
./include/bits/kernel_types.h:15: error: previous declaration of '__kernel_ino_t' was here
/usr/include/asm/posix_types_32.h:11: error: redefinition of typedef '__kernel_mode_t'
./include/bits/kernel_types.h:16: error: previous declaration of '__kernel_mode_t' was here
...
/usr/include/asm/posix_types_32.h:38: error: redefinition of typedef '__kernel_loff_t'
./include/bits/kernel_types.h:38: error: previous declaration of '__kernel_loff_t' was here
/usr/include/asm/posix_types_32.h:43: error: conflicting types for '__kernel_fsid_t'
./include/bits/kernel_types.h:46: error: previous declaration of '__kernel_fsid_t' was here
make: *** [libc/inet/ether_addr.os] Error 1

Looks like the file ./include/bits/kernel_types.h shipped with uclibc conflicts with the file /usr/include/asm/posix_types_32.h installed by sys-kernel/linux-headers-2.6.28-r1. The uclibc version has a comment at the beginning:

 * Note that we use the exact same include guard #define names
 * as asm/posix_types.h.  This will avoid gratuitous conflicts
 * with the posix_types.h kernel header, and will ensure that
 * our private content, and not the kernel header, will win.

However, that comment is followed by defines for _ASM_X86_64_POSIX_TYPES_H and __ARCH_I386_POSIX_TYPES_H, while the posix_types_32.h from current linux-headers declares a macro called _ASM_X86_POSIX_TYPES_32_H instead, and the posix_types.h includes either posix_types_32.h or posix_types_64.h without any additional conditions.

A viable solution might be to add _ASM_X86_POSIX_TYPES_32_H to the list of guards. Likewise for 64 bit. Upstream has done so in their svn revision 24515:
http://sources.busybox.net/index.py?view=rev&revision=24515

Backporting that single changeset to uclibc-0.9.30 solved the issue for me. So simply grab the patch view of above changeset and apply it in the ebuild. As the header file is not only used at compile time, but also gets installed, this change affects installed versions and thus should be introduced in a revbump.
Comment 1 Jan Psota 2009-02-13 23:16:03 UTC
Created attachment 181911 [details, diff]
avoids including asm/posix_types_32.h (from uClibc svn 24515)
Comment 2 Jan Psota 2009-02-13 23:20:37 UTC
Created attachment 181913 [details, diff]
includes kernel_types.h patching in uclibc-0.9.30.ebuild

assumes kernel_types.h.patch can be found in ${FILESDIR}
Comment 3 Gordon Schumacher 2009-04-14 16:48:10 UTC
This also occurs with uclibc-0.9.28.3-r2 - in my case, I updated linux-headers, then tried to rebuild gcc (which yielded the same error).

Unrelated, but is it not bad form to remove ebuilds from the Portage tree that are the ones which are used in the most recent snapshot??  (uclibc-0.9.28.3-r2 is not in the tree, and it's what's installed in uclibc-hardened-2008.0.  So when I wanted to re-emerge uclibc, I had to hunt quite hard online to find the ebuild file!)
Comment 4 SpanKY gentoo-dev 2009-07-26 19:55:58 UTC
this is fixed in 0.9.30.1