kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject [1/2] kudu git commit: KUDU-1864 Thirdparty squeasel build fails on macOS 10.12
Date Mon, 06 Feb 2017 19:17:56 GMT
Repository: kudu
Updated Branches:
  refs/heads/master cd7b0dd4d -> d1fb71cf0


KUDU-1864 Thirdparty squeasel build fails on macOS 10.12

This patch fixes build of squeasel on OS X.  On OS X 10.11 and newer,
OpenSSL headers are not in /usr/include anymore.  Try to determine
their location using pkg-config.

This patch at least works on OS X 10.11.

Change-Id: Id2040817457e64e1e58244cdc5ab10b9412b809b
Reviewed-on: http://gerrit.cloudera.org:8080/5907
Reviewed-by: Dan Burkert <danburkert@apache.org>
Tested-by: Alexey Serbin <aserbin@cloudera.com>
Reviewed-by: Will Berkeley <wdberkeley@gmail.com>


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

Branch: refs/heads/master
Commit: a9d716aa3b51c7b3f1f44b4083afd7cf725a1885
Parents: cd7b0dd
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Fri Feb 3 22:07:21 2017 -0800
Committer: Will Berkeley <wdberkeley@gmail.com>
Committed: Mon Feb 6 15:53:00 2017 +0000

----------------------------------------------------------------------
 thirdparty/build-definitions.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/a9d716aa/thirdparty/build-definitions.sh
----------------------------------------------------------------------
diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index 4460e2e..7860e4d 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -473,6 +473,23 @@ build_rapidjson() {
 }
 
 build_squeasel() {
+  # Determine location of OpenSSL header files if building on OS X.
+  # On OS X 10.11.x and newer, OpenSSL headers are not in /usr/include
+  # anymore.
+  if [ -n "$OS_OSX" ]; then
+    local openssl_cflags=
+    if openssl_cflags=$(pkg-config --cflags openssl) ; then
+      # Using pkg-config works if OpenSSL is built via MacPorts.
+      EXTRA_CFLAGS="$EXTRA_CFLAGS $openssl_cflags"
+    fi
+    if [ -z $openssl_cflags ]; then
+      # If OpenSSL is built via brew, pkg-config does not report on cflags.
+      local brew_openssl_include_dir=/usr/local/opt/openssl/include
+      if [ -d $brew_openssl_include_dir ]; then
+        EXTRA_CFLAGS="$EXTRA_CFLAGS -I$brew_openssl_include_dir"
+      fi
+    fi
+  fi
   # Mongoose's Makefile builds a standalone web server, whereas we just want
   # a static lib
   SQUEASEL_BDIR=$TP_BUILD_DIR/$SQUEASEL_NAME$MODE_SUFFIX


Mime
View raw message