I understand that Rocky Linux is intended to be a downstream, complete binary-compatible release using the Red Hat Enterprise Linux (RHEL) operating system source code.
However, I was trying to find information on binary compatbility between major versions of Rocky Linux.
From the RHEL application compatibility guide it states that
Major releases of Red Hat Enterprise Linux contain a limited set of backward-compatible libraries included in previous major releases to allow for the easy migration of applications. Typically, Red Hat applies changes in such a way as to minimize the amount of change and to maintain binary compatibility
Does Rocky Linux maintain or try to maintain binary compatibility between major versions? More specifically, my question would be whether Rocky 8 retains binary-compatible with Rocky 9?
No, there is no compatibility between major versions. Major versions vary wildly on the core libraries (such as glibc) and development library versions as well in some cases. There are no (and never will be) guarantee of compatibility between major versions.
It is never recommended to try to run something built on 8 (that has
el8 in the package version) on 9, or vice versa, due to the varying glibc and core library differences between the two. If something is on 8, but is not on 9, that is when you rebuild the source package to ensure it is built for and can run on 9.
The answer to that is no, Rocky does not.
Rocky 8 is binary compatible with RHEL 8.
Rocky 9 is binary compatible with RHEL 9.
RHEL 9 is not binary compatible with RHEL 8.
However, the optional “limited set of backward-compatible libraries” that is in RHEL 9 allows
execution of some old binaries (that cannot be rebuilt).
Since Rocky 9 is binary compatible with RHEL 9, Rocky 9 has the same set of backward-compatible libraries and can thus run the same set of old binaries.
As said, that workaround is only for (some, proprietary?) applications that one can’t build on el9.