libc or glibc in ubuntu?

Viewed 15595

I'm a little bit confused with these libraries. I'm working on Ubuntu now, I use g++ 5 and I see that my applications link in libc.so. Is it a Ubuntu's implementation of C standard library? Is it different from glibc?

$ ldd application.exe
...
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
...
2 Answers

Current Ubuntu uses glibc for the C standard library implemnetation. The source package is called glibc, but the installed binary package is called libc6 for historic reasons. You can see the exact version of the libc6 package on your system if you run this command:

dpkg -l libc6

There used to be a temporary fork of glibc called eglibc, but eglibc development has been abandoned; all active eglibc-specific ports were merged into glibc before that.

Ubuntu also has packages for alternative libc implementations such as musl, but the distribution itself does not use them because it is glibc-based.

Libc is the name of the standard library for the C programming language. Glibc is one of many different implementations of libc. In particular, Glibc is the libc implementation that is developed and maintained as part of the GNU project.

Glibc is one of many different implementations of libc. Some other well-known implementations are the Microsoft Visual C Runtime (which includes a libc), musl, dietlibc, µClibc, the various BSD libcs, and Google Bionic (the libc that is shipped with Android).

Related