How can you tell if your embedded Linux system is running uClibc or glibc? If you use Buildroot to build your embedded Linux system, this is the default choice. You can choose other toolchains/libraries, but once chosen, how can you tell at runtime what library you are using? Here are a couple of ways.
First, run glibc the command line. It will report a bunch of information about itself:
GNU C Library (Sourcery G++ Lite 2011.03-41) stable release version 2.13, by Rol
and McGrath et al.
Copyright (C) 2011 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
Compiled by GNU CC version 4.5.2.
Compiled on a Linux 2.6.38 system on 2011-04-15.
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
Support for some architectures added on, not maintained in glibc core.
libc ABIs: UNIQUE
For bug reporting instructions, please see:
In a uClibc system, attempting to run the /lib/libc.so.0 (uClibc library file) in the same way results in a segfault:
Another way to tell would be to look in the files in /lib.
uClibc is usually installed in /lib/libuClibc-<version number>.so
and there is a link to it in /lib/libc.so.0
Glibc is in /lib/libc-<version number>.so
and there is a link to it in /lib/libc.so.6.
This work was done on an Atmel AT91SAM9x35 EK using their Buildroot-based implementation.
How to build Buildroot for the SAM9X35 EK:
More information on uClibc:
You must be a registered user to add a comment here. If you've already registered, please log in. If you haven't registered yet, please register and log in.