New cross-distro backward compatibile way of shipping binary
Posted: Mon Aug 21, 2017 5:55 pm
Hi,
For a number of years we've had a problem with our closed sourced game to run on many linux distributions.
The reason for that was, the GLIBC shared libraries which provides all the C and C++ library standard functions (as well as pthreads, etc.) had different versions across the distributions and although backward compatible (older compiled software could still run on newer releases) it precludes anyone from building a binary with the latest GCC toolchain and being able to run it on an older OS with an OLDER GLIBC.
Turns out you can force the dynamic linker to load older versions of symbols from any library with symbol versioning (most GNU Linux system libraries), but this needs to be done explicitly. Hence we've managed to obtain and modify a script to get every-single-funking-function-and-its-highest-version-below-specified-version-cap and put the explicit linker instructions in a C/C++ header file.
https://github.com/devshgraphicsprogram ... es/tag/1.0
For a number of years we've had a problem with our closed sourced game to run on many linux distributions.
The reason for that was, the GLIBC shared libraries which provides all the C and C++ library standard functions (as well as pthreads, etc.) had different versions across the distributions and although backward compatible (older compiled software could still run on newer releases) it precludes anyone from building a binary with the latest GCC toolchain and being able to run it on an older OS with an OLDER GLIBC.
Turns out you can force the dynamic linker to load older versions of symbols from any library with symbol versioning (most GNU Linux system libraries), but this needs to be done explicitly. Hence we've managed to obtain and modify a script to get every-single-funking-function-and-its-highest-version-below-specified-version-cap and put the explicit linker instructions in a C/C++ header file.
https://github.com/devshgraphicsprogram ... es/tag/1.0