You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/04/29 01:55:59 UTC

mesos git commit: Patched glog to eliminate system-level gflag library detection.

Repository: mesos
Updated Branches:
  refs/heads/master b8ffbc2c6 -> 742c397d4


Patched glog to eliminate system-level gflag library detection.

The glog library will attempt to detect whether the gflag library
is installed on the system. However, glog can compile correctly
when gflags is absent, due to a compatiblity layer:

https://github.com/google/glog/blob/v0.3.3/src/base/commandlineflags.h

We do not want a 3rd party dependency on the host to be picked up
by glog in general. In the case of gflags, it turns out that this
may break the build (when the gflag headers are incompatible).

There is no configure flag for disabling this auto-detection, so
we patch glog to remove it.

Review: https://reviews.apache.org/r/46804


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/742c397d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/742c397d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/742c397d

Branch: refs/heads/master
Commit: 742c397d43f8376558b81a819374e385e94f65e0
Parents: b8ffbc2
Author: Benjamin Mahler <bm...@apache.org>
Authored: Thu Apr 28 16:10:15 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Thu Apr 28 16:52:15 2016 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/glog-0.3.3.patch | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/742c397d/3rdparty/libprocess/3rdparty/glog-0.3.3.patch
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/glog-0.3.3.patch b/3rdparty/libprocess/3rdparty/glog-0.3.3.patch
index f05f4b5..f1ed584 100644
--- a/3rdparty/libprocess/3rdparty/glog-0.3.3.patch
+++ b/3rdparty/libprocess/3rdparty/glog-0.3.3.patch
@@ -165,3 +165,38 @@ index 278f9e9..f048baa 100755
      alpha:Linux:*:*)
  	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  	  EV5)   UNAME_MACHINE=alphaev5 ;;
+diff --git a/configure.ac b/configure.ac
+index 7b4d21e..88aa0af 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -127,27 +127,9 @@ if test x"$acx_pthread_ok" = x"yes"; then
+   AC_CHECK_LIB(pthread, pthread_self)
+ fi
+ 
+-# Check if there is google-gflags library installed.
+-SAVE_CFLAGS="$CFLAGS"
+-SAVE_LIBS="$LIBS"
+-AC_ARG_WITH(gflags, AS_HELP_STRING[--with-gflags=GFLAGS_DIR],
+-  GFLAGS_CFLAGS="-I${with_gflags}/include"
+-  GFLAGS_LIBS="-L${with_gflags}/lib -lgflags"
+-  CFLAGS="$CFLAGS $GFLAGS_CFLAGS"
+-  LIBS="$LIBS $GFLAGS_LIBS"
+-)
+-AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=1, ac_cv_have_libgflags=0)
+-if test x"$ac_cv_have_libgflags" = x"1"; then
+-  AC_DEFINE(HAVE_LIB_GFLAGS, 1, [define if you have google gflags library])
+-  if test x"$GFLAGS_LIBS" = x""; then
+-    GFLAGS_LIBS="-lgflags"
+-  fi
+-else
+-  GFLAGS_CFLAGS=
+-  GFLAGS_LIBS=
+-fi
+-CFLAGS="$SAVE_CFLAGS"
+-LIBS="$SAVE_LIBS"
++GFLAGS_CFLAGS=
++GFLAGS_LIBS=
++ac_cv_have_libgflags=0
+ 
+ # TODO(hamaji): Use official m4 macros provided by testing libraries
+ #               once the m4 macro of Google Mocking becomes ready.