Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What can I expect from using uClibc instead of glibc?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4683
Location: Theux (Belgium)

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

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 :D .

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”
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Mon Aug 08, 2011 9:53 pm    Post subject: Reply with quote

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

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, Alpine uses openrc.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2514
Location: UK

PostPosted: Mon Aug 08, 2011 10:43 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Mon Aug 08, 2011 11:06 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4683
Location: Theux (Belgium)

PostPosted: Mon Aug 08, 2011 11:08 pm    Post subject: Reply with quote

Ant P. wrote:
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”
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 140
Location: Finland

PostPosted: Mon Aug 12, 2013 6:25 pm    Post subject: Reply with quote

How can you bootstrap musl based Gentoo? I have toolchain built with musl-cross but i have no idea how to get portage to the sysroot.
_________________
https://github.com/defer-
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum