You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2014/01/14 21:04:59 UTC
[08/15] git commit: Added a patch for glog required when compiling
with clang.
Added a patch for glog required when compiling with clang.
Review: https://reviews.apache.org/r/16658
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a151dd9a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a151dd9a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a151dd9a
Branch: refs/heads/master
Commit: a151dd9acab0c4ad15d77101a7000efd6ea315fe
Parents: 9bfbc2c
Author: Benjamin Hindman <be...@gmail.com>
Authored: Sun Dec 29 22:48:32 2013 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Tue Jan 14 12:00:40 2014 -0800
----------------------------------------------------------------------
3rdparty/libprocess/3rdparty/Makefile.am | 17 +++-
3rdparty/libprocess/3rdparty/glog-0.3.3.patch | 105 +++++++++++++++++++++
2 files changed, 120 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/a151dd9a/3rdparty/libprocess/3rdparty/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/Makefile.am b/3rdparty/libprocess/3rdparty/Makefile.am
index 068b17b..168ecea 100644
--- a/3rdparty/libprocess/3rdparty/Makefile.am
+++ b/3rdparty/libprocess/3rdparty/Makefile.am
@@ -33,10 +33,18 @@ EXTRA_DIST = \
$(GMOCK).tar.gz \
$(GPERFTOOLS).tar.gz \
$(LIBEV).tar.gz \
- $(LIBEV).patch \
$(PROTOBUF).tar.gz \
$(RY_HTTP_PARSER).tar.gz
+# We need to patch glog in order to deal with a compilation issue when
+# compiling with clang (and C++11); see MESOS-860.
+EXTRA_DIST += \
+ $(GLOG).patch
+
+# We patch libev to keep it from reaping child processes.
+EXTRA_DIST += \
+ $(LIBEV).patch
+
CLEAN_EXTRACTED = \
$(BOOST) \
$(GLOG) \
@@ -75,6 +83,7 @@ libgmock_la_CPPFLAGS = \
-I$(GTEST)/include -I$(GTEST) \
-I$(GMOCK)/include -I$(GMOCK)
+
# We list the sources in BUILT_SOURCES to make sure that the package
# gets unarchived first.
BUILT_SOURCES += $(nodist_libgmock_la_SOURCES)
@@ -85,8 +94,12 @@ $(GTEST)/src/gtest-all.cc: $(GMOCK)-stamp
$(BOOST)/boost: $(BOOST)-stamp
+# NOTE: We explicitely set GTEST_CONFIG=no so that we don't attempt to
+# build glog against a system installed gtest (there's no reason to
+# "test" glog and it's highly likely it will cause a compilation bug
+# when building with clang).
$(GLOG)/libglog.la: $(GLOG)-stamp
- cd $(GLOG) && ./configure $(CONFIGURE_ARGS) && \
+ cd $(GLOG) && ./configure GTEST_CONFIG=no $(CONFIGURE_ARGS) && \
$(MAKE) $(AM_MAKEFLAGS)
if HAS_GPERFTOOLS
http://git-wip-us.apache.org/repos/asf/mesos/blob/a151dd9a/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
new file mode 100644
index 0000000..2217103
--- /dev/null
+++ b/3rdparty/libprocess/3rdparty/glog-0.3.3.patch
@@ -0,0 +1,105 @@
+diff --git a/src/glog/stl_logging.h.in b/src/glog/stl_logging.h.in
+index 30836de..3e90573 100644
+--- a/src/glog/stl_logging.h.in
++++ b/src/glog/stl_logging.h.in
+@@ -50,10 +50,13 @@
+ #include <utility>
+ #include <vector>
+
+-#ifdef __GNUC__
++#if defined (__GNUC__) && !defined(_LIBCPP_VERSION)
+ # include <ext/hash_set>
+ # include <ext/hash_map>
+ # include <ext/slist>
++#elif defined(_LIBCPP_VERSION)
++# include <unordered_map>
++# include <unordered_set>
+ #endif
+
+ // Forward declare these two, and define them after all the container streams
+@@ -80,7 +83,7 @@ inline std::ostream& operator<<(std::ostream& out, \
+ OUTPUT_TWO_ARG_CONTAINER(std::vector)
+ OUTPUT_TWO_ARG_CONTAINER(std::deque)
+ OUTPUT_TWO_ARG_CONTAINER(std::list)
+-#ifdef __GNUC__
++#if defined (__GNUC__) && !defined(_LIBCPP_VERSION)
+ OUTPUT_TWO_ARG_CONTAINER(__gnu_cxx::slist)
+ #endif
+
+@@ -109,9 +112,12 @@ inline std::ostream& operator<<(std::ostream& out, \
+
+ OUTPUT_FOUR_ARG_CONTAINER(std::map)
+ OUTPUT_FOUR_ARG_CONTAINER(std::multimap)
+-#ifdef __GNUC__
++#if defined (__GNUC__) && !defined(_LIBCPP_VERSION)
+ OUTPUT_FOUR_ARG_CONTAINER(__gnu_cxx::hash_set)
+ OUTPUT_FOUR_ARG_CONTAINER(__gnu_cxx::hash_multiset)
++#elif defined(_LIBCPP_VERSION)
++OUTPUT_FOUR_ARG_CONTAINER(std::unordered_set)
++OUTPUT_FOUR_ARG_CONTAINER(std::unordered_multiset)
+ #endif
+
+ #undef OUTPUT_FOUR_ARG_CONTAINER
+@@ -124,9 +130,12 @@ inline std::ostream& operator<<(std::ostream& out, \
+ return out; \
+ }
+
+-#ifdef __GNUC__
++#if defined (__GNUC__) && !defined(_LIBCPP_VERSION)
+ OUTPUT_FIVE_ARG_CONTAINER(__gnu_cxx::hash_map)
+ OUTPUT_FIVE_ARG_CONTAINER(__gnu_cxx::hash_multimap)
++#elif defined(_LIBCPP_VERSION)
++OUTPUT_FIVE_ARG_CONTAINER(std::unordered_map)
++OUTPUT_FIVE_ARG_CONTAINER(std::unordered_multimap)
+ #endif
+
+ #undef OUTPUT_FIVE_ARG_CONTAINER
+diff --git a/src/stl_logging_unittest.cc b/src/stl_logging_unittest.cc
+index 5dcbc44..ee344ca 100644
+--- a/src/stl_logging_unittest.cc
++++ b/src/stl_logging_unittest.cc
+@@ -39,7 +39,7 @@
+ #include <string>
+ #include <vector>
+
+-#ifdef __GNUC__
++#if defined (__GNUC__) && !defined(_LIBCPP_VERSION)
+ # include <ext/hash_map>
+ # include <ext/hash_set>
+ #endif
+@@ -48,7 +48,7 @@
+ #include "googletest.h"
+
+ using namespace std;
+-#ifdef __GNUC__
++#if defined (__GNUC__) && !defined(_LIBCPP_VERSION)
+ using namespace __gnu_cxx;
+ #endif
+
+@@ -83,7 +83,7 @@ void TestSTLLogging() {
+ CHECK_EQ(m, copied_m); // This must compile.
+ }
+
+-#ifdef __GNUC__
++#if defined (__GNUC__) && !defined(_LIBCPP_VERSION)
+ {
+ // Test a hashed simple associative container.
+ hash_set<int> hs;
+@@ -98,7 +98,7 @@ void TestSTLLogging() {
+ }
+ #endif
+
+-#ifdef __GNUC__
++#if defined (__GNUC__) && !defined(_LIBCPP_VERSION)
+ {
+ // Test a hashed pair associative container.
+ hash_map<int, string> hm;
+@@ -145,7 +145,7 @@ void TestSTLLogging() {
+ CHECK_EQ(m, copied_m); // This must compile.
+ }
+
+-#ifdef __GNUC__
++#if defined (__GNUC__) && !defined(_LIBCPP_VERSION)
+ {
+ // Test a hashed simple associative container.
+ // Use a user defined hash function.