News for hackers. Stuff that matters.
Re:Suckless.org: software that sucks less by delta_p_delta_x on Friday February 21, 2025 @05:23PM (#43133781)
Fun fact... Many Windows programs generally do some sort of 'hybrid static linking' (this is my own terminology) where programs are distributed with the `.dll` libraries just next to the binary. There is no concept of RPATH on Windows—the loader looks for dynamically-linked libraries in a fixed set of locations which includes the binary's directory.

Windows programs generally do link dynamically to core Windows libraries—which users are never expected to mess with anyway—and the C and C++ runtimes, but even these can be statically linked against with `cl.exe /MT`. Some programs even distribute newer versions of the C/C++ runtimes; that's where the famous Visual C++ Redistributables come from.

I agree, though—static linkage should be the default for end-user programs. I long for a time when Linux gets 'libc' redistributables and I can compile for an old-hat CentOS 6 distribution on a modern, updated, rolling-release Arch Linux without faffing with a Docker container.

Re:Suckless.org: software that sucks less by sunshowers on Friday February 21, 2025 @06:05PM (#43134196)
For Rust, cargo zigbuild lets you compile against arbitrary old glibc. Probably can get that working with C as well.
Re:Suckless.org: software that sucks less by forrestthewoods on Friday February 21, 2025 @08:34PM (#43135200)
> I long for a time when Linux gets 'libc' redistributables and I can compile for an old-hat CentOS 6 distribution on a modern, updated, rolling-release Arch Linux without faffing with a Docker container.

The Linux linking model is so bad. So extremely very bad. Build systems should never rely on whatever garbage happens to be around locally. The glibc devs should be ashamed.

Re:Suckless.org: software that sucks less by torstenvl on Saturday February 22, 2025 @12:05AM (#43136278)
It's true. I keep an Ubuntu 16 LTS VM around for making binary redistributables on Linux. It's the only way to ensure compatibility.
Re:Suckless.org: software that sucks less by aqueueaqueue on Friday February 21, 2025 @08:50PM (#43135293)
There was a time when 200Mb was a big HDD. Can forgive for that reason.
Re:Suckless.org: software that sucks less by porridgeraisin on Friday February 21, 2025 @11:25PM (#43136095)
Can you explain more? Curious and not able to google and understand this thread.

Specifically, what is stopping libc redistributables from being possible? And why disk size limitations from back then caused this situation.

Re:Suckless.org: software that sucks less by forrestthewoods on Saturday February 22, 2025 @02:08AM (#43136814)
Once upon a time hard drive space mattered and so it was arguably better to use shared libraries to reduce duplication. This is no longer relevant.
Re:Suckless.org: software that sucks less by forrestthewoods on Saturday February 22, 2025 @12:01AM (#43136259)
I can’t. At some point you simply have to move on.
Re:Suckless.org: software that sucks less by anacrolix on Friday February 21, 2025 @08:41PM (#43135233)
Noice
Re:Suckless.org: software that sucks less by torginus on Saturday February 22, 2025 @07:15AM (#43138311)
Imo this is a much saner solution for a system that supports precompiled applications.

Every time I tried to get a third-party binary app running on Linux, I discovered what the vendor did is they shipped half their dependencies as blobs, and relying on the system for the other half - which is an incredibly brittle system that breaks constantly.

The entry point usually is a script that sets LD_LIBRARY_PATH and then calls into the executable.

Re:Suckless.org: software that sucks less by GoblinSlayer on Saturday February 22, 2025 @10:48AM (#43140003)
Compiling for CentOS 6 is a linking problem, and any linker lets you link with whatever you want, it's a matter of running the linker with the right arguments.
Re:Suckless.org: software that sucks less by int_19h on Saturday February 22, 2025 @06:27PM (#43144366)
> There is no concept of RPATH on Windows—the loader looks for dynamically-linked libraries in a fixed set of locations which includes the binary's directory.

This is not true - you can control the DLL path via manifests. There's also a "known DLLs" list in registry which can globally redirect basically any DLL system-wide.

Re:Suckless.org: software that sucks less by kazinator on Saturday February 22, 2025 @09:13PM (#43145651)
Many programs link various libraries of theirs statically, but then dynamically link to the system C library.

For instance, GNU Make uses some of GNULib.

https://git.savannah.gnu.org/cgit/make.git (gl subdirectory)