[CentOS] question on compatibility and ldd

Fri Jul 15 17:43:16 UTC 2011
Devin Reade <gdr at gno.org>

--On Friday, July 15, 2011 12:49:59 PM -0400 Jerry Geis
<geisj at pagestation.com> wrote:

> Is it safe to assume then that if I switch to C6 and recompile my program
> and then put the C6 version on all my C5 systems (updates that kind of 
> thing) that everything
> will be compatible and run just fine.

Maybe not, and almost certainly not if you're packaging things
as RPMs. Going the other direction should be fine.

Generally speaking, dynamic libraries will be forward compatible
as long as the *major* version number doesn't change (changing
minor and patch version numbers are supposed to gaurantee no breaking
change in the API).

If the major version *does* change, then whether or not it breaks
a program depends on how the library was changed and how the program
was compiled (eg: whether or not its explicitly dependent on a 
particular major version number).

When it comes to RPMs, how yum/rpm behave is dependent on how 
the spec file is set up, but for a well written situation, the
spec file should be tied to the major rev number.

The good news is that if you compile something on C6, take it to
C5, run ldd on it and everything resolves, and your program isn't
doing any funky things in the realm of computing science, then
it may be fine.  But you're taking your chances if there have
been any signficant changes in the APIs that you're using directly
in your program.  Make sure you test ...

Devin