Posted: Mon Aug 08, 2011 8:17 pm Post subject: What can I expect from using uClibc instead of glibc?

Hi all.

I've decided to explore unknown (speaking for myself) areas of GNU/Linux and I found there were alternate C libraries, mostly for the embedded world, one of them is uClibc. As I got a mini PC (for a media centre usage mostly) that embeds an Intel Atom, I decided I would try booting it with a small footprint Gentoo system, i.e. busybox, uClibc, openrc and baselayout.

So far the system is pretty functional with only 18 MB. It works. It even boots in less than 3 seconds under Qemu (one CPU enabled), which makes me of course pretty happy .

But I only got TTY's, no fancy graphics — except the framebuffer, which I could use, of course. Then I looked further and realized most of the packages I use on my daily systems depend on glib, which is masked in the uclibc profile because the latter doesn't support locales — someone correct me if I'm wrong.

Does that mean I'm doomed to text-mode with uClibc? Aren't there graphics libraries that work with uClibc? Won't boot time suffer if I make my system depend on glibc, which would also make busybox useless too for it'll offer no sensible benefit — again, someone correct me if I'm wrong.

I have read on uClibc web site that locale support is on the way. Does that mean it'll unlock the wonders of graphics utilities that depend on glib? The question is of course when these features will be available.

Any thoughts?_________________Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”

You might want to try musl too - it's compatible with a lot already (glib works for instance) and the stated goal is full standards support i.e. anything that runs on glibc. The only big downside is no C++ support yet._________________runit-init howto | Overlay - gtk2 stuff

Yeah, musl is cool. uClibc looks like a bloated pig next to it. A distro to showcase it is available too, Sabotage Linux. It has X, though not much more for now. So if you're really adventurous, play with that. I'm not sure about glibc compatibility though, because musl is really strict regarding adherence to standards, whereas glibc is... not. But who knows what the future will bring, development is very active.

You might want to try musl too - it's compatible with a lot already (glib works for instance) and the stated goal is full standards support i.e. anything that runs on glibc. The only big downside is no C++ support yet.

It has a nice feature comparison chart indeed. What do you use for the tool chain as it's not in portage? I also suppose it involves a lot of tweaking other official ebuild if I want to go with Gentoo, right? Or is it best to use a binary distro that uses it?

My basic needs are rather small as long as I can tweak the system easily and use fairly recent nVidia drivers for the acceleraton they can bring to the GeForce 210 (GT218). Means Xorg in all logic.

EDIT: I just found Sabotage Linux (hinted at by Gusar) and it's said to work with Gentoo and two others, that sounds fairly interesting!

Gusar wrote:

Using glibc won't make busybox useless, you're still replacing a lot of userspace with one tiny binary.

I was considering space (hence maybe speed) since the gain of space with busybox is not considerable compared against the whole lot of tenths of megabytes the rest will consume. But maybe it's worth spending some time one it.

Gusar wrote:

Though, the "no glib with uclibc" bit surprises me. There's Alpine Linux, an uclibc/busybox distro, and it provides a full XFCE. So it is definitely possible. Interestingly enough, Alpine uses openrc.

I saw Alpine referred to by RAT Linux in fact, which I based my "project" upon. Didn't check that. So there's hope! Thanks, will investigate._________________Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”