Are there any version compatibilities between linux and klibc? I tried to compile the latest klibc (1.5.18) with the latest linux (2.6.32.15) and there is miserable compile failures. It looks like klibc wants some headers to be in include/asm (linked in my case to include/asm-x86) but they are instead in include/asm-generic (it seems all headers but one are in there). I put together this script to be sure I was doing the steps consistently for each attempt (and also starting with a pristine set of files each time): http://phil.ipal.org/linux-and-klibc/compile-linux-and-klibc Here is one of the bad results (running the above script): http://phil.ipal.org/linux-and-klibc/20100704-200321-025257-compile-linux-and-klibc.log I added a step to copy include/asm-generic to include/asm and that seemed to help some. But there was nothing in the README files about needing to do that. Here is a lot of that result: http://phil.ipal.org/linux-and-klibc/20100704-200541-017273-compile-linux-and-klibc.log Does someone know the way I should be doing this? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.zytor.com/pipermail/klibc/attachments/20100704/953051e7/attachment.html>
maximilian attems
2010-Jul-06 15:38 UTC
[klibc] version compatibility between linux and klibc
On Sun, Jul 04, 2010 at 08:30:03PM -0400, Phil Howard wrote:> Are there any version compatibilities between linux and klibc? I tried to > compile the latest klibc (1.5.18) with the latest linux (2.6.32.15) and > there is miserable compile failures. It looks like klibc wants some headers > to be in include/asm (linked in my case to include/asm-x86) but they are > instead in include/asm-generic (it seems all headers but one are in there).hmm I haven't tried exactly with 2.6.32.15, but it does compile with earlier 2.6.32. I'd more guess that you are doing something wrong here, see the output of "make help" on how to easily compile against linux-2.6.
On Sun, Jul 04, 2010 at 08:30:03PM -0400, Phil Howard wrote:> Are there any version compatibilities between linux and klibc? I tried to > compile the latest klibc (1.5.18) with the latest linux (2.6.32.15) and > there is miserable compile failures. It looks like klibc wants some headers > to be in include/asm (linked in my case to include/asm-x86) but they are > instead in include/asm-generic (it seems all headers but one are in there). > > I put together this script to be sure I was doing the steps consistently for > each attempt (and also starting with a pristine set of files each time): > > http://phil.ipal.org/linux-and-klibc/compile-linux-and-klibc > > Here is one of the bad results (running the above script): > > http://phil.ipal.org/linux-and-klibc/20100704-200321-025257-compile-linux-and-klibc.log > > I added a step to copy include/asm-generic to include/asm and that seemed to > help some. But there was nothing in the README files about needing to do > that. Here is a lot of that result:The above is wrong - klibc today should be built using exported headers. I tried with latest klibc + kernel. This worked for me: cd $KERNEL make headers_install cd $KLIBC make KLIBCKERNELSRC=$KERNEL/usr Note that "headers_install" install the userspace ready headers in $KERNEL/usr which is why this dir is specified as argument to KLIBCKERNELSRC. Sam
When trying to build klibc on a native i386 box it failed to include asm/posix_types.h This was tracked down to a wrong include path. For x86_64 it was correct. Fix it for i386. This should fix the build problem reported Phil Howard. Signed-off-by: Sam Ravnborg <sam at ravnborg.org> Cc: Phil Howard <kunnskaperen at gmail.com> --- Hi Max - a proper patch submission. Feel free to use this or whatever. Sam diff --git a/usr/klibc/arch/i386/MCONFIG b/usr/klibc/arch/i386/MCONFIG index ef112a4..f4cb914 100644 --- a/usr/klibc/arch/i386/MCONFIG +++ b/usr/klibc/arch/i386/MCONFIG @@ -31,3 +31,7 @@ KLIBCBITSIZE = 32 # calls, and work on the memory models for this architecture # 96 MB - normal binaries start at 128 MB KLIBCSHAREDFLAGS = -Ttext 0x06000200 + +# Asm includes for i386 are in the merged x86 tree +KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/x86/include +
FYI basically same patch was done and tested in OpenEmbedded on 2010-07-01: http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/klibc/klibc-1.5.18/klibc-x86-KLIBCARCHINCFLAGS.patch?id=d3c1b02dd6e4d5a128477ea594eb2d0c03d66b08 Regards Andrea
On Wed, 07 Jul 2010, Andrea Adami wrote:> FYI basically same patch was done and tested in OpenEmbedded on 2010-07-01: > > http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/klibc/klibc-1.5.18/klibc-x86-KLIBCARCHINCFLAGS.patch?id=d3c1b02dd6e4d5a128477ea594eb2d0c03d66b08thanks for info, added to commit message.
Apparently Analagous Threads
- [PATCH klibc 0/4] Fix the KLIBCKERNEL{SRC,OBJ} mess
- [PATCH 00/16] External building, update for 2.6.33 and multiple root devices.
- [PATCH klibc 0/2] Fix i386 build
- [PATCH klibc 1/3] Revert " Kbuild: Tell gas we don't want executable stacks"
- close then select of stderr fd in client (openssh)