Skip to main content
Skip to main content

Compilation on Linux

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+

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
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt update
sudo apt install gcc-10 g++-10
sudo apt-get install autoconf automake libtool autopoint

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

$ cat /proc/cpuinfo | grep avx2

If supported, execute the following command for compilation.​

# By default, it builds AVX2 version.
$ sh build.sh

# If you need the no AVX2 version, add USE_AVX2=0.
$ USE_AVX2=0 sh build.sh

# To compile a debug version of BE, add BUILD_TYPE=Debug.
$ BUILD_TYPE=Debug sh build.sh

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