2

I have a situation where a group of developers is attempting to deploy a binary application to a series of RHEL 5.5 and CentOS 5.5 servers. Unfortunately, the application was developed on another platform (Gentoo) and execution results in a GLIBC dependency error:

libc.so.6: version `GLIBC_2.7' not found (required by
/path/to/application/bin/program.app)

RHEL/CentOS 5.x is standardized on GLIBC 2.5 (with patches and backports, but still stuck at 2.5)

I've been abe to get around other library requirements by copying individual libs and using LD_PRELOAD in wrapper scripts. My stance is that RHEL is meant to maintain binary compatibility throughout its support life, and that I don't have any good options for upgrading such a critical library on the systems. The environment used to be mainly Gentoo, so the developers are used to being able to upgrade packages piecemeal without any true dependency issues.

I think the proper solution is to recompile for the target systems. Due to the method of application distribution, this may not be an option. Are there any other solutions or suggestions?

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • Why recompile is it not an option due to method of distribution? Programs can be compiled for example in chroot enviromnent, if you haven't got target system. – Tometzky Feb 04 '11 at 16:40
  • My developers may not have access to the source code. I will find out. – ewwhite Feb 04 '11 at 16:43

1 Answers1

3
  • link statically(-static)
  • use rpath. rpath overwrite the default search path(-rpath,/srv/myapp/lib)
alvosu
  • 8,357
  • 24
  • 22
  • I was going to suggest the static linking. But for rpath, that is a compile-time directive, correct? That would mean I'd also need to place the correct in some specific location and direct the application to that location via the rpath flag, right? – ewwhite Feb 04 '11 at 16:24
  • >But for rpath, that is a compile-time directive, correct? Yes... read http://stackoverflow.com/questions/448265/statically-linking-to-a-dynamic-library-glibc – alvosu Feb 04 '11 at 16:28
  • 1
    I'm afraid that modern Linux distributions are unable to create static executables anymore. – Tometzky Feb 04 '11 at 16:42
  • This was the cleanest solution (rpath). However, I'll try to get the application developers to compile specifically for RHEL. – ewwhite Feb 05 '11 at 03:45