| ▲ | ben-schaaf 16 hours ago |
| Only because people aren't putting in the effort to build their binaries properly. You need to link against the oldest glibc version that has all the symbols you need, and then your binary will actually work everywhere(*). * Except for non-glibc distributions of course. |
|
| ▲ | LegionMammal978 11 hours ago | parent | next [-] |
| But to link against an old glibc version, you need to compile on an old distro, on a VM. And you'll have a rough time if some part of the build depends on a tool too new for your VM. It would be infinitely simpler if one could simply 'cross-compile' down to older symbol versions, but the tooling does not make this easy at all. |
| |
| ▲ | jhasse 4 hours ago | parent | next [-] | | It's actually doable without an old glibc as it was done by the Autopackage project: https://github.com/DeaDBeeF-Player/apbuild That never took off though, containers are easier. Wirh distrobox and other tools this is quite easy, too. | |
| ▲ | nineteen999 5 hours ago | parent | prev [-] | | Huh? Bullshit. You could totally compile and link in a container. | | |
| ▲ | LeFantome 4 hours ago | parent [-] | | Ok, so you agree with him except where he says “in a VM” because you say you can also do it “in a container”. Of course, you both leave out that you could do it “on real hardware”. But none of this matters. The real point is that you have to compile on an old distro. If he left out “in a VM”, you would have had nothing to correct. | | |
| ▲ | nineteen999 4 hours ago | parent [-] | | I'm not disagreeing that glibc symbol versioning could be better. I raised it because this is probably one of the few valid use cases for containers where they would have a large advantage over a heavyweight VM. But it's like complaining that you might need a VM or container to compile your software for Win16 or Win32s. Nobody is using those anymore. Nor really old Linux distributions. And if they do, they're not really going to complain about having to use a VM or container. As C/C++ programmer, the thing I notice is ... the people who complain about this most loudly are the web dev crowd who don't speak C/C++, when some ancient game doesn't work on their obscure Arch/Gentoo/Ubuntu distribution and they don't know how to fix it. Boo hoo. But they'll happily take a paycheck for writing a bunch of shit Go/Ruby/PHP code that runs on Linux 24/7 without downtime - not because of the quality of their code, but due to the reliability of the platform at _that_ particular task. Go figure. | | |
| ▲ | Rohansi 2 hours ago | parent [-] | | > But they'll happily take a paycheck for writing a bunch of shit Go/Ruby/PHP code that runs on Linux 24/7 without downtime - not because of the quality of their code, but due to the reliability of the platform at _that_ particular task. But does the lack of a stable ABI have any (negative) effect on the reliability of the platform? |
|
|
|
|
|
| ▲ | ok123456 15 hours ago | parent | prev | next [-] |
| If it requires effort to be correct, that's a bad design. Why doesn't the glibc use the version tag to do the appropriate mapping? |
| |
| ▲ | mikkupikku 14 hours ago | parent [-] | | I think even calling it a "design" is dubious. It's an attribute of these systems that arose out of the circumstance, nobody ever sat down and said it should be this way. Even Torvalds complaining about it doesn't mean it gets fixed, it's not analogous to Steve Jobs complaining about a thing because Torvalds is only in charge of one piece of the puzzle, and the whole image that emerges from all these different groups only loosely collaborating with each other isn't going to be anybody's ideal. In other words, the Linux desktop as a whole is a Bazaar, not Cathedral. |
|
|
| ▲ | chrismorgan 2 hours ago | parent | prev | next [-] |
| I don’t understand why this is the case, and would like to understand. If I want only functions f1 and f2 which were introduced in glibc versions v1 and v2, why do I have to build with v2 rather than v3? Shouldn’t the symbols be named something like glibc_v1_f1 and glibc_v2_f2 regardless of whether you’re compiling against glibc v2 or glibc v3? If it is instead something like “compiling against vN uses symbols glibc_vN_f1 and glibc_vN_f2” combined with glibc v3 providing glibc_v1_f1, glibc_v2_f1, glibc_v3_f1, glibc_v2_f2 and glbc_v3_f2… why would it be that way? |
|
| ▲ | TUSF 2 hours ago | parent | prev | next [-] |
| > You need to link against the oldest glibc version that has all the symbols you need Or at least the oldest one made before glibc's latest backwards incompatible ABI break. |
|
| ▲ | forrestthewoods 8 hours ago | parent | prev [-] |
| > Only because people aren't putting in the effort to build their binaries properly. Because Linux userland is an unmitigated clusterfuck of bad design that makes this really really really hard. GCC/Clang and Glibc make it effectively impossible almost impossible to do this on their own. The only way you can actually do this is: 1. create a userland container from the past
2. use Zig which moved oceans and mountains to make it somewhat tractable It's awful. |