uClibc with Linux 2.6.8 Headers

Ken Moffat zarniwhoop at ntlworld.com
Thu Jul 19 00:20:27 UTC 2007

On Tue, Jul 17, 2007 at 08:18:26AM -0500, Andrew McKay wrote:
> Hi,
> I'm building a new uClibc toolchain.  The toolchain consists of the following:
> 	binutils-2.16
> 	linux headers-2.6.8
> 	gcc-3.4.4
> 	uClibc-0.9.29
> I have successfully built the toolchain, and it will compile binaries.  I have 
> built busybox-1.6.1 with this toolchain, and most things seem to work.  However 
> when an application makes a socket system call the following message is printed out:
> 	Socket: Function not implemented
> I assume this has to do with changing Kernel headers, however I can't figure out 
> at this point how to get uClibc to work with Linux-2.6.8 headers.  Could someone 
> point me in the right direction of where to go?
> I realize that 2.6.8 is an older kernel, but at this point it is our stable 
> kernel being used in multiple systems.
 I'm not the man who can help you on the stated problem, but I can
query some of your details and perhaps remind you of some debugging
techniques - maybe that will help, maybe not.

1.  Since so much in uclibc is configurable, is it possible that
you've misconfigured uclibc ?  To put that another way - did you
change anything else since the last successful build, including the
application and any libraries it uses ?

2.  Strace (or a debugger, I suppose, but I've never tried with
uclibc) might show you which call returns the error.  If you can get
strace running, it should at least tell you what function is failing,
and then you get to read through the code and headers trying to work
out what is going on.  This is probably an essential starting point,
otherwise you will never get close to knowing _which_ header is
causing the problem.

3.  2.6.8 is not only prehistoric, it long predates the kernel's own
headers.  If you are really using 2.6.8 headers, it might help if
you explained where they come from (I'm not even sure if
linux-libc-headers was around in those days).  Your version of gcc
(at least, from an x86/x86_64/ppc perspective) is very old, so maybe
you do mean 2.6.8, but I suspect a typo for 2.6.18 ?

4.  You haven't mentioned your architecture.  I think 2.6.18 was the
beginning of the kernel's "make headers_install" and mostly working
on x86 (but with some oddities), and probably working less well on
other architectures.  If you can find where the error occurs, I
think there is a good chance you might be able to find a difference
in the current headers and backport it.  Alternatively, for some
architectures that seem to want to get their kernel from somewhere
other than kernel.org (mips comes to mind - my impression is it seems
to always need other patches) you might want to use different

5.  You "assume this has to do with changing Kernel headers", so
which were you using before ?

  The kernel interfaces are supposed to be backwards-compatible
(except where they aren't ;-) : if you revert the headers and rebuild
the system, does the application work ?  Do any applications that
don't use sockets run successfully ?  Given that you are using a
2.6.{8,18} kernel, do you need 'new' features that only it provides,
or will the old headers suffice ?  (that's for you to think about,
it's neither my business nor my interest).

das eine Mal als Tragödie, das andere Mal als Farce

More information about the uClibc mailing list