Repository: mesos Updated Branches: refs/heads/master 7c6b7d207 -> ae9d1033b
Fix compile error for bundled gRPC on Debian 8 with libc-ares-dev. This patch adds the following commit to `3rdparty/grpc-1.4.2.patch`: https://github.com/grpc/grpc/commit/f8b6d6f The gRPC patch file also includes the following patches originally: https://github.com/grpc/grpc/commit/807693b https://github.com/grpc/grpc/commit/43f7acf https://github.com/grpc/grpc/pull/11558 https://github.com/grpc/grpc/pull/11565 Review: https://reviews.apache.org/r/62876/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ae9d1033 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ae9d1033 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ae9d1033 Branch: refs/heads/master Commit: ae9d1033bcedf178007e9cea95386fa1f4e4822f Parents: 7c6b7d2 Author: Chun-Hung Hsiao <[email protected]> Authored: Fri Dec 15 00:13:17 2017 +0800 Committer: Gilbert Song <[email protected]> Committed: Fri Dec 15 00:13:17 2017 +0800 ---------------------------------------------------------------------- 3rdparty/Makefile.am | 2 +- 3rdparty/grpc-1.4.2.patch | 37 +++++++++++++++++++++++++++++++++++-- 3rdparty/grpc-1.4.2.readme | 12 ++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/ae9d1033/3rdparty/Makefile.am ---------------------------------------------------------------------- diff --git a/3rdparty/Makefile.am b/3rdparty/Makefile.am index 687f52d..805c6e5 100644 --- a/3rdparty/Makefile.am +++ b/3rdparty/Makefile.am @@ -94,7 +94,7 @@ EXTRA_DIST = \ EXTRA_DIST += \ $(GLOG).patch -# We patch grpc for CMake compilation issues. +# We patch grpc for compilation issues. See `grpc-1.4.2.readme`. EXTRA_DIST += \ $(GRPC).patch http://git-wip-us.apache.org/repos/asf/mesos/blob/ae9d1033/3rdparty/grpc-1.4.2.patch ---------------------------------------------------------------------- diff --git a/3rdparty/grpc-1.4.2.patch b/3rdparty/grpc-1.4.2.patch index bce9871..e41a0d5 100644 --- a/3rdparty/grpc-1.4.2.patch +++ b/3rdparty/grpc-1.4.2.patch @@ -21,9 +21,18 @@ index ac6804a7a8..27c40f0985 100644 gpr ) diff --git a/Makefile b/Makefile -index 3d2466fce9..8ac4dec61c 100644 +index 3d2466fce9..55fe16919b 100644 --- a/Makefile +++ b/Makefile +@@ -506,7 +506,7 @@ OPENSSL_ALPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.2 openssl + OPENSSL_NPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.1 openssl + ZLIB_CHECK_CMD = $(PKG_CONFIG) --exists zlib + PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.0.0 protobuf +-CARES_CHECK_CMD = $(PKG_CONFIG) --exists libcares ++CARES_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.11.0 libcares + else # HAS_PKG_CONFIG + + ifeq ($(SYSTEM),MINGW32) @@ -2650,7 +2650,7 @@ install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c install-pkg-con ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP)-dll.a $(prefix)/lib/libgrpc++.a @@ -164,9 +173,18 @@ index 2252a7ea80..82ea9477c3 100644 deps.append("${_gRPC_CARES_LIBRARIES}") deps.append("${_gRPC_ALLTARGETS_LIBRARIES}") diff --git a/templates/Makefile.template b/templates/Makefile.template -index a9dd171b84..2c638da3c8 100644 +index a9dd171b84..cb65b455f5 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template +@@ -427,7 +427,7 @@ + OPENSSL_NPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.1 openssl + ZLIB_CHECK_CMD = $(PKG_CONFIG) --exists zlib + PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.0.0 protobuf +- CARES_CHECK_CMD = $(PKG_CONFIG) --exists libcares ++ CARES_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.11.0 libcares + else # HAS_PKG_CONFIG + + ifeq ($(SYSTEM),MINGW32) @@ -1349,7 +1349,7 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}$(SHARED_VERSION_${lang_to_var[lib.language]})-dll.a $(prefix)/lib/lib${lib.name}.a @@ -176,3 +194,18 @@ index a9dd171b84..2c638da3c8 100644 $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_${lang_to_var[lib.language]}).$(SHARED_EXT_${lang_to_var[lib.language]}) $(prefix)/lib/lib${lib.name}.so endif % endif +diff --git a/test/build/c-ares.c b/test/build/c-ares.c +index c954e9397f..d86bbf5af6 100644 +--- a/test/build/c-ares.c ++++ b/test/build/c-ares.c +@@ -33,6 +33,10 @@ + + #include <ares.h> + ++#if (ARES_VERSION < 0x010b00) ++ ARES_VERSION should not be smaller than 1.11.0 ++#endif ++ + int main(void) { + ares_channel channelptr; + http://git-wip-us.apache.org/repos/asf/mesos/blob/ae9d1033/3rdparty/grpc-1.4.2.readme ---------------------------------------------------------------------- diff --git a/3rdparty/grpc-1.4.2.readme b/3rdparty/grpc-1.4.2.readme new file mode 100644 index 0000000..6675ba3 --- /dev/null +++ b/3rdparty/grpc-1.4.2.readme @@ -0,0 +1,12 @@ +The following lists the commits cherry-picked in `grpc-1.4.2.patch`: + +- cmake: add zlib and cares dep + https://github.com/grpc/grpc/commit/807693b +- Fixed `grpc_unsecure` CMake build failures due to non-standard openssl location. + https://github.com/grpc/grpc/commit/43f7acf +- Check the version of system c-ares + https://github.com/grpc/grpc/commit/f8b6d6f +- Changes templates/Makefile.template to install grpc with correct .so version numbers + https://github.com/grpc/grpc/pull/11558 +- cmake: specify c-ares source explicitly + https://github.com/grpc/grpc/pull/11565
