3 ms·
I personally think it's a complexity management problem and a version management problem. Shared libraries make sense for "timeless" stuff like math or very cor
by api 11y ago
I personally think it's a complexity management problem and a version management problem. Shared libraries make sense for "timeless" stuff like math or very core system stuff, but beyond that there is too much variation both in version and in approach. Unless your target is a platform as rigidly managed as Apple, you must ship it all or you will get missing shared library errors.
I do think changes in how shared libraries are shipped or managed may help. I've had ideas for ages around using cryptographic hashes but have no time to experiment with such things.
- bitwize 11y agoThw thing about Apple is they give no fucks about backwards compatibility for developers anyway. You're a developer and you're working with Apple tech, so naturally you were waiting in line in the cold to get their latest hw and sw, weren't you? This bit me on the ass when Apple forced a libstdc++ update on OS X 10.3 with a new ABI, permanently breaking all C++ compilation on my Mac. Compiling C++ programs for 10.3 was still possible, but you needed a 10.4 machine, the latest Xcode, and compatibility libraries to do it.
- forgettableuser 11y agoThat wasn't just Apple. The reason that happened was because gcc went from 3 to 4 in that time frame. gcc and C++ never guaranteed binary compatibility, especially between major versions. I had similar problems on Linux and Solaris because of that transition. My own fault (actually my employer's) for assuming binary compatibility when it was never promised.
- bitwize 11y agoIndeed, but most Linux distros of the era did not force a new-ABI libstdc++ upgrade on you, breaking C++ compilation with a mandatory security update. Apple did. Therefore I bite my thumb at them.
- gpderetta 11y agoGCC transition from 3 to 4 didn't break the ABI. The last required ABI break was 3.0 to 3.1.
- forgettableuser 11y agoI'm not being pedantic. libstdc++ was mentioned. That always can break. The ABI between g++ transitions is also platform and architecture dependent. Mac was PowerPC back then. Sun used Sparc. Not everything is always x86, even on Linux.
- gpderetta 11y agoYou are right, I had forgot that GCC broke the libstdc++ ABI between 3.3 and 3.4 (not 3.x to 4.x though). That was 12 years ago, though, the ABI has been stable ever since [1]. I still would characterize it a fairly stable ABI, not something that "can always break", especially compared with other vendors that break the library ABI every release. [1] A new libstdc++ C++11 ABI was added in GCC 5.x but it is optional even in C++11 mode.