I have a number of programs I wrote on Centos 5 (x86_64) and for one of the programs I do ldd programX linux-vdso.so.1 => (0x00007fff2cb86000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003528600000) libm.so.6 => /lib64/libm.so.6 (0x0000003527e00000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003531400000) libz.so.1 => /usr/lib64/libz.so.1 (0x0000003528a00000) libc.so.6 => /lib64/libc.so.6 (0x0000003527a00000) /lib64/ld-linux-x86-64.so.2 (0x0000003527600000) libdl.so.2 => /lib64/libdl.so.2 (0x0000003528200000) On C6 I do the same thing and the numbers in (Y) might change but everything else is the same for libraries. 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. Is that the case? Thanks, Jerry
Jerry Geis wrote:> I have a number of programs I wrote on Centos 5 (x86_64) and for one of > the programs I do > > ldd programX > linux-vdso.so.1 => (0x00007fff2cb86000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003528600000) > libm.so.6 => /lib64/libm.so.6 (0x0000003527e00000) > libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003531400000) > libz.so.1 => /usr/lib64/libz.so.1 (0x0000003528a00000) > libc.so.6 => /lib64/libc.so.6 (0x0000003527a00000) > /lib64/ld-linux-x86-64.so.2 (0x0000003527600000) > libdl.so.2 => /lib64/libdl.so.2 (0x0000003528200000) > > On C6 I do the same thing and the numbers in (Y) might change but > everything else is the same for libraries. > > 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.Unless they've changed the API i/o, it should work. mark
--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