[klibc] a list of which kernel versions work with klibc

Phil Howard kunnskaperen at gmail.com
Thu Jul 22 18:16:52 PDT 2010


On Tue, Jul 20, 2010 at 8:55 AM, Gilles Espinasse <g.esp at free.fr> wrote:
>
> ----- "Phil Howard" <kunnskaperen at gmail.com> a écrit :
>
>> Is there a list of which kernel versions (are supposed to) work with
>> (each version of) klibc?
>>
> 1.5.15 work with 2.6.27.x
> http://ipcop.svn.sourceforge.net/viewvc/ipcop/ipcop/trunk/lfs/klibc?revision=3106&view=markup

I took a look at the combination of 1.5.15 and 2.6.27.48 deeper.  I
ran the build under strace.  When it got to invoking gcc to compile
usr/klibc/vsnprintf.c it failed to find the header "linux/limits.h".

See line 815 in:
http://phil.ipal.org/linux-and-klibc/2010-07-21/klibc-linux-combo-log/000331-klibc-1.5.15-linux-2.6.33.4-i686.log

I ran this build under strace to see more detail what was happening.
It was revealing.

See line 14710 in:
http://phil.ipal.org/linux-and-klibc/2010-07-21/klibc-linux-combo-log/000331-klibc-1.5.15-linux-2.6.33.4-i686.strace

(or search for string "29317 12:49:46.285925 execve" to find it if
string searching is easier)

This gcc command has ain incorrect -I argument.  In the argument
"-I/home/root/klibc-project-0/header-2.6.27.48include" the slash is
missing before "include".  It should have been
"-I/home/root/klibc-project-0/header-2.6.27.48/include".  This is a
definite culprit because it is the only way to find "include/limits.h"
in the nearby installed headers.

So I changed my script to append an extra "/" at the end of the
headers path.  It now builds completely (though a few new warnings I
hadn't seen before ... maybe I'll get around to investigating those
sometime).

The instructions posted earlier on this list to my first query, that
said to use KLIBCKERNELSRC= and point to the installed headers needs
to say to also include a trailing "/".  Newer Klibc versions don't
have this issue, so it's now more informational (to be given as advice
for building older versions ... no need to say this in a newer version
release since I presume the needed "/" is now in the Makefile where it
needs to be).

I'm going back to building some other versions this way to see what
happens.  Since Unix treats "//" as "/" inside a path, I should be OK
to leave that extra "/" in my script even for newer versions of Klibc
so I will not bother adding a version check for that.



More information about the klibc mailing list