Go and Glibc Versioning

My biggest pain-point, as a developer, has to be dealing with dynamically linked executables on Linux. You could be having a fantastic day writing error free, all-tests-passing super code only to have everything ruined by an incompatibility with your target's GLIBC.

They strike like rattlesnakes. Biting when you're remote and far away from help. You didn't bring your compiler, who would? And you don't really want to install an entire language just to run a perfectly good executable.

What's really annoying is the unpredictability of creating a dynamically linked binary. You can throw a stone in any direction and hit a C++ critic, but one thing the language does right is explicit linking. You know what everything going into your binary is, because you manually put it there. It's a pain in the ass, but at least you aren't going to be dynamically linking to anything unintentionally. Rust is a little better. The language strives to create statically linked executables, but most of it's magic relies on LLVM and syscalls. You can be pretty certain with Rust that whatever you're building is going to have to rely on system libraries. It's not always clear, but at least it's a fair assumption. Go, however, has no such excuse.

Google, your language's entire purpose was to make networking concurrently easy. To do that, you gave it a kick ass garbage collector, an unparalleled ability to cross-compile, and self-hosted it so it could be statically compile and be distributed without HAVING TO WORRY ABOUT DYNAMIC LINKING. Why do you even link to GLIBC in the first place on any platform? Is it the speed benefits? Why is that not the optional behavior? You're working towards making it unnecessary, that much is obvious with go1.20.

go1.20

Why on Linux is it the default? "Over 90% of respondents target Linux! Even though more respondents develop on macOS than Windows, they more often deploy to Windows than macOS," according to the Go 2021 survey. Wouldn't it make sense to focus on promoting no CGO dependencies by default here?

godevsys

To further understand why this is a pain point, read the original article this post "reviews". I'll do more research on the topic and write about it later (either as an update here or an entirely new post). I just can't stand seeing this error anymore and it seriously impacts my enjoyment for writing GO.

Visit Archive.ph