You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2017/07/03 22:20:21 UTC

[1/3] mesos git commit: Fixed interference of unbundled dependency include paths with Boost.

Repository: mesos
Updated Branches:
  refs/heads/1.1.x a72d20e57 -> a4a110e13


Fixed interference of unbundled dependency include paths with Boost.

Since some of the contents of Boost headers we include trigger
diagnostics with our compiler setups (e.g., use of 'auto_ptr'), we
include Boost with '-isystem' instead of '-I'. This treats headers
included from such paths as system headers which suppresses all
diagnostics. Other headers we include with '-I'.

At least GCC performs separate lookups for headers depending on how
their path was specified[1].

> The lookup order is as follows:
>
> 1. For the quote form of the include directive, the directory of the
>    current file is searched first.
> 2. For the quote form of the include directive, the directories
>    specified by '-iquote' options are searched in left-to-right order,
>    as they appear on the command line.
> 3. Directories specified with '-I' options are scanned in
>    left-to-right order.
> 4. Directories specified with '-isystem' options are scanned in
>    left-to-right order.
> 5. Standard system directories are scanned.
> 6. Directories specified with '-idirafter' options are scanned in
>    left-to-right order.

Since we add Boost headers with '-isystem', but other headers with '-I',
building with e.g., unbundled protobuf by specifying
'--with-protobuf=PROTO_PREFIX' causes the build to possibly pick up a
Boost installed in 'PROTO_PREFIX' -- the protobuf include path is
specified with '-I' while the Boost include path is specified with
'-isystem' causes the compiler to first look for Boost headers in the
paths specified with '-I', e.g., the protobuf prefix.

In order to prevent finding wrong Boost headers, all include paths
possibly containing Boost headers need to be added with the same flag as
the Boost headers itself, i.e., with '-isystem'. This commit adjusts
include path specification for all possibly externally provided
locations, i.e., unbundled third-party dependencies.

[1]: https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html

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


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

Branch: refs/heads/1.1.x
Commit: 116733e03afbb9136e2782230eddb4029c195d83
Parents: a72d20e
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Thu Jun 8 20:04:06 2017 +0200
Committer: Till Toenshoff <to...@me.com>
Committed: Mon Jul 3 22:59:13 2017 +0200

----------------------------------------------------------------------
 configure.ac | 66 +++++++++++++++++++++++++++++++------------------------
 1 file changed, 37 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/116733e0/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 7d7d06f..21593a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -681,10 +681,12 @@ on this system (e.g., musl), a separate FTS package must be installed.
 # suffixes. We include /include/apr-1 because we include <apr*>
 # headers directly.
 if test -n "`echo $with_apr`" ; then
-    CPPFLAGS="-I${with_apr}/include/apr-1 -I${with_apr}/include/apr-1.0 $CPPFLAGS"
+    CPPFLAGS="-isystem ${with_apr}/include/apr-1 \
+              -isystem ${with_apr}/include/apr-1.0 $CPPFLAGS"
     LDFLAGS="-L${with_apr}/lib $LDFLAGS"
 else
-    CPPFLAGS="-I/usr/include/apr-1 -I/usr/include/apr-1.0 $CPPFLAGS"
+    CPPFLAGS="-isystem /usr/include/apr-1 -isystem /usr/include/apr-1.0	\
+      $CPPFLAGS"
 fi
 
 AC_CHECK_HEADERS([apr_pools.h],
@@ -703,6 +705,12 @@ libapr-1 is required for mesos to build.
 # We use "-isystem" instead of "-I" to add Boost to the include search
 # path. This disables compiler warnings inside Boost headers since we
 # can't easily fix them. See MESOS-3799.
+#
+# Note that the use of "-isystem" modifies header lookup order; the
+# preprocessor will first look for headers in *all* paths given with
+# "-I" and only then look into "-isystem" paths. This means that all
+# prefixes potentially containing Boost headers should be added with
+# "-isystem" as well.
 if test -n "`echo $with_boost`"; then
   CPPFLAGS="$CPPFLAGS -isystem ${with_boost}/include"
 fi
@@ -740,7 +748,7 @@ AM_CONDITIONAL([WITH_BUNDLED_BOOST], [test "x$with_bundled_boost" = "xyes"])
 # the CPPFLAGS and LDFLAGS with respective /include and /lib path
 # suffixes.
 if test -n "`echo $with_curl`" ; then
-    CPPFLAGS="-I${with_curl}/include $CPPFLAGS"
+    CPPFLAGS="-isystem ${with_curl}/include $CPPFLAGS"
     LDFLAGS="-L${with_curl}/lib $LDFLAGS"
 fi
 
@@ -762,7 +770,7 @@ if test "x$without_bundled_elfio" = "xyes" || \
     if test "$with_elfio" = "${with_elfio#/}"; then
       AC_MSG_ERROR([The path passed to --with-elfio must be absolute.])
     fi
-     CPPFLAGS="-I${with_elfio} $CPPFLAGS"
+     CPPFLAGS="-isystem ${with_elfio} $CPPFLAGS"
   fi
 
   AC_CHECK_HEADERS([elfio/elfio.h], [],
@@ -784,7 +792,7 @@ AM_CONDITIONAL([WITH_BUNDLED_ELFIO], [test "x$with_bundled_elfio" = "xyes"])
 # while extending it by /include and to LDFLAGS while extending it by
 # /lib.
 if test -n "`echo $with_glog`"; then
-  CPPFLAGS="$CPPFLAGS -I${with_glog}/include"
+  CPPFLAGS="$CPPFLAGS -isystem ${with_glog}/include"
   LDFLAGS="$LDFLAGS -L${with_glog}/lib"
 fi
 
@@ -826,12 +834,12 @@ GMOCKSRC="gmock-all.cc"
 GTESTSRC="gtest-all.cc"
 
 if test -n "`echo $with_gmock`"; then
-  CPPFLAGS="$CPPFLAGS -I${with_gmock} -I${with_gmock}/include \
-    -I${with_gmock}/src -I${with_gmock}/gtest -I${with_gmock}/gtest/include \
-    -I${with_gmock}/gtest/src"
+  CPPFLAGS="$CPPFLAGS -isystem ${with_gmock} -isystem ${with_gmock}/include \
+    -isystem ${with_gmock}/src -isystem ${with_gmock}/gtest \
+    -isystem ${with_gmock}/gtest/include -isystem ${with_gmock}/gtest/src"
 
 elif test "x$enable_bundled" != "xyes"; then
-  CPPFLAGS="$CPPFLAGS -I/usr/src/gmock"
+  CPPFLAGS="$CPPFLAGS -isystem /usr/src/gmock"
   # On system installations the deps are handled separately.
   # So insert a placeholder for substitution.
   GTESTSRC="stdio.h"
@@ -880,7 +888,7 @@ AC_SUBST([GTESTSRC])
 
 
 if test -n "`echo $with_http_parser`"; then
-  CPPFLAGS="$CPPFLAGS -I${with_http_parser}/include"
+  CPPFLAGS="$CPPFLAGS -isystem ${with_http_parser}/include"
   LDFLAGS="$LDFLAGS -L${with_http_parser}/lib"
 fi
 
@@ -1042,8 +1050,8 @@ __EOF__
     if test "$OS_NAME" = "darwin"; then
       while true; do # Loop until sucessful (via break) or exhausted options.
         m4_foreach([java_cppflags],
-                   [["-I$JAVA_HOME/include -I$JAVA_HOME/include/$OS_NAME"],
-                    ["-I/System/Library/Frameworks/JavaVM.framework/Headers"]],
+                   [["-isystem $JAVA_HOME/include -isystem $JAVA_HOME/include/$OS_NAME"],
+                    ["-isystem /System/Library/Frameworks/JavaVM.framework/Headers"]],
                    [JAVA_CPPFLAGS=java_cppflags
                     TRY_LINK_JNI([break])])
         # Exhausted options.
@@ -1061,7 +1069,7 @@ __EOF__
     else
       while true; do # Loop until sucessful (via break) or exhausted options.
         m4_foreach([java_cppflags],
-                   [["-I$JAVA_HOME/include -I$JAVA_HOME/include/$OS_NAME"]],
+                   [["-isystem $JAVA_HOME/include -isystem $JAVA_HOME/include/$OS_NAME"]],
                    [JAVA_CPPFLAGS=java_cppflags
                     TRY_LINK_JNI([break])])
         # Exhausted options.
@@ -1125,7 +1133,7 @@ AM_CONDITIONAL([HAS_JAVA], [test "x$has_java" = "xyes"])
 # CPPFLAGS while extending it by /include and to LDFLAGS while
 # extending it by /lib.
 if test -n "`echo $with_leveldb`"; then
-  CPPFLAGS="$CPPFLAGS -I${with_leveldb}/include"
+  CPPFLAGS="$CPPFLAGS -isystem ${with_leveldb}/include"
   LDFLAGS="$LDFLAGS -L${with_leveldb}/lib"
 fi
 
@@ -1174,7 +1182,7 @@ if test -z "`echo $with_libevent`" &&
 fi
 
 if test -n "`echo $with_libevent`"; then
-  CPPFLAGS="-I${with_libevent}/include $CPPFLAGS"
+  CPPFLAGS="-isystem ${with_libevent}/include $CPPFLAGS"
   LDFLAGS="-L${with_libevent}/lib $LDFLAGS"
 fi
 
@@ -1247,10 +1255,10 @@ AM_CONDITIONAL([WITH_BUNDLED_LIBPROCESS], [test "x$with_bundled_libprocess" = "x
 # Perform necessary configuration for network isolator.
 if test "x$with_network_isolator" = "xyes"; then
   if test -n "`echo $with_nl`"; then
-    CPPFLAGS="-I${with_nl}/include/libnl3 $CPPFLAGS"
+    CPPFLAGS="-isystem ${with_nl}/include/libnl3 $CPPFLAGS"
     LDFLAGS="-L${with_nl}/lib $LDFLAGS"
   else
-    CPPFLAGS="-I/usr/include/libnl3 $CPPFLAGS"
+    CPPFLAGS="-isystem /usr/include/libnl3 $CPPFLAGS"
   fi
 
   # Check for OS support.
@@ -1334,7 +1342,7 @@ if test "x$without_bundled_nvml" = "xyes" || \
     if test "$with_nvml" = "${with_nvml#/}"; then
       AC_MSG_ERROR([The path passed to --with-nvml must be absolute.])
     fi
-     CPPFLAGS="-I${with_nvml} $CPPFLAGS"
+     CPPFLAGS="-isystem ${with_nvml} $CPPFLAGS"
   fi
 
   AC_CHECK_HEADERS([nvidia/gdk/nvml.h], [],
@@ -1357,7 +1365,7 @@ AM_CONDITIONAL([WITH_BUNDLED_NVML],
 # CPPFLAGS while extending it by /include and to LDFLAGS while
 # extending it by /lib.
 if test -n "`echo $with_protobuf`"; then
-  CPPFLAGS="$CPPFLAGS -I${with_protobuf}/include"
+  CPPFLAGS="$CPPFLAGS -isystem ${with_protobuf}/include"
   LDFLAGS="$LDFLAGS -L${with_protobuf}/lib"
 fi
 
@@ -1439,7 +1447,7 @@ AC_SUBST([PROTOBUF_JAR])
 AC_SUBST([PROTOCOMPILER])
 
 if test -n "`echo $with_libev`"; then
-  CPPFLAGS="$CPPFLAGS -I${with_libev}/include"
+  CPPFLAGS="$CPPFLAGS -isystem ${with_libev}/include"
   LDFLAGS="$LDFLAGS -L${with_libev}/lib"
 fi
 
@@ -1485,7 +1493,7 @@ fi
 
 
 if test -n "`echo $with_picojson`"; then
-  CPPFLAGS="$CPPFLAGS -I${with_picojson}/include"
+  CPPFLAGS="$CPPFLAGS -isystem ${with_picojson}/include"
 fi
 
 # Check if user has asked us to use a preinstalled picojson, or if
@@ -1521,14 +1529,14 @@ AM_CONDITIONAL([WITH_BUNDLED_PICOJSON], [test "x$with_bundled_picojson" = "xyes"
 # CPPFLAGS while extending it by /include and to LDFLAGS while
 # extending it by /lib.
 if test -n "`echo $with_protobuf`"; then
-  CPPFLAGS="$CPPFLAGS -I${with_protobuf}/include"
+  CPPFLAGS="$CPPFLAGS -isystem ${with_protobuf}/include"
   LDFLAGS="$LDFLAGS -L${with_protobuf}/lib"
 fi
 # Check if Sasl2 prefix path was provided, and if so, add it to
 # the CPPFLAGS and LDFLAGS with respective /include and /lib path
 # suffixes.
 if test -n "`echo $with_sasl`" ; then
-  CPPFLAGS="-I${with_sasl}/include $CPPFLAGS"
+  CPPFLAGS="-isystem ${with_sasl}/include $CPPFLAGS"
   LDFLAGS="-L${with_sasl}/lib $LDFLAGS"
 fi
 
@@ -1622,7 +1630,7 @@ if test -z "`echo $with_ssl`" &&
 fi
 
 if test -n "`echo $with_ssl`"; then
-  CPPFLAGS="-I${with_ssl}/include $CPPFLAGS"
+  CPPFLAGS="-isystem ${with_ssl}/include $CPPFLAGS"
   LDFLAGS="-L${with_ssl}/lib $LDFLAGS"
 fi
 
@@ -1713,10 +1721,10 @@ if test -z "`echo $with_svn`" &&
 fi
 
 if test -n "`echo $with_svn`"; then
-  CPPFLAGS="-I${with_svn}/include/subversion-1 $CPPFLAGS"
+  CPPFLAGS="-isystem ${with_svn}/include/subversion-1 $CPPFLAGS"
   LDFLAGS="-L${with_svn}/lib $LDFLAGS"
 else
-  CPPFLAGS="-I/usr/include/subversion-1 $CPPFLAGS"
+  CPPFLAGS="-isystem /usr/include/subversion-1 $CPPFLAGS"
 fi
 
 AC_CHECK_HEADERS([svn_version.h],
@@ -1794,7 +1802,7 @@ AM_CONDITIONAL([ENABLE_XFS_DISK_ISOLATOR], [test "x$enable_xfs_disk_isolator" =
 # the CPPFLAGS and LDFLAGS with respective /include and /lib path
 # suffixes.
 if test -n "`echo $with_zlib`" ; then
-    CPPFLAGS="-I${with_zlib}/include $CPPFLAGS"
+    CPPFLAGS="-isystem ${with_zlib}/include $CPPFLAGS"
     LDFLAGS="-L${with_zlib}/lib $LDFLAGS"
 fi
 
@@ -1817,10 +1825,10 @@ fi
 # NOTE: The reason we append /include/zookeeper is because in mesos,
 # we include <zookeeper.h> rather than <zookeeper/zookeeper.h>.
 if test -n "`echo $with_zookeeper`"; then
-  CPPFLAGS="$CPPFLAGS -I${with_zookeeper}/include/zookeeper"
+  CPPFLAGS="$CPPFLAGS -isystem ${with_zookeeper}/include/zookeeper"
   LDFLAGS="$LDFLAGS -L${with_zookeeper}/lib"
 elif test "x$enable_bundled" != "xyes"; then
-  CPPFLAGS="$CPPFLAGS -I/usr/include/zookeeper"
+  CPPFLAGS="$CPPFLAGS -isystem /usr/include/zookeeper"
 fi
 
 


[3/3] mesos git commit: Added MESOS-7581 to the 1.1.3 CHANGELOG.

Posted by ti...@apache.org.
Added MESOS-7581 to the 1.1.3 CHANGELOG.

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


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

Branch: refs/heads/1.1.x
Commit: a4a110e1376a9bff24a4cbe8388ff486406eab59
Parents: 7e7aaca
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Mon Jul 3 23:12:41 2017 +0200
Committer: Till Toenshoff <to...@me.com>
Committed: Tue Jul 4 00:16:39 2017 +0200

----------------------------------------------------------------------
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a4a110e1/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 602554b..a37c4d8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,7 @@ All Issues:
   * [MESOS-7569] - Allow "old" executors with half-open connections to be preserved during agent upgrade / restart.
   * [MESOS-7689] - Libprocess can crash on malformed request paths for libprocess messages.
   * [MESOS-7690] - The agent can crash when an unknown executor tries to register.
+  * [MESOS-7581] - Fix interference of external Boost installations when using some unbundled dependencies.
 
 
 Release Notes - Mesos - Version 1.1.2


[2/3] mesos git commit: Added MESOS-7690 to the 1.1.3 CHANGELOG.

Posted by ti...@apache.org.
Added MESOS-7690 to the 1.1.3 CHANGELOG.


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

Branch: refs/heads/1.1.x
Commit: 7e7aacabd4952f20dc1e9c0ee3bc1fbff04502af
Parents: 116733e
Author: Benjamin Mahler <bm...@apache.org>
Authored: Fri Jun 16 17:33:49 2017 -0700
Committer: Till Toenshoff <to...@me.com>
Committed: Tue Jul 4 00:15:44 2017 +0200

----------------------------------------------------------------------
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7e7aacab/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 173494a..602554b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,7 @@ All Issues:
   * [MESOS-7540] - Add an agent flag for executor re-registration timeout.
   * [MESOS-7569] - Allow "old" executors with half-open connections to be preserved during agent upgrade / restart.
   * [MESOS-7689] - Libprocess can crash on malformed request paths for libprocess messages.
+  * [MESOS-7690] - The agent can crash when an unknown executor tries to register.
 
 
 Release Notes - Mesos - Version 1.1.2