Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How compatible are different versions of glibc?

Specifically:

  1. Is it assured somehow that all versions of glibc 2.x are binary compatible?

  2. If not, how can I run a binary (game) on my system which has been compiled for a different version? Can I install glibc in a different folder?

My specific problem is the compatibility between glibc 2.14 (what I have) and 2.15 (what the game wants).

I might also get a version for glibc 2.13 but I'm not sure if that will run on 2.14.

like image 398
Aaron Digulla Avatar asked Jun 19 '12 18:06

Aaron Digulla


People also ask

Is glibc backwards compatible?

Glibc has a versioning system that allows backward compatibility (older programs built to run on older versions of glibc will continue to run on new glibc); but it is of no help the other way around: programs that depend on newer glibc will usually not run on systems with older glibc.

Is G ++ backwards compatible?

In order to allow compilation of C++ written to such drafts, G++ contains some backwards compatibilities. All such backwards compatibility features are liable to disappear in future versions of G++. They should be considered deprecated.

What is the latest version of glibc?

The current stable version of glibc is 2.36, released on August 1st, 2022. The current development version of glibc is 2.37, releasing on or around February 1st, 2023.


2 Answers

In general, running binaries that were compiled for an older glibc version (e.g. 2.13) will run fine on a system with a newer glibc (e.g. 2.14, like your system).

Running a binary that was built for a newer glibc (e.g. 2.15, like the one that fails) on a system with an older glibc will probably not work.

In short, glibc is backward-compatible, not forward-compatible.

like image 161
Kenneth Hoste Avatar answered Oct 09 '22 11:10

Kenneth Hoste


There are only minor binary compatibility issues between glibc 2.14 and glibc 2.15 according to the report from the Linux upstream tracker.

The report is generated by the abi-compliance-checker and abi-tracker tools.

enter image description here

See also https://sourceware.org/glibc/wiki/Testing/ABI_checker.

like image 22
linuxbuild Avatar answered Oct 09 '22 10:10

linuxbuild