You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/03/21 03:41:59 UTC

incubator-kudu git commit: Revert "KUDU-1336. Add a simple preflight check for thirdparty build"

Repository: incubator-kudu
Updated Branches:
  refs/heads/master 8f72630cf -> 9d305af79


Revert "KUDU-1336. Add a simple preflight check for thirdparty build"

This reverts commit 90be132b9fdf8fc898a69186ca80d1fcce9ba109.

This seems to have caused build failures on some build slaves which don't have gdb available.

Change-Id: I2c7e25f65854feeb191e931ebb05319bfb2f0505
Reviewed-on: http://gerrit.cloudera.org:8080/2588
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Todd Lipcon <to...@apache.org>


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

Branch: refs/heads/master
Commit: 9d305af79952396a12c507e4459d373287fb3464
Parents: 8f72630
Author: Todd Lipcon <to...@apache.org>
Authored: Mon Mar 21 01:55:32 2016 +0000
Committer: Todd Lipcon <to...@apache.org>
Committed: Mon Mar 21 01:56:30 2016 +0000

----------------------------------------------------------------------
 thirdparty/build-thirdparty.sh |   5 --
 thirdparty/preflight.py        | 154 ------------------------------------
 2 files changed, 159 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9d305af7/thirdparty/build-thirdparty.sh
----------------------------------------------------------------------
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index e6dace7..9febc2d 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -39,11 +39,6 @@ set -ex
 
 TP_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
 
-# Before doing anything, run the pre-flight check for missing dependencies.
-# This avoids the most common issues people have with building (if they don't
-# read the docs)
-$TP_DIR/preflight.py
-
 source $TP_DIR/vars.sh
 source $TP_DIR/build-definitions.sh
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/9d305af7/thirdparty/preflight.py
----------------------------------------------------------------------
diff --git a/thirdparty/preflight.py b/thirdparty/preflight.py
deleted file mode 100755
index 5d1a0ec..0000000
--- a/thirdparty/preflight.py
+++ /dev/null
@@ -1,154 +0,0 @@
-#!/usr/bin/env python
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-"""
-Simple script which checks that the build system has the main
-dependencies necessary for building thirdparty/.
-
-This is not meant to be exhaustive. For example, it doesn't check specific
-version numbers of software. Nor is it meant to be a replacement for
-more complicated config tests using something like autoconf or cmake.
-But, it's simple enough that it runs with no dependencies and tells
-users if they're missing anything obvious.
-"""
-
-import os
-import sys
-import subprocess
-
-DEV_NULL = file("/dev/null", "wb")
-CC = os.environ.get("CC", "cc")
-CXX = os.environ.get("CXX", "c++")
-
-REQUIRED_TOOLS = [
-  "autoconf",
-  "automake",
-  "curl",
-  "gdb",
-  "git",
-  "libtool",
-  "make",
-  "patch",
-  "pkg-config",
-  "rsync",
-  "unzip",
-  "xxd"]
-
-def log_failure_and_exit(error_msg, exc=None):
-  print "***", error_msg
-  if exc:
-    print exc.message
-    print
-  print "Please refer to docs/installation.adoc for complete installation "
-  print "instructions for your platform."
-  sys.exit(1)
-
-
-def try_do(status_msg, error_msg, func):
-  print status_msg, "..."
-  try:
-    func()
-  except Exception as e:
-    log_failure_and_exit(error_msg, e)
-
-
-def compile(script, flags=None):
-  if flags is None:
-    flags = []
-
-  p = subprocess.Popen([CXX, '-o', '/dev/null', '-c', '-x', 'c++', '-'] + flags,
-      stderr=subprocess.PIPE,
-      stdout=subprocess.PIPE,
-      stdin=subprocess.PIPE)
-  print >>p.stdin, script
-  stdout, stderr = p.communicate()
-  if p.returncode != 0:
-    raise Exception("Compilation failed: " + stderr)
-
-
-def check_tools():
-  """ Check that basic build tools are installed. """
-  missing = []
-  for tool in REQUIRED_TOOLS:
-    print "Checking for " + tool
-    if subprocess.call(["which", tool], stdout=DEV_NULL, stderr=DEV_NULL) != 0:
-      missing.append(tool)
-  if missing:
-    log_failure_and_exit("Missing required tools:\n" +
-      "\n".join("  " + tool for tool in missing))
-
-
-def check_cxx11():
-  # Check that the compiler is new enough.
-  try_do(
-    "Checking for C++11 compiler support",
-    ("Unable to compile a simple c++11 program. " +
-     "Please use g++ 4.8 or higher. On CentOS 6 or RHEL 6 " +
-     "you must use the devtoolset. See docs/installation.adoc " +
-     "for more info."),
-    lambda: compile("""
-      #include <atomic>
-      int f() {
-        std::atomic<int> i;
-        return i.load();
-      }""",
-      flags=['--std=c++11']))
-
-
-def check_boost():
-  try_do(
-    "Checking for boost_thread and boost_system headers",
-    ("Unable to compile a simple program that uses boost. " +
-     "Please check the boost dependencies are installed."),
-    lambda: compile("""
-      #include <boost/thread/locks.hpp>
-      #include <boost/system/config.hpp>
-      """,
-      flags=["-E"]))
-
-
-def check_sasl():
-  try_do(
-    "Checking for cyrus-sasl headers",
-    ("Unable to compile a simple program that uses sasl. " +
-     "Please check that cyrus-sasl-devel (RPM) or libsasl2-dev (deb) " +
-     "dependencies are installed."),
-    lambda: compile("""
-      #include <sasl/sasl.h>
-      """,
-      flags=["-E"]))
-
-
-def main():
-  print "Running pre-flight checks"
-  print "-------------------------"
-  print "Using C compiler:", CXX
-  print "Using C++ compiler:", CXX
-  print ""
-  print "  (Set $CC and $CXX to change compiler)"
-  print "-------------------------"
-  check_tools()
-  check_cxx11()
-  check_boost()
-  check_sasl()
-  print "-------------"
-  print "Pre-flight checks succeeded."
-  return 0
-
-if __name__ == "__main__":
-  sys.exit(main())