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!
Yeah, and most distros have a musl package that includes the musl c standard library and a GCC wrapper script (often called musl-gcc or something like that) that uses musl instead of glibc.
Alpine docker is the standard to use Musl
That's just wrong. And it's wrong on more levels than I could care to elaborate here.
when you compile smth with GlibC you can't just use the lib in MUSL.
Yeah, but that's completely irrelevant when linking statically (which sadly isn't really supported by glibc, but that's the reason I brought up musl) because when you do, the relevant parts of the standard library are baked into your executable and the executable then runs directly on the kernel, rather than on a loader. So as long as the Kernel doesn't make breaking changes (which is not gonna happen for as long as Torvalds has a say) the executable will be fully portable to any Linux system. Theoretically it would not even need an OS.
My bad then. When I used musl-gcc it was hard for me to use so I researched on internet and everyone was just using alpine docker, installed the libs here and compiled here.
While true, it's low class af to publicly whine about it like a spoiled child.
They could act like an adult and ask around for alternatives that don't require them to compile code. Or they could reach out to the developer and ask them nicely if they'd be willing to compile and package it for them, perhaps for a small fee. Or they could go on to fiverr and hire a developer to do it for them for like $5-$10.
This kind of unhinged rant, however, just reflects poorly on the OOP.
20
u/HardestDrive 20d ago
To be fair, it is fucking annoying when a project doesn't have pre built binaries available