logoalt Hacker News

hamandcheesetoday at 7:44 PM1 replyview on HN

From experience: I work on a small team maintaining build infrastructure for my entire company. My goal, as much as possible, is to maintain a single build environment that can serve all purposes.

But it has proven quite the challenge to support old Linux distros. We have tried using nix to pin deps, but this easily leads to new issues: hardcoded RPATHs leaking into binaries, glibc compatibility issues, etc.

If we instead fork the build environment and use an old Ubuntu for building our Linux app, then my life gets harder, because now I have two targets for a whole lot of internal tooling that my team maintains, and that tooling needs to be deployed to both build environments. Again, its the same shit: glibc mismatches, missing/different shared libraries, etc. Just causing problems in a different place.

There is certainly some element of skill issue at play. But I wouldn't call it easy.


Replies

hparadiztoday at 8:31 PM

Me too but my job is easier since I can target a specific version of ubuntu so I'm making debs and I don't have that problem.

I have recently been working on a C11 GTK+ based task manager where I run into this. https://github.com/hparadiz/evemon/tree/main/packaging

This is why I said bundle your libs. If you bundle ALL of your libs you can't possibly run into an issue if your install script is run as root. Unless it's an extremely eccentric non desktop oriented system at which point that's kind of on them.

If you wanna cover 99.9% of Linux you build fedora, ubuntu, debian, nixos, arch and have a tar.gz as your overflow. For each target the lowest available LTS and don't waste time on distros that aren't getting security updates. It's not reasonable to ask for binaries built against your specific 11 year old gcc.

edit wanted to add one more thing.

I'm a big believer in having your tar.gz and install script inform your deb, rpm, aur, etc. It should be basically the same exact thing as your tar.gz just done in the format those distros want.