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:23:34 UTC

[mesos] branch 1.7.x updated (a7dff89 -> ace1be6)

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

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


    from a7dff89  Added MESOS-9196 to 1.7.0 CHANGELOG.
     new 75dfbd1  Updated libjvm search logic for newer openjdk versions.
     new fbf7c65  Fixed maven invocation with proper JAVA_HOME.
     new c01c3fd  Consolidated Java header targets using makefile patterns.
     new 44779bf  Replaced javah with `javac -c` for newer JDKs.
     new ace1be6  Added MESOS-8921 to CHANGELOG for 1.7.0.

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 | 71 ++++++++++++++++-----------------------------------------
 3 files changed, 37 insertions(+), 55 deletions(-)


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

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

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

commit ace1be6548c87e2495c48476e927f93a322df968
Author: Kapil Arya <ka...@mesosphere.io>
AuthorDate: Mon Sep 3 18:21:33 2018 -0400

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

diff --git a/CHANGELOG b/CHANGELOG
index 246f7d5..df7aee1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -188,6 +188,7 @@ All Resolved Issues:
   * [MESOS-8906] - `UriDiskProfileAdaptor` fails to update profile selectors.
   * [MESOS-8913] - Resource provider manager registry leaks file descriptors into executors.
   * [MESOS-8917] - Agent leaking file descriptors into forked processes
+  * [MESOS-8921] - Autotools don't work with newer OpenJDK versions
   * [MESOS-8932] - Quota guarantee metric does not handle removal correctly.
   * [MESOS-8935] - Quota limit "chopping" can lead to cpu-only and memory-only offers.
   * [MESOS-8945] - Master check failure due to CHECK_SOME(providerId).


[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.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit c01c3fd00c0693a79681e0e05c8d8b4e6b690ece
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 9486ad6..9e7cf25 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2000,55 +2000,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] 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.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 75dfbd12f5807e5afdfda3f495c67b86d8e75775
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 d7625e6..c88f89b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1302,11 +1302,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"
@@ -2744,4 +2752,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] 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.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit fbf7c65fc28adb2e7f401fa1c32fb41e5cae14c5
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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index cf0cf22..9486ad6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1923,7 +1923,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 -q -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
@@ -2061,7 +2062,7 @@ $(EXAMPLES_JAR): $(EXAMPLES_SOURCE)
 CLEANFILES += $(EXAMPLES_JAR)
 
 maven-install: $(MESOS_JAR) java/mesos.pom
-	$(MVN) -B -q -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


[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.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 44779bfa8a7416b7f83ae58b120de326e6fad7eb
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 c88f89b..e690032 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1423,6 +1423,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 9e7cf25..766bb92 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2001,12 +2001,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 ..."