Possible Distributions quote of the year
Possible Distributions quote of the year
Posted Jan 24, 2025 8:49 UTC (Fri) by farnz (subscriber, #17727)In reply to: Possible Distributions quote of the year by bluca
Parent article: Distributions quote of the week
I have a C program linked against libc from 5 years ago that doesn't run on my modern system, because the C ABI is unstable, and I only have glibc's variant on the C ABI, not the one that the program from 5 years ago used (musl, I think, but I'm not sure).
You have to do a lot of work to keep a C program working if it's dynamically linked against a C library - it just happens that if you use glibc, they do that work for you.
Posted Jan 24, 2025 12:19 UTC (Fri)
by bluca (subscriber, #118303)
[Link] (10 responses)
Posted Jan 24, 2025 12:22 UTC (Fri)
by farnz (subscriber, #17727)
[Link] (9 responses)
Not that that should be a problem - after all, if C has a stable ABI, then I should be able to take a binary built against any libc and run it against glibc.
Posted Jan 24, 2025 12:44 UTC (Fri)
by bluca (subscriber, #118303)
[Link] (8 responses)
Nobody is saying that Rust should provide multiple independent and compatible standard libraries. At least one though would be nice...
Posted Jan 24, 2025 12:57 UTC (Fri)
by farnz (subscriber, #17727)
[Link] (7 responses)
Posted Jan 24, 2025 13:11 UTC (Fri)
by bluca (subscriber, #118303)
[Link] (6 responses)
Posted Jan 24, 2025 13:16 UTC (Fri)
by farnz (subscriber, #17727)
[Link] (5 responses)
Or I can use a language that also doesn't have a stable ABI of its own, and rely on the promises it makes, rather than digging through what "C has a stable ABI" means when you're not immersed in C on Linux day-in, day-out.
Posted Jan 24, 2025 13:46 UTC (Fri)
by bluca (subscriber, #118303)
[Link] (2 responses)
Posted Jan 24, 2025 13:47 UTC (Fri)
by bluca (subscriber, #118303)
[Link]
Posted Jan 24, 2025 13:51 UTC (Fri)
by farnz (subscriber, #17727)
[Link]
Posted Jan 24, 2025 18:01 UTC (Fri)
by Cyberax (✭ supporter ✭, #52523)
[Link] (1 responses)
It's a stable ABI if you don't update it. See? Very easy!
Posted Jan 24, 2025 19:01 UTC (Fri)
by daroc (editor, #160859)
[Link]
Possible Distributions quote of the year
getaddrinfo is the symbol that the dynamic linker complains about - there's something different about the glibc implementation to whichever libc this was linked against.
Possible Distributions quote of the year
Possible Distributions quote of the year
Why should it be obvious that, in a language with a "stable ABI", I can't pick and choose implementations of that "stable ABI", but have to limit myself to the glibc ABI, not the C ABI?
Possible Distributions quote of the year
Possible Distributions quote of the year
So what you're saying is that if someone accepts your definitions of what "C" is (after all, the standard library is part of C), then by your definitions, C has a stable ABI, as long as I limit myself to a single platform. But only if I limit myself to the subset of C that has a stable ABI on that platform, and don't try to use the parts of C that don't have a stable ABI on that platform, and then take care to use an implementation of the bits of C that don't have a stable ABI that, as an implementation issue, also promises a stable ABI on that platform, rather than an implementation with a different ABI, or even an unstable ABI.
Possible Distributions quote of the year
Possible Distributions quote of the year
Possible Distributions quote of the year
Changing to "the glibc ABI is stable" is not what you said, though. You promised me that the C ABI is stable, and it's, as a practical matter, not, since I have a binary written in C using just a POSIX libc that I cannot run, because I no longer recall which specific C it depends upon.
Possible Distributions quote of the year
Possible Distributions quote of the year
Possible Distributions quote of the year