r/voidlinux • u/Betty_Rav1oli • Apr 21 '26
What is the difference between glibc and musl
Hello
I'm an arch user wanting to switch to Void to escape SystemD hell and im wondering what the difference is between the glibc version and the musl version
40
Upvotes
46
u/thisisnotmynicknam Apr 21 '26
First of all, if you're asking this in a forum, use glibc.
musl and glibc are standard C libraries for Linux. musl is lighter in terms of both processing and file size, and it's compatible with UTF-8, which is the most modern standard for strings. The idea in Unix is that everything communicates via sockets, which implies string exchange. However, glibc is older, more stable, and has greater compatibility, considering that most programs are built on top of glibc. It's possible to adapt it, create compatibility scripts, and so on, but it's a lot of work. That's why I recommend using glibc. If you didn't know the difference until now, it's unlikely you'll understand package dependencies well enough to solve compatibility problems on your own.
12
u/sdothum Apr 21 '26 edited Apr 21 '26
Unless you have a specific use case for musl, just go with glibc.
The musl environment is just more restrictive from a general application perspective -- which can be gotten around in most cases with flatpaks, appimages, etc. (but then it begs the question why not use glibc outright and avoid the issues these bring along).
In some instances, hardware such as nvidia gpu's, musl is not an option -- CUDA is compiled against glibc (and nvidia has no intention of supporting musl).
If you are still interested in musl, you might wish to consider Alpine Linux -- probably the most installed musl implementation (for containers and servers).
1
u/goldmurder Apr 22 '26
well, musl is stated to be more clean and lightweight (and it really is). theoretically, this could decrease your compiling time and perfomance overall, but it is only on the paper, glibc is more perfomant and compatible. the only reason I see myself to use musl is that it doesn’t have 32-but software support at all, which is great
-1
u/Legitimate-Draw-2235 Apr 22 '26
What do you mean by escaping SystemD hell?
What exactly is your problem with SystemD?
0
u/stroke_999 Apr 22 '26
Others comments explain the differences better, but for and end user musl=more secure but no nvidia drivers (closed source), glibc=better performance sometimes and more software