This is an automated email from the ASF dual-hosted git repository.
bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 64aba8a83 [build] Fix make distcheck for ubuntu 20.04.
64aba8a83 is described below
commit 64aba8a83821d2ea9b7bccd2d7b2dfa9ba6a3635
Author: Jason Zhou <[email protected]>
AuthorDate: Tue Jul 2 15:59:17 2024 -0400
[build] Fix make distcheck for ubuntu 20.04.
Fixes the makefiles for ubuntu 20.04 so that make distcheck works properly
with
its protobuf dependencies generated as part of make distcheck.
The reason that a change was needed in the makefile is because the upgrade
from
ubuntu 16.04 to 20.04 also caused the automake version to be updated when
dependencies were being installed during docker build.
The change in the automake version created slight changes in the generated
makefile. Speficically, the distcheck on the new automake-generated
makefile now
depends on `BUILT_SOURCES` which causes an error as the CSI protobuf files
are
not ready when distcheck is called. So we add the csi build stamps to
`BUILT_SOURCES` to ensure that the protobuf files will be ready when
distcheck's
dependencies are made.
The additional chmod change for java is because for some reason when
distcheck
attempts to build the mesos-1.12.0.jar from its created distribution, some
folders are missing write permissions, causing the build to terminate.
Review: https://reviews.apache.org/r/75062/
---
3rdparty/Makefile.am | 2 ++
src/Makefile.am | 2 ++
2 files changed, 4 insertions(+)
diff --git a/3rdparty/Makefile.am b/3rdparty/Makefile.am
index 55f49ee59..25950e979 100644
--- a/3rdparty/Makefile.am
+++ b/3rdparty/Makefile.am
@@ -578,6 +578,8 @@ $(CSI_V1)-build-stamp: $(CSI_V1)-stamp
mv $(CSI_V1)/spec-$(CSI_V1_VERSION)/csi.proto $(CSI_V1)/csi/v1
touch $@
+BUILT_SOURCES += $(CSI_V0)-build-stamp $(CSI_V1)-build-stamp
+
# Mesos depends on CSI. Install the CSI proto file into $PREFIX/include but
# don't add it to the source tarball.
csi_v0dir = $(includedir)/csi/v0
diff --git a/src/Makefile.am b/src/Makefile.am
index b6acfb5ea..03eb0cc28 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2211,6 +2211,8 @@ if HAS_JAVAH
-classpath $(MESOS_JAR):@PROTOBUF_JAR@ \
$(subst _,.,$(*F))
else
+ @chmod u+w $(srcdir)/java/src/$(subst _,/,$(*D)) && \
+ find $(srcdir)/java/src/$(subst _,/,$(*D)) -type d -exec chmod u+w {}
+
$(JAVA_HOME)/bin/javac -h java/jni \
-classpath $(MESOS_JAR):@PROTOBUF_JAR@ \
$(srcdir)/java/src/$(subst _,/,$(*F)).java