Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • You want to build Impala purely from source without relying on prebuilt binaries.
  • You are trying to build Impala on a platform for which prebuilt binaries are not available.
  • You want to add or modify a dependency in native-toolchain. E.g. build Impala with a newer version of LLVM, or with different configuration options.

Prerequisites

A number of prerequisites are required to build the full toolchain.

...

Code Block
languagebash
# General build requirements
sudo apt-get install build-essential git

# Requirements for specific packages
sudo apt-get install bison # For binutils
sudo apt-get install autoconf automake libtool # For libevent
sudo apt-get install libz-dev # For OpenSSL
sudo apt-get install libssl-dev # For Thrift
sudo apt-get install libncurses-dev # For GDB
sudo apt-get install libsasl2-dev # For Kudu

Building

Code Block
languagebash
# Checkout the toolchain
git clone https://github.com/cloudera/native-toolchain.git
cd native-toolchain

# This may take a long time! See check/ for detailed logs.
./buildall.sh

Using custom toolchain with Impala

Code Block
languagebash
# Assume that ${IMPALA_HOME} has the Impala source checkout and ${NATIVE_TOOLCHAIN_HOME} has the native-toolchain source checkout
cd ${IMPALA_HOME}
# Symlink the built packages into the toolchain/ subdirectory
(mkdir -p toolchain && cd toolchain && ln -s ${NATIVE_TOOLCHAIN_HOME}/build/* .)

# Disable toolchain bootstrapping, which could replace our binaries with precompiled ones. You may want to add this to your .bashrc file.
export SKIP_TOOLCHAIN_BOOTSTRAP=true
# Optional: ${IMPALA_HOME}/toolchain is the default value for IMPALA_TOOLCHAIN. You may want to add this to your .bashrc file.
export IMPALA_TOOLCHAIN=${IMPALA_HOME}/toolchain

 # Build Impala - this will pick up the new toolchain.
./buildall.sh <args>