4 ms·
Practical options: 1. Statically link everything. 2. Bundle the shared libraries you depend upon. Long-term solutions: 1. Distributions should allow paralle
by parenthephobia 11y ago
Practical options:
1. Statically link everything.
2. Bundle the shared libraries you depend upon.
Long-term solutions:
1. Distributions should allow parallel installation of different library versions. so-files are already versioned, so this shouldn't really be all that difficult. That said, this doesn't help if you depend on specific versions of non-library files, like executables or headers.
2. Use docker, or something like docker, to formalize binding a binary to a particular version of a particular distro.
- ryao 11y agoSteam and Desura are also viable options for distribution in a developer friendly way.
- parenthephobia 11y agoI don't know about Desura, but Steam doesn't actually solve the problem. As far as distribution is concerned, Steam provides a way to get the files to the computer, but doesn't provide a consistent environment for them to run in. To pick two random examples, Portal 2 on Linux links against 20 system libraries, whilst Shadowrun Hong Kong links against 39. Even the Unity-based SUPERHOT links against 38. Obviously, Steam OS is a different beast.
- ryao 11y agoSteam is supposed to bundle the necessary libraries with the game.
- parenthephobia 11y agoOkay. I did more digging and you're more right than I thought. They do bundle a sort of mini-distribution of a particular set of libraries. Some important libraries not included include libGL(X), libpthread, libm, libdl, and libc. The reason for not bundling GL(X) is obvious - you have to use the GL libraries that match the graphics drivers you're using. I'm not sure about the rest, though. libc does sometimes have breaking changes. The bundles are maintained by Steam rather than by individual games. I'm not sure what happens if game A requires one version of a library and game B requires an incompatible version. It doesn't look like that would work out well.
- ryao 11y agoThe libraries you mentioned are designed so that all changes made are backward compatible. All of the ones that you mentioned excluding libGL are provided by glibc, which is known for backward compatibility. As for the incompatible versions being required, that would be handled by SONAME versioning, so it should work out fine. If there are somehow conflicts within a SONAME version due to poor planning, there is always the option of putting them in different paths and telling the ELF interpreter to look at paths based on what the game needs.