[Buildroot] uclibc vs glibc

Michael S. Zick minimod at morethan.org
Mon Apr 11 12:15:27 UTC 2011


On Mon April 11 2011, Khem Raj wrote:
> On Sun, Apr 10, 2011 at 7:53 PM, Charles Krinke
> <charles.krinke at gmail.com> wrote:
> > Dear Khem:
> >
> > I apologize for asking my question improperly. Let me try again.
> >
> > Buildroot creates a roots with its internal toolchain, that is the one it
> > compiles as I understand it. With CodeSouecery, their web site for the none
> > buildroot now supports says it is glibc.
> >
> > I am trying to understand how, from inspecting the .so files in /lib on the
> > target how to tell the difference. For instance, just concentrating on
> > libc.so.6, I can see the uclibc, generated by buildroot from its compile
> > toolchain that this is a softlink to libc-2.6.1.so and is 1.38mbytes. I can
> > also see that the libc.so.6 in a rootfa create by the CodeSourcey 2010.09
> > toolchain is a softlink to libc-2.11.1.so and is 1.49 mbytes, a little
> > larger. I think the 2.6.1 libc is uclibc and the 2.11.1 libc is glibc.
> >
> 
> no. one is from glibc 2.6.1 another one from glibc 2.11.1
> uclibc will have something like libc.so.0 symlinked to libuClibc.so.0.9.xx
> and so on. similarly ld.so.0 on uclibc will be ld-uClibc-0.9.xx.so
> if you ls /lib on target it must be pretty clear
>

Plus, the libc from glibc is an executable.
Just run it and it will tell you its details.

~$ /lib/libc-2.7.so
GNU C Library stable release version 2.7, by Roland McGrath et al.
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.3.2.
Compiled on a Linux >>2.6.26-2-amd64<< system on 2011-01-08.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

I don't know if uClibc does the same trick.
But even if it doesn't, the fact that it doesn't will tell you
it isn't glibc.

Mike 
> > Can someone confirm that this is true? That is, that a rootfs built with
> > buildroot's internally compiled toolchain is uclibc, and that a roots built
> > with CodeSorcery's external toolchain in the latest release of buildroot is
> > indeed glibc.
> >
> > On Apr 10, 2011 4:36 PM, "Khem Raj" <raj.khem at gmail.com> wrote:
> >> On (10/04/11 16:08), Charles Krinke wrote:
> >>> I have a quesiton on a different subject and that is the difference
> >>> between
> >>> uclibc and glibc from the MPC8323ERDB target viewpoint.
> >>>
> >>
> >> they are entirely different root file systems.
> >>
> >>> Here is what I think I know:
> >>> 1. The toolchain is independent of the notion of uclibc vs glibc.
> >>> 2. Several of the .so files in /lib on the target will be different
> >>> between
> >>> uclibc and glibc.
> >>> 3. An application needs to be compiled with the static (or dynamic)
> >>> libraries pertinent to glibc or uclibc with appropriate header files to
> >>> expect it to run on the target.
> >>>
> >>> Questions:
> >>> 1. Which .so files on the target are different? ld, libc, libstdc++ only,
> >>> or
> >>> others?
> >>> 2. Are the differing files on the target going to have the same names
> >>> behind
> >>> their softlinks
> >>> like ld.so.1->ld-2.11.1.so for instance?
> >>> 3. Can I configure the CodeSourcery toolchain to produce a rootfs with
> >>> either uclibc or glibc and if so, what might be some of the steps?
> >>
> >> Try using -muclibc or -mglibc options.
> >>>
> >>> --
> >>> Charles Krinke
> >>
> >>> _______________________________________________
> >>> buildroot mailing list
> >>> buildroot at busybox.net
> >>> http://lists.busybox.net/mailman/listinfo/buildroot
> >>
> >>
> >> --
> >> -Khem
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> >
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 
> 





More information about the buildroot mailing list