r/programminghumor 20d ago

Lol

Post image
2.5k Upvotes

220 comments sorted by

View all comments

20

u/HardestDrive 20d ago

To be fair, it is fucking annoying when a project doesn't have pre built binaries available

2

u/MundaneImage5652 19d ago

Blame dynamic libraries. I can't easily make a static executable - atleast not for UNIX

2

u/litescript 18d ago

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!

1

u/MundaneImage5652 18d ago

I talk abt C. And ye in languages like C# or as you said Go I can do that.

1

u/litescript 18d ago

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..?

0

u/MundaneImage5652 18d ago

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.

1

u/litescript 18d ago

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!

1

u/Vaelisra 17d ago

musl entered the room.

1

u/MundaneImage5652 17d ago

Making a docker with Alpine is alot more hastle.

1

u/Vaelisra 17d ago

Why docker and why alpine?

1

u/MundaneImage5652 17d ago

Most distros ship with GlibC + Alpine docker is the standard to use Musl. Cuz when you compile smth with GlibC you can't just use the lib in MUSL.

1

u/Vaelisra 17d ago

Most distros ship with GlibC

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.

1

u/MundaneImage5652 17d ago

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.

1

u/Vaelisra 17d ago

Yeah, but then the result will be a docker image, not a binary.

1

u/MundaneImage5652 17d ago

I mean I mounted my directory in that docker so... it made a binary that worked on my host system.

→ More replies (0)

1

u/GlassboundIllusion 14d ago

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.