Skip to content

Commit

Permalink
IMPALA-4652: Add crcutil to build
Browse files Browse the repository at this point in the history
Add crcutil, built from a git hash since there are no released versions,
to Impala's build.

crcutil is available at https://github.com/rurban/crcutil

FindCrcutil.cmake was taken from Apache Kudu.

Change-Id: I095d1c6b8e9e8f40cf62c1ecfdc880e708a72c28
Reviewed-on: http://gerrit.cloudera.org:8080/5660
Reviewed-by: Henry Robinson <[email protected]>
Tested-by: Henry Robinson <[email protected]>
  • Loading branch information
Henry Robinson authored and jenkins committed Jan 12, 2017
1 parent c46e414 commit 9dd8336
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ set_dep_root(AVRO)
set_dep_root(BOOST)
set_dep_root(BREAKPAD)
set_dep_root(BZIP2)
set_dep_root(CRCUTIL)
set_dep_root(GCC)
set_dep_root(GFLAGS)
set_dep_root(GLOG)
Expand Down Expand Up @@ -316,6 +317,11 @@ include_directories(SYSTEM ${LIBEV_INCLUDE_DIR})
ADD_THIRDPARTY_LIB(libev
STATIC_LIB "${LIBEV_STATIC_LIB}")

find_package(Crcutil REQUIRED)
include_directories(SYSTEM ${CRCUTIL_INCLUDE_DIR})
ADD_THIRDPARTY_LIB(crcutil
STATIC_LIB "${CRCUTIL_STATIC_LIB}")

###################################################################

# KuduClient can use GLOG
Expand Down
4 changes: 2 additions & 2 deletions bin/bootstrap_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ def download_cdh_components(toolchain_root, cdh_components):
if not os.path.exists(toolchain_root):
os.makedirs(toolchain_root)

packages = ["avro", "binutils", "boost", "breakpad", "bzip2", "cmake", "gcc", "gflags",
"glog", "gperftools", "gtest", "kudu", "libev", "llvm",
packages = ["avro", "binutils", "boost", "breakpad", "bzip2", "cmake", "crcutil", "gcc",
"gflags", "glog", "gperftools", "gtest", "kudu", "libev", "llvm",
("llvm", "3.8.0-asserts-p1"), "lz4", "openldap", "protobuf", "rapidjson", "re2",
"snappy", "thrift", "tpc-h", "tpc-ds", "zlib"]
bootstrap(toolchain_root, packages)
Expand Down
1 change: 1 addition & 0 deletions bin/impala-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export IMPALA_BOOST_VERSION=1.57.0
export IMPALA_BREAKPAD_VERSION=20150612-p1
export IMPALA_BZIP2_VERSION=1.0.6-p2
export IMPALA_CMAKE_VERSION=3.2.3-p1
export IMPALA_CRCUTIL_VERSION=440ba7babeff77ffad992df3a10c767f184e946e
export IMPALA_CYRUS_SASL_VERSION=2.1.23
export IMPALA_GCC_VERSION=4.9.2
export IMPALA_GFLAGS_VERSION=2.0
Expand Down
40 changes: 40 additions & 0 deletions cmake_modules/FindCrcutil.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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.

# - Find CRCUTIL (crcutil/include.h, libcrcutil.a)
# This module defines
# CRCUTIL_INCLUDE_DIR, directory containing headers
# CRCUTIL_SHARED_LIB, path to libcrcutil's shared library
# CRCUTIL_STATIC_LIB, path to libcrcutil's static library
# CRCUTIL_FOUND, whether crcutil has been found

find_path(CRCUTIL_INCLUDE_DIR crcutil/interface.h
PATHS ${CRCUTIL_ROOT}/include
NO_CMAKE_SYSTEM_PATH
NO_SYSTEM_ENVIRONMENT_PATH)
find_library(CRCUTIL_SHARED_LIB crcutil
PATHS ${CRCUTIL_ROOT}/lib
NO_CMAKE_SYSTEM_PATH
NO_SYSTEM_ENVIRONMENT_PATH)
find_library(CRCUTIL_STATIC_LIB libcrcutil.a
PATHS ${CRCUTIL_ROOT}/lib
NO_CMAKE_SYSTEM_PATH
NO_SYSTEM_ENVIRONMENT_PATH)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CRCUTIL REQUIRED_VARS
CRCUTIL_SHARED_LIB CRCUTIL_STATIC_LIB CRCUTIL_INCLUDE_DIR)

0 comments on commit 9dd8336

Please sign in to comment.