Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
glibc vs musl vs uclibc[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1282

PostPosted: Wed Dec 25, 2019 8:53 am    Post subject: glibc vs musl vs uclibc[solved] Reply with quote

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


Joined: 06 Dec 2018
Posts: 539

PostPosted: Wed Dec 25, 2019 10:03 am    Post subject: Reply with quote

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


Joined: 21 Sep 2012
Posts: 1282

PostPosted: Wed Dec 25, 2019 10:10 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
gengreen
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2017
Posts: 123

PostPosted: Wed Dec 25, 2019 10:12 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1282

PostPosted: Wed Dec 25, 2019 10:20 am    Post subject: Reply with quote

perfect thank you both.

I will continue using glibc then
Back to top
View user's profile Send private message
Ionen
Guru
Guru


Joined: 06 Dec 2018
Posts: 539

PostPosted: Wed Dec 25, 2019 10:25 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1282

PostPosted: Wed Dec 25, 2019 10:33 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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