0

So we have this program which is being compiled in OpenSuse 13.1 with the following configuration:

  • GCC 4.6-15.1.3
  • GLIBC 2.14
  • Libcrypto 1.0

However, it's supposed to run with OpenSuse 10.3 which has the following configuration:

  • GCC 4.2-24
  • GLIBC 2.6.1-18
  • Libcrypto 0.9.8

The only dependency I could find so far was the __isoc99_sscanf which is introduced in GLIBC 2.7. I tried to fix this with writing my own sscanf function and replace it by adding the following line in my source code: __asm__(".symver __isoc99_sscanf1, __isoc99_sscanf@@GLIBC_2.7");

Now I'm left with the libcrypto dependency and it also looks like it's segfaulting on a munmap() (when i strace the program) function when I try to run it in the old OpenSuse environment (could be a GCC thing?)

So basically, I don't really know what the standard procedure is for fixing this kind of backwards compatibility issues. Any idea's on this?

Evert
  • 563
  • 1
  • 5
  • 13
  • 1
    Why don't you simply compile a binary on each target? – Mat Aug 02 '12 at 07:07
  • That's a possibility, but I'm wondering if there are more people who are faced with this issue and what could be done to solve this. – Evert Aug 02 '12 at 07:09

1 Answers1

0

Normally you would simply install the older gcc, glibc, and other libraries on the new OS (usually made available as RPMs for this reason) and make sure you compile only with those. It's an uphill battle to try to fix all the backwards incompatibilities yourself.

To be more thorough you could build in a chroot of the older OS, maybe even package it up into an RPM so the dependencies are automatically checked. Something like the Open Build Service makes this very easy.