You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ka...@apache.org on 2018/09/03 22:27:33 UTC

[mesos] branch 1.4.x updated (18603d4 -> bc8185f)

This is an automated email from the ASF dual-hosted git repository.

kapil pushed a change to branch 1.4.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from 18603d4  Revert "Fixed wrong `mnt` namespace detection for non-command executor tasks."
     new 9db68f0  Updated libjvm search logic for newer openjdk versions.
     new 5581925  Fixed maven invocation with proper JAVA_HOME.
     new 76a4787  Consolidated Java header targets using makefile patterns.
     new e4bd7ea  Replaced javah with `javac -c` for newer JDKs.
     new bc8185f  Added MESOS-8921 to CHANGELOG for 1.4.3.

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG       |  1 +
 configure.ac    | 20 +++++++++++++----
 src/Makefile.am | 70 +++++++++++++++++----------------------------------------
 3 files changed, 37 insertions(+), 54 deletions(-)


[mesos] 01/05: Updated libjvm search logic for newer openjdk versions.

Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kapil pushed a commit to branch 1.4.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 9db68f070de0b7ddaf88e3457322b3cbe37ceb59
Author: Kapil Arya <ka...@mesosphere.io>
AuthorDate: Tue Jun 12 16:46:12 2018 -0400

    Updated libjvm search logic for newer openjdk versions.
    
    Review: https://reviews.apache.org/r/68610
---
 configure.ac | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 056db31..2b37080 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1124,11 +1124,19 @@ __EOF__
   # Determine linker flags for Java if not set.
   if test "$OS_NAME" = "darwin"; then
     dir="$JAVA_HOME/jre/lib/server"
-    JAVA_TEST_LDFLAGS="-framework JavaVM"
-    JAVA_JVM_LIBRARY=$dir/libjvm.dylib
+    for dir in "$JAVA_HOME/lib/server" "$JAVA_HOME/jre/lib/server"; do
+      if test -e "$dir"; then
+	# Note that these are libtool specific flags.
+        JAVA_TEST_LDFLAGS="-framework JavaVM"
+        JAVA_JVM_LIBRARY=$dir/libjvm.dylib
+	break;
+      fi
+    done
   elif test "$OS_NAME" = "linux"; then
-    for arch in amd64 i386 arm aarch64 ppc64 ppc64le s390 s390x; do
-      dir="$JAVA_HOME/jre/lib/$arch/server"
+    for dir in \
+      "$JAVA_HOME/lib/server" \
+      "$JAVA_HOME/jre/lib/"{amd64,i386,arm,aarch64,ppc64,ppc64le,s390,s390x}"/server"
+    do
       if test -e "$dir"; then
 	# Note that these are libtool specific flags.
 	JAVA_TEST_LDFLAGS="-L$dir -R$dir -Wl,-ljvm"
@@ -2482,4 +2490,6 @@ AC_MSG_NOTICE([Build option summary:
     CPPFLAGS:   $CPPFLAGS
     LDFLAGS:    $LDFLAGS
     LIBS:       $LIBS
+    JAVA_TEST_LDFLAGS: $JAVA_TEST_LDFLAGS
+    JAVA_JVM_LIBRARY:  $JAVA_JVM_LIBRARY
 ])


[mesos] 04/05: Replaced javah with `javac -c` for newer JDKs.

Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kapil pushed a commit to branch 1.4.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit e4bd7eaa7bff21a966af042b0958ad195b4479df
Author: Kapil Arya <ka...@mesosphere.io>
AuthorDate: Mon Sep 3 12:57:46 2018 -0400

    Replaced javah with `javac -c` for newer JDKs.
    
    Starting with JDK 10, javah is not available. The substitute is to use
    `javac -h` for generating headers.
    
    Review: https://reviews.apache.org/r/68613
---
 configure.ac    |  2 ++
 src/Makefile.am | 14 ++++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2b37080..4172f1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1245,6 +1245,8 @@ has been correctly installed.
 fi
 
 AM_CONDITIONAL([HAS_JAVA], [test "x$has_java" = "xyes"])
+AC_PATH_PROG([JAVAH], [javah], [$JAVAH], [$JAVA_HOME/bin])
+AM_CONDITIONAL([HAS_JAVAH], [test -n "x$JAVAH" != "x"])
 
 
 # Check if LevelDB prefix path was supplied and if so, add it to
diff --git a/src/Makefile.am b/src/Makefile.am
index 8f25e00..5d786a5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1856,12 +1856,22 @@ nodist_libjava_la_SOURCES =						\
 BUILT_SOURCES += $(nodist_libjava_la_SOURCES)
 
 # The automatic variable '$(*F)' captures the matching stem (whatever matches
-# the '%') of the target (e.g., 'org_apache_mesos_Log'). We then substitute
-# '_' with '.' to get the class name (e.g., org.apache.mesos.Log).
+# the '%') of the target (e.g., 'org_apache_mesos_Log').
+# * For 'javah' recipe, we then substitute '_' with '.' to get the class name
+#   (e.g., org.apache.mesos.Log).
+# * For 'javac -h' recipe, we substitute '_' with '/' to compute the source path
+#   of the java file. Unlike 'javah', 'javac -h' requires java sources to
+#   generate headers.
 java/jni/%.h: $(MESOS_JAR)
+if HAS_JAVAH
 	$(JAVA_HOME)/bin/javah -d java/jni                              \
 	  -classpath $(MESOS_JAR):@PROTOBUF_JAR@                        \
 	   $(subst _,.,$(*F))
+else
+	$(JAVA_HOME)/bin/javac -h java/jni				\
+	  -classpath $(MESOS_JAR):@PROTOBUF_JAR@                        \
+	   $(srcdir)/java/src/$(subst _,/,$(*F)).java
+endif
 
 $(EXAMPLES_JAR): $(EXAMPLES_SOURCE)
 	@echo "Building examples.jar ..."


[mesos] 03/05: Consolidated Java header targets using makefile patterns.

Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kapil pushed a commit to branch 1.4.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 76a4787fe9a48a62ad5903b074eb36dd053e7520
Author: Kapil Arya <ka...@mesosphere.io>
AuthorDate: Mon Sep 3 12:20:24 2018 -0400

    Consolidated Java header targets using makefile patterns.
    
    Review: https://reviews.apache.org/r/68612
---
 src/Makefile.am | 56 +++++++-------------------------------------------------
 1 file changed, 7 insertions(+), 49 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 2e24267..8f25e00 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1855,55 +1855,13 @@ nodist_libjava_la_SOURCES =						\
 
 BUILT_SOURCES += $(nodist_libjava_la_SOURCES)
 
-java/jni/org_apache_mesos_MesosSchedulerDriver.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-	  org.apache.mesos.MesosSchedulerDriver
-
-java/jni/org_apache_mesos_MesosExecutorDriver.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-          org.apache.mesos.MesosExecutorDriver
-
-java/jni/org_apache_mesos_Log.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-	  org.apache.mesos.Log
-
-java/jni/org_apache_mesos_state_AbstractState.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-	  org.apache.mesos.state.AbstractState
-
-java/jni/org_apache_mesos_state_LevelDBState.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-	  org.apache.mesos.state.LevelDBState
-
-java/jni/org_apache_mesos_state_LogState.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-	  org.apache.mesos.state.LogState
-
-java/jni/org_apache_mesos_state_Variable.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-	  org.apache.mesos.state.Variable
-
-java/jni/org_apache_mesos_state_ZooKeeperState.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-	  org.apache.mesos.state.ZooKeeperState
-
-java/jni/org_apache_mesos_v1_scheduler_V1Mesos.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-	  org.apache.mesos.v1.scheduler.V1Mesos
-
-java/jni/org_apache_mesos_v1_scheduler_V0Mesos.h: $(MESOS_JAR)
-	$(JAVA_HOME)/bin/javah -d java/jni				\
-	-classpath $(MESOS_JAR):@PROTOBUF_JAR@				\
-	  org.apache.mesos.v1.scheduler.V0Mesos
+# The automatic variable '$(*F)' captures the matching stem (whatever matches
+# the '%') of the target (e.g., 'org_apache_mesos_Log'). We then substitute
+# '_' with '.' to get the class name (e.g., org.apache.mesos.Log).
+java/jni/%.h: $(MESOS_JAR)
+	$(JAVA_HOME)/bin/javah -d java/jni                              \
+	  -classpath $(MESOS_JAR):@PROTOBUF_JAR@                        \
+	   $(subst _,.,$(*F))
 
 $(EXAMPLES_JAR): $(EXAMPLES_SOURCE)
 	@echo "Building examples.jar ..."


[mesos] 05/05: Added MESOS-8921 to CHANGELOG for 1.4.3.

Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kapil pushed a commit to branch 1.4.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit bc8185f1fb92b39e5921505148cab140c937f3fd
Author: Kapil Arya <ka...@mesosphere.io>
AuthorDate: Mon Sep 3 18:22:08 2018 -0400

    Added MESOS-8921 to CHANGELOG for 1.4.3.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 2f2493a..c240721 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,7 @@ Release Notes - Mesos - Version 1.4.3 (WIP)
 * This is a bug fix release.
 
 ** Bug
+  * [MESOS-8921] - Autotools don't work with newer OpenJDK versions
   * [MESOS-9144] - Master authentication handling leads to request amplification.
   * [MESOS-9145] - Master has a fragile burned-in 5s authentication timeout.
   * [MESOS-9146] - Agent has a fragile burn-in 5s authentication timeout.


[mesos] 02/05: Fixed maven invocation with proper JAVA_HOME.

Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kapil pushed a commit to branch 1.4.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 5581925db9aeae9c5d6ee621e7aa2ac9a19609eb
Author: Kapil Arya <ka...@mesosphere.io>
AuthorDate: Mon Sep 3 09:52:45 2018 -0400

    Fixed maven invocation with proper JAVA_HOME.
    
    On some distros, JAVA_HOME environment variable is not set by default.
    However, on such systems, our configure script is able to successfully
    compute the value of JAVA_HOME based on PATH, etc. We use this computed
    JAVA_HOME to set the environment variable when invoking maven.
    
    Review: https://reviews.apache.org/r/68611
---
 src/Makefile.am | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 8f7c4ac..2e24267 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1778,7 +1778,8 @@ if HAS_JAVA
 
 $(MESOS_JAR): $(MESOS_JAR_SOURCE) $(MESOS_JAR_GENERATED) java/mesos.pom
 	@echo "Building mesos-$(PACKAGE_VERSION).jar ..."
-	@cd $(abs_top_builddir)/src/java && $(MVN) -B -f mesos.pom clean package
+	@cd $(abs_top_builddir)/src/java &&  \
+	  env JAVA_HOME=$(JAVA_HOME) $(MVN) -B -q -f mesos.pom clean package
 
 # Convenience library for JNI bindings.
 # TODO(Charles Reiss): We really should be building the Java library
@@ -1917,6 +1918,7 @@ CLEANFILES += $(EXAMPLES_JAR)
 
 maven-install: $(MESOS_JAR) java/mesos.pom
 	$(MVN) -B -f java/mesos.pom install
+	env JAVA_HOME=$(JAVA_HOME) $(MVN) -B -q -f java/mesos.pom install
 
 PHONY_TARGETS += maven-install
 endif # HAS_JAVA