Search code examples
javajava-8embedded-linuxglibcuclinux

Updating java on uClinux


I want to update Java for our uClinux product t ojava 8. The problem is that that it seems that Java from version 7 and higher is dependent to glibc-2.4 and the glibc version installed is 2.3.6. While running java -version in terminal I am getting this message:

Error: dl failure on line 893
Error: failed /usr/java/jre/lib/i386/client/libjvm.so, because /lib/libc.so.6: version `GLIBC_2.4' not found (required by /usr/java/jre/lib/i386/client/libjvm.so)

We are using crosstool toolchain for building uClinux image which is not updated since 2006 and the latest glibc supported by it is glibc 2.3.6. I wonder if I can update uClinux glibc library to 2.4. Is it possible that some application is not working with newer version of glibc? Another question is if we need to have the same version glibc which crosstool toolcain (2.3.6) is using.

The last question is if java 8 is dependent to linux kernel version as well? Currently the kernel version we are using is linux 2.6.24. I saw here that embeded java needs linux kernel 2.6.28 or higher. Do we have same dependency in java se?

Thanks for help


Solution

  • According to README-builds.html, OpenJDK 8 was built on Fedora 9, which had glibc 2.8 (plus backports). So you should upgrade to at least that version of glibc. (Even though Fedora 9 is used as the build environment, that does not mean the intent is to support running against the original Fedora 9 kernel.)

    Kernel-wise, OpenJDK 8 still supports Red Hat Enterprise Linux 5, which uses Linux 2.6.18 plus many, many backports, some of them covering new features added after Linux 2.6.24. I don't recall whether OpenJDK uses any of that (the O_CLOEXEC support would be a likely candidate).