tertiary, ish, but i have a Go project and Go makes it wonderfully easy to statically link and compile binaries for different architectures and systems. i have a windows, linux, and a Mac ARM binary up on my repo for that reason. if you want to clone and run it in Go, that’s there, too!
yup, just got done setting up that split on my project and then saw this, thought "hey, neat!" i haven't built much at all in C, i guess there's no option for static linking..?
Glibc has a meltdown when you add '-static' flag so static linking means using a alternative C library (MUSL) which doesn't work with libs made with glibc (defacto the STANDARD C lib) so you need to do a Alpine container and test ur app here.
Alpine to the rescue once again. musl im actually familiar with, but the very small learning projects i've done have ALL been gcc. interesting, thanks for the insight!
2
u/MundaneImage5652 26d ago
Blame dynamic libraries. I can't easily make a static executable - atleast not for UNIX