0

I am using rhel3 with glibc-2.3.2. I am trying to migrate to jdk8 from JDK5 but getting issue with GLIBC depencency like below. Basically JDK1.7 onward, there is this dependency with GLIBC_2.4.

java -version
Error: dl failure on line 883
Error: failed /homes/jdk1.8.0_45/jre/lib/i386/server/libjvm.so, because /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by /homes/JDK1.8/jdk1.8.0_45/jre/lib/i386/server/libjvm.so)

I can not install latest GLIBC in my current system, since existing glibc version is required for some other software compilation. How can I proceed ?

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
Dil
  • 628
  • 2
  • 9
  • 21
  • 1
    Uh oh, besides updating your entire linux distribution, there are ways to create an isolated environment using different libraries, but that’s more a linux administration question, entirely independent from the fact that the software in question is a JVM, so I’m suggesting redirection to [SU](http://superuser.com/questions/tagged/linux)… – Holger Oct 23 '15 at 17:46
  • @the8472 Can you please show an example of how to use LD_PRELOAD in my context. – Dil Oct 23 '15 at 21:01
  • `LD_PRELOAD` is guaranteed to not work. – Employed Russian Oct 25 '15 at 20:22

1 Answers1

0

I can not install latest GLIBC in my current system, since existing glibc version is required for some other software compilation.

Are you sure? With very few exceptions (__ctype_b is the only one I know), newer versions of GLIBC are backward compatible (old applications continue to run with newer GLIBC versions).

How can I proceed ?

If you really can't update the system glibc, you can install a newer glibc in non-default location, and make just the JDK use it.

Some of the details of how to do that are documented in this answer.

Another way is to use "explicit loader invocation", like this:

GLIBC221LIB=/path/to/glibc-2.21/lib
$GLIBC221LIB/ld-linux.so.2 --library-path $GLIBC221LIB \
  /path/to/jdk8/bin/java ...args...

Yet another alternative is to upgrade the system glibc, but keep the old glibc-2.3.2 in non-default location, and point the (hopefully few) applications that are incompatible with the new glibc version to the old version.

Community
  • 1
  • 1
Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • I definitely can't update the glibc for multipe reasons. So lets keep that option out. I tried `GLIBC221LIB=/path/to/glibc-2.21/lib $GLIBC221LIB/ld-linux.so.2 --library-path $GLIBC221LIB \ /path/to/jdk8/bin/java ...args...` : but get error as `FATAL: kernel too old` – Dil Oct 26 '15 at 08:56
  • @Dil Different versions of GLIBC have different minimal kernel requirements. Apparently you selected too new a version for the kernel you are running. – Employed Russian Oct 26 '15 at 15:07