While trying to create an x86-64 appliance, I naturally wanted to compile glibc 2.23. I managed to do so through

mkdir build
cd build
../configure --enable-kernel=2.6.32 


make -j4 install_root=/path/to/appliance/root && make install install_root=/path/to/appliance/root

The result comes out to over 100 MB, and I look at the Debain libc package and wonder how they got it to be only a few megabytes in comparison. It seems much of the space comes from locales and charsets that I will likely never need.

Is it possible to cut stuff out?

  • 4
    What takes 100MB? Analyze the output a bit further, at the very least run du to see what's taking space. In Debian the locales are shipped separately and compiled on demand, the locales-all package is ~110MB. If you want to run in limited space, maybe you should use an alternate libc designed for embedded systems. Why are you building your own anyway rather than use a distribution? Apr 16, 2016 at 23:53
  • Use newlib instead? Apr 17, 2016 at 0:07

2 Answers 2


Not exactly an answer to your question but since size matters you should consider using musl instead of glibc. This also makes all the binaries statically or dynamically linked against that libc way smaller.




  • musl is great +1. Sep 15, 2016 at 20:07

Don't build locales that You don't need, remove all static libraries that You won't need, and strip debug symbols from shared ones. That should cut it down to size nicely.

  • That's actually a pretty good answer, but it would much better if you gave more specific instructions to do it. Sep 15, 2016 at 20:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .