GLIBC and MUSL
Oct 17, 2023
So there I was, trying to get my static site generator to run on Vercel when I was greeted with an error:
/lib64/libc.so.6: version `GLIBC_2.28' not found
Hmm. It worked on my machine! Well, a little research revealed to me that Rust executables aren't actually fully static, meaning they rely on GLIBC to work and hence there is a problem since, I assume, Vercel does not have GLIBC installed.
Researching more I found that the solution is MUSL,
which allows to build a fully static binary. I wanted to test it on my local machine before adding it to the
build pipeline, but getting musl-gcc
on macOS (M2) proved too difficult to install for me to care, so I just added it straight
to the build pipeline instead and voilà, now the executable runs on Vercel as well.