This guide is about how to compile Doris on Linux using Ubuntu 16.04 or later versions.

Make sure you have the following system dependencies installed.

GCC 10+, Oracle JDK 8+, Python 2.7+, Apache Maven 3.5+, CMake 3.19.2+, Bison 3.0+

  1. sudo apt install build-essential openjdk-8-jdk maven cmake byacc flex automake libtool-bin bison binutils-dev libiberty-dev zip unzip libncurses5-dev curl git ninja-build python
  2. sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
  3. sudo apt update
  4. sudo apt install gcc-10 g++-10
  5. sudo apt-get install autoconf automake libtool autopoint

Like compiling with a Docker development image, check if AVX2 instructions are supported first.

  1. $ cat /proc/cpuinfo | grep avx2

If supported, execute the following command for compilation.

  1. # By default, it builds AVX2 version.
  2. $ sh build.sh
  3. # If you need the no AVX2 version, add USE_AVX2=0.
  4. $ USE_AVX2=0 sh build.sh
  5. # To compile a debug version of BE, add BUILD_TYPE=Debug.
  6. $ BUILD_TYPE=Debug sh build.sh

After compilation, the output files can be found in the output/ directory.