# glibc vs musl vs uclibc[solved]

## Adel Ahmed

I have started reading about the available c libraries available in linux and I came across musl and uclibc.

I understand some differences but I was wondering which one should I use on my PC and laptop.

I would like to know if switching the c library would make any difference in performance or memory consumption, the laptop is very low on memory(2G).Last edited by Adel Ahmed on Wed Dec 25, 2019 10:33 am; edited 1 time in total

----------

## Ionen

Other libcs have their use cases, but generally not using glibc just means a lot of annoyances and limitations. Not because of the libc but because of the software themselves relying on glibc rather than sticking to standards, musl does have an overlay to try to go around most of this though. Ultimately the libc will reside in shared memory and not really hurt memory-wise, not going to matter on 2GB system anyway (maybe if you were trying to run linux on a old 32-64MB ram system).

For memory usage, have you considered running a 32bit-only system if not already? 64bit is a bit much for only 2GB.

----------

## Adel Ahmed

a 32 bit system is actually a great idea.

Wish I had thought of that before installing everything

is there an easy way to switch? would enabling the abi_x86_32 use flag globally and disabling the 64 bit one be sufficient?

I also assume some packages will only be avialable in 64 bit binaries correct?

I guess I will abandon chaning the libc on these systems.

----------

## gengreen

glibc is faster than musl  and maybe more compatible with every application / software

However musl is much smaller in size and is written with security conscious mind. When vulnerability expose the C library it expose the entire system too...

I have glibc on my hard drive where Gentoo desktop profile with steam and skype, Google chrome kde...

I have musl on my work hard drive where Gentoo hardened musl with a deblob kernel, elinks, fluxbox 

That's should give you the guideline

----------

## Adel Ahmed

perfect thank you both.

I will continue using glibc then

----------

## Ionen

 *Adel Ahmed wrote:*   

> is there an easy way to switch? would enabling the abi_x86_32 use flag globally and disabling the 64 bit one be sufficient?

 Those flags are more specifically for multilib, your system is still going to try to be 64bit "main". Need to switch to a x86 profile, and I "imagine" it'll get messy if not starting over.

 *Quote:*   

> I also assume some packages will only be available in 64 bit binaries correct?

 A lot of binary packages (lke firefox-bin/libreoffice-bin/etc...) have a x86 version if you want to save yourself some heavy compiling. Just check if they have the x86 keyword.

Edit: continuing in new thread since you made one and this one is getting off topic.Last edited by Ionen on Wed Dec 25, 2019 10:46 am; edited 1 time in total

----------

## Adel Ahmed

I want to enable x86_32 on as many packages as possible in this case, should I create a custom profile? is this a bad idea?

----------

