Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73583 - [[ 2.6 headers ]] bootstrap fails when building uClibc
Summary: [[ 2.6 headers ]] bootstrap fails when building uClibc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-06 13:15 UTC by Priit Laes (IRC: plaes)
Modified: 2005-01-11 19:42 UTC (History)
0 users

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


Attachments
Possible fix to linux26-headers (prefetch.h-uClibc-fix.patch,586 bytes, patch)
2004-12-06 13:19 UTC, Priit Laes (IRC: plaes)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Priit Laes (IRC: plaes) 2004-12-06 13:15:55 UTC
Build error:

gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing  -mpreferred-stack-boundary=2 -falign-jumps=0 -falign-loops=0 -Os      -fno-stack-protector-all -fstack-protector -fno-builtin -nostdinc -D_LIBC -I../../../../include -I. -I/usr/lib/gcc-lib/i386-pc-linux-uclibc/3.3.4/include -DNDEBUG -fPIC -c ssp.c -o ssp.o
In file included from ../../../../include/linux/list.h:5,
                 from ../../../../include/linux/sysctl.h:23,
                 from ../../../../include/sys/sysctl.h:28,
                 from ssp.c:32:
../../../../include/linux/prefetch.h: In function __cast__'
../../../../include/linux/prefetch.h:63: error: syntax error before "char"
../../../../include/linux/prefetch.h:65: error: syntax error before "char"
../../../../include/linux/prefetch.h:65: error: syntax error before ')' token
../../../../include/linux/prefetch.h:65: warning: statement with no effect
make[4]: *** [ssp.o] Error 1
make[4]: Leaving directory /var/tmp/portage/uclibc-0.9.26-r7/work/uClibc-0.9.26/libc/sysdeps/linux'
make[2]: *** [_dir_linux] Error 2
make[2]: Leaving directory /var/tmp/portage/uclibc-0.9.26-r7/work/uClibc-0.9.26/libc'
make: *** [_dir_libc] Error 2

It also had some kind of redefinition warnings, but these were eliminated when using latest ssp.c from uClibc CVS.
Comment 1 Priit Laes (IRC: plaes) 2004-12-06 13:17:13 UTC
I'm using stage1-hardened-embedded x86 with linux26-headers.

Possible fix following.
Comment 2 Priit Laes (IRC: plaes) 2004-12-06 13:19:38 UTC
Created attachment 45399 [details, diff]
Possible fix to linux26-headers

I'm not sure about the paths or whether this works or not. The new prefetch.h
is taken from 2.6.9.1 sources.
Comment 3 Priit Laes (IRC: plaes) 2004-12-06 22:19:51 UTC
This patch fixed (new prefetch.h) the uClibc build. Could we get this into portage ASAP?
Comment 4 solar (RETIRED) gentoo-dev 2004-12-07 02:01:13 UTC
Already fixed in our -r8/-r9 (should be in portage shortly if not already)
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2004-12-07 08:20:48 UTC
Try -r8... The patch is no good since C++ apps will break...
Comment 6 Priit Laes (IRC: plaes) 2004-12-07 13:01:44 UTC
Tried with uclibc-r8, still b0rkage.
Is it possible to add some kind of #ifdef cplusplus conditionals into prefetch.h?
Comment 7 solar (RETIRED) gentoo-dev 2004-12-07 13:11:00 UTC
ignore me.
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2004-12-26 11:54:11 UTC
Something with a broken toolset than headers; I can compile this fine using the same set of headers, albeit on a non-embedded system.
Comment 9 SpanKY gentoo-dev 2005-01-11 08:09:49 UTC
tim's right, we can blame uclibc ...

when _LIBC is defined, uclibc's features.h fakes out __LINUX_COMPILER thus 
preventing the real linux/compiler.h from being included

this prevents __cast__ from being defined

fix is to add __cast__ to uclibc's features.h which i'll do in our ebuild and upstream
Comment 10 SpanKY gentoo-dev 2005-01-11 15:04:48 UTC
ok, ive fixed this upstream, just need to add the patch to our 0.9.26-r8 :)
Comment 11 SpanKY gentoo-dev 2005-01-11 19:42:02 UTC
fixed in cvs, thanks !