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 2018/10/04 13:47:32 UTC

[mesos] branch master updated (26ea709 -> bfbb9e0)

This is an automated email from the ASF dual-hosted git repository.

tillt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from 26ea709  Added monitoring paragraph to high-availability.md.
     new d396478  Removed version check from libevent dependency tracking.
     new 53976ee  Removed version check from libevent dependency tracking from libprocess.
     new e67022f  Fixed ssl build specific incompatiblity with libevent later than 2.1.5.
     new 3dcdb32  Updated libevent linkage to adhere to best practices.
     new 2ccc37e  Updated libevent linkage to adhere to best practices.
     new 9c0d41e  Moved libevent_openssl validation into libevent.m4.
     new a54a798  Moved libevent_openssl validation into libevent.m4.
     new bfbb9e0  Removed unbundling by default for libevent on macOS when using CMake.

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 3rdparty/cmake/FindLIBEVENT.cmake                  |  2 +-
 3rdparty/libprocess/Makefile.am                    |  3 +-
 3rdparty/libprocess/configure.ac                   | 24 +------
 3rdparty/libprocess/m4/libevent.m4                 | 80 ++++++++--------------
 .../src/posix/libevent/libevent_ssl_socket.cpp     |  8 +++
 cmake/CompilationConfigure.cmake                   |  9 +--
 configure.ac                                       | 24 +------
 m4/libevent.m4                                     | 80 ++++++++--------------
 src/python/native_common/ext_modules.py.in         | 10 ++-
 9 files changed, 77 insertions(+), 163 deletions(-)


[mesos] 05/08: Updated libevent linkage to adhere to best practices.

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 2ccc37e97f420e4378985f06673295305a4e60d0
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:41:19 2018 +0200

    Updated libevent linkage to adhere to best practices.
    
    libevent is a combination of libevent_core and libevent_extra. Mesos
    and libprocess do not make use of any libevent_extra functionality.
    
    Additionally, linking against libevent is against best practices.
    
    Replaces use of libevent with libevent_core in both libevent.m4 as
    well as the libprocess linkage.
    
    Review: https://reviews.apache.org/r/68914/
---
 3rdparty/libprocess/Makefile.am    | 3 +--
 3rdparty/libprocess/m4/libevent.m4 | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/3rdparty/libprocess/Makefile.am b/3rdparty/libprocess/Makefile.am
index 22b1395..851a842 100644
--- a/3rdparty/libprocess/Makefile.am
+++ b/3rdparty/libprocess/Makefile.am
@@ -158,8 +158,7 @@ endif
 else
 if WITH_BUNDLED_LIBEVENT
 LIB_EVENT_INCLUDE_FLAGS = -I$(LIBEVENT)
-LIB_EVENT = $(LIBEVENT)/libevent_core.la $(LIBEVENT)/libevent_pthreads.la \
-            $(LIBEVENT)/libevent_extra.la $(LIBEVENT)/libevent.la
+LIB_EVENT = $(LIBEVENT)/libevent_core.la $(LIBEVENT)/libevent_pthreads.la
 if ENABLE_SSL
 LIB_EVENT += $(LIBEVENT)/libevent_openssl.la
 endif
diff --git a/3rdparty/libprocess/m4/libevent.m4 b/3rdparty/libprocess/m4/libevent.m4
index cd52b3f..35242a1 100644
--- a/3rdparty/libprocess/m4/libevent.m4
+++ b/3rdparty/libprocess/m4/libevent.m4
@@ -33,10 +33,10 @@ libevent version 2+ headers are required for libprocess to build.
 -------------------------------------------------------------------
   ])])
 
-  AC_CHECK_LIB([event], [event_base_new], [], [
+  AC_CHECK_LIB([event_core], [event_base_new], [], [
     AC_MSG_ERROR([cannot find libevent
 -------------------------------------------------------------------
-libevent version 2+ is required for libprocess to build.
+libevent_core version 2+ is required for libprocess to build.
 -------------------------------------------------------------------
   ])])
 


[mesos] 07/08: Moved libevent_openssl validation into libevent.m4.

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit a54a7989b668f6d244eb333acb4a2b2dfb9d1161
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:41:29 2018 +0200

    Moved libevent_openssl validation into libevent.m4.
    
    Combines all libevent related header and library checks into
    libevent.m4.
    
    Review: https://reviews.apache.org/r/68916/
---
 3rdparty/libprocess/configure.ac   | 15 +--------------
 3rdparty/libprocess/m4/libevent.m4 | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/3rdparty/libprocess/configure.ac b/3rdparty/libprocess/configure.ac
index 4c58032..177cbf6 100644
--- a/3rdparty/libprocess/configure.ac
+++ b/3rdparty/libprocess/configure.ac
@@ -999,20 +999,7 @@ libcrypto is required for an SSL-enabled build.
 
   if test "x$enable_libevent" = "xyes"; then
     if test "x$with_bundled_libevent" != "xyes"; then
-      AC_CHECK_HEADERS([event2/bufferevent_ssl.h],
-                       [AC_CHECK_LIB([event_openssl],
-                                     [bufferevent_openssl_get_ssl],
-                                     [],
-                                     [AC_MSG_ERROR([cannot find libevent_openssl
--------------------------------------------------------------------
-libevent_openssl version 2+ is required for an SSL-enabled build.
--------------------------------------------------------------------
-                                     ])])],
-                       [AC_MSG_ERROR([cannot find libevent_openssl headers
--------------------------------------------------------------------
-libevent_openssl version 2+ headers are required for an SSL-enabled build.
--------------------------------------------------------------------
-      ])])
+      MESOS_HAVE_LIBEVENT_SSL()
     fi
   else
     AC_MSG_ERROR([SSL is currently only supported with libevent])
diff --git a/3rdparty/libprocess/m4/libevent.m4 b/3rdparty/libprocess/m4/libevent.m4
index 35242a1..0caa16d 100644
--- a/3rdparty/libprocess/m4/libevent.m4
+++ b/3rdparty/libprocess/m4/libevent.m4
@@ -25,6 +25,16 @@
 #   Validates if we have a usable libevent.
 #
 
+#
+# SYNOPSIS
+#
+#   MESOS_HAVE_LIBEVENT_SSL()
+#
+# DESCRIPTION
+#
+#   Validates if we have a usable libevent_openssl.
+#
+
 AC_DEFUN([MESOS_HAVE_LIBEVENT],[
   AC_CHECK_HEADERS([event2/event.h], [], [
     AC_MSG_ERROR([cannot find libevent headers
@@ -54,3 +64,20 @@ libevent_pthreads version 2+ is required for libprocess to build.
 -------------------------------------------------------------------
   ])])
 ])
+
+AC_DEFUN([MESOS_HAVE_LIBEVENT_SSL],[
+  AC_CHECK_HEADERS([event2/bufferevent_ssl.h],
+                   [AC_CHECK_LIB([event_openssl],
+                                 [bufferevent_openssl_get_ssl],
+                                 [],
+                                 [AC_MSG_ERROR([cannot find libevent_openssl
+-------------------------------------------------------------------
+libevent_openssl version 2+ is required for an SSL-enabled build.
+-------------------------------------------------------------------
+                                 ])])],
+                   [AC_MSG_ERROR([cannot find libevent_openssl headers
+-------------------------------------------------------------------
+libevent_openssl version 2+ headers are required for an SSL-enabled build.
+-------------------------------------------------------------------
+  ])])
+])


[mesos] 06/08: Moved libevent_openssl validation into libevent.m4.

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 9c0d41e5576fc52eb7df58d0e071cedbad696621
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:41:23 2018 +0200

    Moved libevent_openssl validation into libevent.m4.
    
    Combines all libevent related header and library checks into
    libevent.m4.
    
    Review: https://reviews.apache.org/r/68915/
---
 configure.ac   | 15 +--------------
 m4/libevent.m4 | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index cee59ba..1caab4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1971,20 +1971,7 @@ libcrypto is required for an SSL-enabled build.
 
   if test "x$enable_libevent" = "xyes"; then
     if test "x$with_bundled_libevent" != "xyes"; then
-      AC_CHECK_HEADERS([event2/bufferevent_ssl.h],
-                       [AC_CHECK_LIB([event_openssl],
-                                     [bufferevent_openssl_get_ssl],
-                                     [],
-                                     [AC_MSG_ERROR([cannot find libevent_openssl
--------------------------------------------------------------------
-libevent_openssl version 2+ is required for an SSL-enabled build.
--------------------------------------------------------------------
-                                     ])])],
-                       [AC_MSG_ERROR([cannot find libevent_openssl headers
--------------------------------------------------------------------
-libevent_openssl version 2+ headers are required for an SSL-enabled build.
--------------------------------------------------------------------
-      ])])
+      MESOS_HAVE_LIBEVENT_SSL()
     fi
   else
     AC_MSG_ERROR([SSL is currently only supported with libevent])
diff --git a/m4/libevent.m4 b/m4/libevent.m4
index 35242a1..0caa16d 100644
--- a/m4/libevent.m4
+++ b/m4/libevent.m4
@@ -25,6 +25,16 @@
 #   Validates if we have a usable libevent.
 #
 
+#
+# SYNOPSIS
+#
+#   MESOS_HAVE_LIBEVENT_SSL()
+#
+# DESCRIPTION
+#
+#   Validates if we have a usable libevent_openssl.
+#
+
 AC_DEFUN([MESOS_HAVE_LIBEVENT],[
   AC_CHECK_HEADERS([event2/event.h], [], [
     AC_MSG_ERROR([cannot find libevent headers
@@ -54,3 +64,20 @@ libevent_pthreads version 2+ is required for libprocess to build.
 -------------------------------------------------------------------
   ])])
 ])
+
+AC_DEFUN([MESOS_HAVE_LIBEVENT_SSL],[
+  AC_CHECK_HEADERS([event2/bufferevent_ssl.h],
+                   [AC_CHECK_LIB([event_openssl],
+                                 [bufferevent_openssl_get_ssl],
+                                 [],
+                                 [AC_MSG_ERROR([cannot find libevent_openssl
+-------------------------------------------------------------------
+libevent_openssl version 2+ is required for an SSL-enabled build.
+-------------------------------------------------------------------
+                                 ])])],
+                   [AC_MSG_ERROR([cannot find libevent_openssl headers
+-------------------------------------------------------------------
+libevent_openssl version 2+ headers are required for an SSL-enabled build.
+-------------------------------------------------------------------
+  ])])
+])


[mesos] 01/08: Removed version check from libevent dependency tracking.

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit d396478018567022b28b8a82e8808d85bb7a8846
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:40:30 2018 +0200

    Removed version check from libevent dependency tracking.
    
    Review: https://reviews.apache.org/r/68904/
---
 configure.ac   |  9 +--------
 m4/libevent.m4 | 51 +--------------------------------------------------
 2 files changed, 2 insertions(+), 58 deletions(-)

diff --git a/configure.ac b/configure.ac
index 505201a..cee59ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1490,14 +1490,7 @@ if test "x$enable_libevent" = "xyes"; then
   # linking.
   if test "x$without_bundled_libevent" = "xyes" || \
      test "x$enable_bundled" != "xyes"; then
-     MESOS_HAVE_LIBEVENT([2.0.22], [], [
-       AC_MSG_ERROR([libevent version is incompatible
--------------------------------------------------------------------
-libevent version 2.0.22 is the most recent we currently support.
-
-You may want to install an older version of libevent on your system
-and point this build system to it via --with-libevent=DIR.
--------------------------------------------------------------------])])
+     MESOS_HAVE_LIBEVENT()
   else
     with_bundled_libevent=yes
   fi
diff --git a/m4/libevent.m4 b/m4/libevent.m4
index 3a7fcad..cd52b3f 100644
--- a/m4/libevent.m4
+++ b/m4/libevent.m4
@@ -18,7 +18,7 @@
 #
 # SYNOPSIS
 #
-#   MESOS_HAVE_LIBEVENT(MINIMAL_VERSION, action-if-true, action-if-false)
+#   MESOS_HAVE_LIBEVENT()
 #
 # DESCRIPTION
 #
@@ -53,53 +53,4 @@ libevent_pthreads version 2+ headers are required for libprocess to build.
 libevent_pthreads version 2+ is required for libprocess to build.
 -------------------------------------------------------------------
   ])])
-
-  AC_MSG_CHECKING([for libevent version])
-
-  # Save our flags.
-  saved_CFLAGS="$CFLAGS"
-  saved_LIBS="$LIBS"
-
-  # Required flags for libevent.
-  LIBS="-levent"
-  CFLAGS=""
-
-  # Compile and run C program that gets the libevent version numnber into
-  # "conftest.out" which gets cleaned up by AC_RUN_IFELSE itself.
-  AC_LANG_PUSH([C])
-  AC_RUN_IFELSE([
-    AC_LANG_SOURCE([[
-      #include <event.h>
-      #include <stdio.h>
-
-      int main(int argc, char** argv)
-      {
-        FILE* fp = fopen("conftest.out", "w");
-        fprintf(fp, "%s", event_get_version());
-        fclose(fp);
-        return 0;
-      }
-    ]])],
-    [libevent_version=`cat conftest.out`])
-  AC_LANG_POP([C])
-
-  # Restore flags.
-  CFLAGS="$saved_CFLAGS"
-  LIBS="$saved_LIBS"
-
-  AC_MSG_RESULT([$libevent_version])
-
-  AS_IF([test "x${libevent_version}" = "x"], [:], [
-    AX_COMPARE_VERSION([$libevent_version],
-                       [le], [$1],
-                       [is_libevent_usable=yes])
-  ])
-
-  AS_IF([test "x$is_libevent_usable" = "xyes"], [
-    $2
-    :
-  ], [
-    $3
-    :
-  ])
 ])


[mesos] 04/08: Updated libevent linkage to adhere to best practices.

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 3dcdb32cf90702047b96abff38545c6f29ae2049
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:41:12 2018 +0200

    Updated libevent linkage to adhere to best practices.
    
    libevent is a combination of libevent_core and libevent_extra. Mesos
    and libprocess do not make use of any libevent_extra functionality.
    
    Additionally, linking against libevent is against best practices.
    
    Replaces use of libevent with libevent_core in libevent.m4,
    FindLIBEVENT.cmake as well as the native Python egg linkage.
    
    Review: https://reviews.apache.org/r/68913/
---
 3rdparty/cmake/FindLIBEVENT.cmake          |  2 +-
 m4/libevent.m4                             |  4 ++--
 src/python/native_common/ext_modules.py.in | 10 ++++------
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/3rdparty/cmake/FindLIBEVENT.cmake b/3rdparty/cmake/FindLIBEVENT.cmake
index d6a1e65..5741ef0 100644
--- a/3rdparty/cmake/FindLIBEVENT.cmake
+++ b/3rdparty/cmake/FindLIBEVENT.cmake
@@ -42,7 +42,7 @@ else()
   set(POSSIBLE_LIBEVENT_LIB_DIRS ${LIBEVENT_ROOT_DIR}/lib)
 endif()
 
-set(LIBEVENT_LIBRARY_NAMES event event_pthreads)
+set(LIBEVENT_LIBRARY_NAMES event_core event_pthreads)
 
 if (ENABLE_SSL)
   list(APPEND LIBEVENT_LIBRARY_NAMES event_openssl)
diff --git a/m4/libevent.m4 b/m4/libevent.m4
index cd52b3f..35242a1 100644
--- a/m4/libevent.m4
+++ b/m4/libevent.m4
@@ -33,10 +33,10 @@ libevent version 2+ headers are required for libprocess to build.
 -------------------------------------------------------------------
   ])])
 
-  AC_CHECK_LIB([event], [event_base_new], [], [
+  AC_CHECK_LIB([event_core], [event_base_new], [], [
     AC_MSG_ERROR([cannot find libevent
 -------------------------------------------------------------------
-libevent version 2+ is required for libprocess to build.
+libevent_core version 2+ is required for libprocess to build.
 -------------------------------------------------------------------
   ])])
 
diff --git a/src/python/native_common/ext_modules.py.in b/src/python/native_common/ext_modules.py.in
index df10b5c..1f2e6c1 100644
--- a/src/python/native_common/ext_modules.py.in
+++ b/src/python/native_common/ext_modules.py.in
@@ -118,18 +118,16 @@ def _create_module(module_name):
         libevent_dir = os.path.join('3rdparty', 'libevent-2.0.22-stable')
         libevent_dir = os.path.join(abs_top_builddir, libevent_dir, '.libs')
 
-        libevent = os.path.join(libevent_dir, 'libevent.a')
+        libevent_core = os.path.join(libevent_dir, 'libevent_core.a')
 
         # Check if a bundled version of libevent was built.
-        if os.path.exists(libevent):
-            EXTRA_OBJECTS.append(libevent)
-            EXTRA_OBJECTS.append(os.path.join(libevent_dir, 'libevent_extra.a'))
+        if os.path.exists(libevent_core):
+            EXTRA_OBJECTS.append(libevent_core)
             EXTRA_OBJECTS.append(os.path.join(libevent_dir, 'libevent_pthreads.a'))
             if '@ENABLE_SSL_TRUE@' == '':
                 EXTRA_OBJECTS.append(os.path.join(libevent_dir, 'libevent_openssl.a'))
         else:
-            EXTRA_OBJECTS.append('-levent')
-            EXTRA_OBJECTS.append('-levent_extra')
+            EXTRA_OBJECTS.append('-levent_core')
             EXTRA_OBJECTS.append('-levent_pthreads')
             if '@ENABLE_SSL_TRUE@' == '':
                 EXTRA_OBJECTS.append(-levent_openssl)


[mesos] 03/08: Fixed ssl build specific incompatiblity with libevent later than 2.1.5.

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit e67022fd95571fb093e41ad5fc92457328e7f91f
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:40:43 2018 +0200

    Fixed ssl build specific incompatiblity with libevent later than 2.1.5.
    
    Up until and including libevent 2.1.5 (beta) the buffer events EV_READ
    and EV_WRITE were enabled by default in the openssl related socket
    setup.
    
    That got changed by f4b6284b8393dbabf389ddce734a30f4cdeffa17 within
    libevent; the default expectancy of read and write buffer events got
    removed.
    
    The changes in libevent in turn caused our implementation on top of it
    to fail, typically directly after accept and connect calls.
    
    The libevent maintainer Azat Khuzhin has generously been helping us out
    by debugging and fixing the incomplete setup within libprocess.
    
    This patch is based on Azat's suggestions from https://goo.gl/4CK3PD.
    It has been validated against libevent 2.0.22, 2.1.8 and 2.2 (alpha)
    on macOS 10.14.1 and Ubuntu 16.04.
    
    Review: https://reviews.apache.org/r/68906/
---
 3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp b/3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp
index 436b389..bc8f782 100644
--- a/3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp
+++ b/3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp
@@ -595,6 +595,10 @@ Future<Nothing> LibeventSSLSocketImpl::connect(const Address& address)
               &LibeventSSLSocketImpl::event_callback,
               CHECK_NOTNULL(self->event_loop_handle));
 
+          // Explicitly enable read and write bufferevents as needed
+          // for libevent >= 2.1.6. See MESOS-9265.
+          bufferevent_enable(self->bev, EV_READ | EV_WRITE);
+
           if (bufferevent_socket_connect(
                   self->bev,
                   reinterpret_cast<sockaddr*>(&addr),
@@ -1207,6 +1211,10 @@ void LibeventSSLSocketImpl::accept_SSL_callback(AcceptRequest* request)
               &LibeventSSLSocketImpl::event_callback,
               CHECK_NOTNULL(impl->event_loop_handle));
 
+          // Explicitly enable read and write bufferevents as needed
+          // for libevent >= 2.1.6. See MESOS-9265.
+          bufferevent_enable(bev, EV_READ | EV_WRITE);
+
           request->promise.set(std::dynamic_pointer_cast<SocketImpl>(impl));
         } else if (events & BEV_EVENT_ERROR) {
           std::ostringstream stream;


[mesos] 08/08: Removed unbundling by default for libevent on macOS when using CMake.

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit bfbb9e0ad12594c2d2b60567779b7542a0515589
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:45:06 2018 +0200

    Removed unbundling by default for libevent on macOS when using CMake.
    
    Review: https://reviews.apache.org/r/68919/
---
 cmake/CompilationConfigure.cmake | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index a820c86..5d2be0a 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -80,17 +80,10 @@ option(
   FALSE)
 
 if (ENABLE_LIBEVENT)
-  # TODO(tillt): Consider adding Ubuntu 17 to this check. See MESOS-7076.
-  if (NOT APPLE)
-    set(DEFAULT_UNBUNDLED_LIBEVENT FALSE)
-  else ()
-    set(DEFAULT_UNBUNDLED_LIBEVENT TRUE)
-  endif ()
-
   option(
     UNBUNDLED_LIBEVENT
     "Build libprocess with an installed libevent version instead of the bundled."
-    ${DEFAULT_UNBUNDLED_LIBEVENT})
+    FALSE)
 
   if (UNBUNDLED_LIBEVENT)
     set(


[mesos] 02/08: Removed version check from libevent dependency tracking from libprocess.

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 53976ee21282fcafe93e20bc33dbf31dab23cfcf
Author: Till Toenshoff <to...@me.com>
AuthorDate: Thu Oct 4 15:40:38 2018 +0200

    Removed version check from libevent dependency tracking from libprocess.
    
    Review: https://reviews.apache.org/r/68905/
---
 3rdparty/libprocess/configure.ac   |  9 +------
 3rdparty/libprocess/m4/libevent.m4 | 51 +-------------------------------------
 2 files changed, 2 insertions(+), 58 deletions(-)

diff --git a/3rdparty/libprocess/configure.ac b/3rdparty/libprocess/configure.ac
index c3e3964..4c58032 100644
--- a/3rdparty/libprocess/configure.ac
+++ b/3rdparty/libprocess/configure.ac
@@ -803,14 +803,7 @@ if test "x$enable_libevent" = "xyes"; then
   # linking.
   if test "x$without_bundled_libevent" = "xyes" || \
      test "x$enable_bundled" != "xyes"; then
-     MESOS_HAVE_LIBEVENT([2.0.22], [], [
-       AC_MSG_ERROR([libevent version is incompatible
--------------------------------------------------------------------
-libevent version 2.0.22 is the most recent we currently support.
-
-You may want to install an older version of libevent on your system
-and point this build system to it via --with-libevent=DIR.
--------------------------------------------------------------------])])
+     MESOS_HAVE_LIBEVENT()
   else
     with_bundled_libevent=yes
   fi
diff --git a/3rdparty/libprocess/m4/libevent.m4 b/3rdparty/libprocess/m4/libevent.m4
index 3a7fcad..cd52b3f 100644
--- a/3rdparty/libprocess/m4/libevent.m4
+++ b/3rdparty/libprocess/m4/libevent.m4
@@ -18,7 +18,7 @@
 #
 # SYNOPSIS
 #
-#   MESOS_HAVE_LIBEVENT(MINIMAL_VERSION, action-if-true, action-if-false)
+#   MESOS_HAVE_LIBEVENT()
 #
 # DESCRIPTION
 #
@@ -53,53 +53,4 @@ libevent_pthreads version 2+ headers are required for libprocess to build.
 libevent_pthreads version 2+ is required for libprocess to build.
 -------------------------------------------------------------------
   ])])
-
-  AC_MSG_CHECKING([for libevent version])
-
-  # Save our flags.
-  saved_CFLAGS="$CFLAGS"
-  saved_LIBS="$LIBS"
-
-  # Required flags for libevent.
-  LIBS="-levent"
-  CFLAGS=""
-
-  # Compile and run C program that gets the libevent version numnber into
-  # "conftest.out" which gets cleaned up by AC_RUN_IFELSE itself.
-  AC_LANG_PUSH([C])
-  AC_RUN_IFELSE([
-    AC_LANG_SOURCE([[
-      #include <event.h>
-      #include <stdio.h>
-
-      int main(int argc, char** argv)
-      {
-        FILE* fp = fopen("conftest.out", "w");
-        fprintf(fp, "%s", event_get_version());
-        fclose(fp);
-        return 0;
-      }
-    ]])],
-    [libevent_version=`cat conftest.out`])
-  AC_LANG_POP([C])
-
-  # Restore flags.
-  CFLAGS="$saved_CFLAGS"
-  LIBS="$saved_LIBS"
-
-  AC_MSG_RESULT([$libevent_version])
-
-  AS_IF([test "x${libevent_version}" = "x"], [:], [
-    AX_COMPARE_VERSION([$libevent_version],
-                       [le], [$1],
-                       [is_libevent_usable=yes])
-  ])
-
-  AS_IF([test "x$is_libevent_usable" = "xyes"], [
-    $2
-    :
-  ], [
-    $3
-    :
-  ])
 ])