preflight: add checks for openssl and zlib The openssl devel package is required for Kudu, but also for squeasel, so we should check for its existence in preflight.py.
Same goes for the zlib devel package, which is also required by IWYU. Change-Id: Ib9bd33ab489d742e9cdfc9af1aeedbd1905bd12a Reviewed-on: http://gerrit.cloudera.org:8080/10304 Tested-by: Adar Dembo <[email protected]> Reviewed-by: Todd Lipcon <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/ea286417 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/ea286417 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/ea286417 Branch: refs/heads/master Commit: ea286417afeb4109ea7db6a2bdc4ce9dbcaebdf7 Parents: 297b72b Author: Adar Dembo <[email protected]> Authored: Tue May 1 16:51:42 2018 -0700 Committer: Todd Lipcon <[email protected]> Committed: Fri May 4 15:15:34 2018 +0000 ---------------------------------------------------------------------- thirdparty/preflight.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/ea286417/thirdparty/preflight.py ---------------------------------------------------------------------- diff --git a/thirdparty/preflight.py b/thirdparty/preflight.py index 80992a4..85cc42b 100755 --- a/thirdparty/preflight.py +++ b/thirdparty/preflight.py @@ -131,6 +131,27 @@ def check_sasl(): """, flags=["-E"])) +def check_openssl(): + try_do( + "Checking for openssl headers", + ("Unable to compile a simple program that uses openssl. " + + "Please check that openssl-devel (RPM) or libssl-dev (deb) " + + "dependencies are installed."), + lambda: compile(""" + #include <openssl/ssl.h> + """, + flags=["-E"])) + +def check_zlib(): + try_do( + "Checking for zlib headers", + ("Unable to compile a simple program that uses zlib. " + + "Please check that zlib-devel (RPM) or zlib1g-dev (deb) " + + "dependencies are installed."), + lambda: compile(""" + #include <zlib.h> + """, + flags=["-E"])) def main(): print("Running pre-flight checks") @@ -143,6 +164,8 @@ def main(): check_tools() check_cxx11() check_sasl() + check_openssl() + check_zlib() print("-------------") print("Pre-flight checks succeeded.") return 0
