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
New cross-distro backward compatibile way of shipping binary
Re: New cross-distro backward compatibile way of shipping bi
You went the hard way with that. There is nothing in new GCC that requires new glibc, it's perfectly reasonable to run an older distro and compile the latest gcc on it.
For libstdc++ and libgcc_s, I usually statically link those, since there are no shared c++ libraries in use. The GCC runtime library exception allows this.
For libstdc++ and libgcc_s, I usually statically link those, since there are no shared c++ libraries in use. The GCC runtime library exception allows this.
Re: New cross-distro backward compatibile way of shipping bi
I'm talking about compiling the binary on a new distro, with new GLIBC and GCC and shipping to a distro with old GLIBC and old GCC
Re: New cross-distro backward compatibile way of shipping bi
Yes, and I'm saying that's harder than what you need to have access to new GCC and compatibility with older base libraries.
Re: New cross-distro backward compatibile way of shipping bi
hendu wrote:You went the hard way with that. There is nothing in new GCC that requires new glibc, it's perfectly reasonable to run an older distro and compile the latest gcc on it.
For libstdc++ and libgcc_s, I usually statically link those, since there are no shared c++ libraries in use. The GCC runtime library exception allows this.
Re: New cross-distro backward compatibile way of shipping bi
I myself usually compile the standard libraries statically. The executable grows, but it's a small price to pay for the program to be self contained.