Kapil Arya created MESOS-8921:
---------------------------------
Summary: Autotools don't work with newer OpenJDK versions
Key: MESOS-8921
URL: https://issues.apache.org/jira/browse/MESOS-8921
Project: Mesos
Issue Type: Bug
Reporter: Kapil Arya
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`.
Further, 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.
{code:java}
[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]
{code}
Because configure scripts generate an automake variable `JAVA_HOME`, we can
simply invoke maven in the following way to fix this issue:
{code:java}
JAVA_HOME=$JAVA_HOME mvn ...{code}
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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)