Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8921

Autotools don't work with newer OpenJDK versions

    XMLWordPrintableJSON

Details

    Description

      There are three distinct issues with modern Java and Linux versions:

      1. Mesos configure script expects `libjvm.so` at `$JAVA_HOME/jre/lib/<arch>/server/libjvm.so`, but in the newer openjdk versions, `libjvm.so` is found at `$JAVA_HOME/lib/server/libjvm.so`.

      2. On some distros (e.g., Ubuntu 18.04), JAVA_HOME env var might be missing. In such cases, the configure is able to compute it by looking at `java` and `javac` paths and succeeds. However, some maven plugins require JAVA_HOME to be set and could fail if it's not found.

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar (build-and-attach-javadocs) on project mesos: MavenReportException: Error while creating archive: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1]
      

      Because configure scripts generate an automake variable `JAVA_HOME`, we can simply invoke maven in the following way to fix this issue:

      JAVA_HOME=$JAVA_HOME mvn ...

       These two behaviors were observed with OpenJDK 1.11 on Ubuntu 18.04 but I suspect that the behavior is present on other distros/OpenJDK versions.

      3. `javah` has been removed as of OpenJDK 1.10. Instead `javac -h` is to be used as a replacement. See http://openjdk.java.net/jeps/313 for more details.

      Attachments

        Issue Links

          Activity

            People

              karya Kapil Arya
              karya Kapil Arya
              Till Toenshoff Till Toenshoff
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: