3 ms·
> You do need entirely distinct stacks, but that's necessary by definition. You can't have package A depend on packages B and C each of which depend on a differ
by eqvinox 3y ago
> You do need entirely distinct stacks, but that's necessary by definition. You can't have package A depend on packages B and C each of which depend on a different version of package D but expect to share API objects from D back through to A and therefore with each other.
Shared objects do in fact allow doing the safe subset of this, which is to load 2 versions of D that are used by packages B and C without exchanging API objects.
The C language has no good mechanism for enforcing this separation, as only one version of D's headers will be in use when compiling A, B and C. That said, there is a non-negligible number of situations (especially with libssl) where this is irrelevant because D is internal to one or both of B and C.
- rlpb 3y ago> Shared objects do in fact allow doing the safe subset of this, which is to load 2 versions of D that are used by packages B and C without exchanging API objects. It's a fair point. But in practice this can only be done when the versions of D have different sonames - at least with the usual filesystem layout we use for dynamic linking. In that respect, Python can do it too - we just don't typically embed the major version into our Python module names, as is typical with sonames.