Repository: kudu Updated Branches: refs/heads/master d83cd11a9 -> 60c8e305b
[thirdparty] Fix failing openssl check on MacOS Since ea286417af the thirdparty build on Mac was failing as the openssl library path needs to be set. This commit adds this flag by invoking "pkg-config --cflags openssl" the same way as build-thirdparty.sh does. Change-Id: Ieffc39f6e9bf5744b1119826375d36ee1035ccde Reviewed-on: http://gerrit.cloudera.org:8080/10355 Reviewed-by: Adar Dembo <a...@cloudera.com> Tested-by: Kudu Jenkins Reviewed-by: Dan Burkert <danburk...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/60c8e305 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/60c8e305 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/60c8e305 Branch: refs/heads/master Commit: 60c8e305bef9ace8688aabbf18e2f500e8d9135c Parents: d83cd11 Author: Attila Bukor <abu...@cloudera.com> Authored: Wed May 9 18:11:46 2018 +0200 Committer: Dan Burkert <danburk...@apache.org> Committed: Wed May 9 16:50:08 2018 +0000 ---------------------------------------------------------------------- thirdparty/preflight.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/60c8e305/thirdparty/preflight.py ---------------------------------------------------------------------- diff --git a/thirdparty/preflight.py b/thirdparty/preflight.py index cb77325..cf813de 100755 --- a/thirdparty/preflight.py +++ b/thirdparty/preflight.py @@ -132,6 +132,15 @@ def check_sasl(): flags=["-E"])) def check_openssl(): + cflags = ["-E"] + try: + openssl_include = subprocess.check_output(["pkg-config", "--cflags", "openssl"]).rstrip() + if openssl_include != "": + cflags.append(openssl_include) + except subprocess.CalledProcessError: + homebrew_openssl_dir="/usr/local/opt/openssl/include" + if os.path.isdir(homebrew_openssl_dir): + cflags.append("-I" + homebrew_openssl_dir) try_do( "Checking for openssl headers", ("Unable to compile a simple program that uses openssl. " + @@ -140,7 +149,7 @@ def check_openssl(): lambda: compile(""" #include <openssl/ssl.h> """, - flags=["-E"])) + flags=cflags)) def main(): print("Running pre-flight checks")