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:25:50 UTC

[mesos] branch 1.5.x updated (19d17ce -> 28c7e8c)

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

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


    from 19d17ce  Added MESOS-9196 to 1.5.2 CHANGELOG.
     new ea66046  Updated libjvm search logic for newer openjdk versions.
     new ea63900  Fixed maven invocation with proper JAVA_HOME.
     new 8ed035e  Consolidated Java header targets using makefile patterns.
     new 3ded11e  Replaced javah with `javac -c` for newer JDKs.
     new 28c7e8c  Added MESOS-8921 to CHANGELOG for 1.5.2.

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] 05/05: Added MESOS-8921 to CHANGELOG for 1.5.2.

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

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

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

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

diff --git a/CHANGELOG b/CHANGELOG
index 0656f62..0b79f71 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,7 @@ Release Notes - Mesos - Version 1.5.2 (WIP)
   * [MESOS-8904] - Master crash when removing quota.
   * [MESOS-8906] - `UriDiskProfileAdaptor` fails to update profile selectors.
   * [MESOS-8917] - Agent leaking file descriptors into forked processes
+  * [MESOS-8921] - Autotools don't work with newer OpenJDK versions
   * [MESOS-8935] - Quota limit "chopping" can lead to cpu-only and memory-only offers.
   * [MESOS-8936] - Implement a Random Sorter for offer allocations.
   * [MESOS-8942] - Master streaming API does not send (health) check updates for tasks.


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

commit 3ded11ef5af0befbda0b241b608e82292f3d7baa
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 2a53a88..35aa07e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1257,6 +1257,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 58a40b5..f851be3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1988,12 +1988,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.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 8ed035e89470d59154da403c0ca390f041004b55
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 014343d..58a40b5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1987,55 +1987,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.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit ea66046e5925b071b8df05a1d554865923ae942a
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 f279fe0..2a53a88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1136,11 +1136,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"
@@ -2465,4 +2473,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.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit ea6390039a85436082287b5c82871eca08ac13ef
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 ffb3eec..014343d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1910,7 +1910,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
@@ -2049,6 +2050,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