Skip to main content

How to Build ClickHouse on Linux for AARCH64 (ARM64) Architecture

This is for the case when you have Linux machine and want to use it to build clickhouse binary that will run on another Linux machine with AARCH64 CPU architecture. This is intended for continuous integration checks that run on Linux servers.

The cross-build for AARCH64 is based on the Build instructions, follow them first.

Install Clang-13

Follow the instructions from for your Ubuntu or Debian setup or do

sudo bash -c "$(wget -O -"

Install Cross-Compilation Toolset

cd ClickHouse
mkdir -p build-aarch64/cmake/toolchain/linux-aarch64
wget '' -O gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz
tar xJf gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz -C build-aarch64/cmake/toolchain/linux-aarch64 --strip-components=1

Build ClickHouse

cd ClickHouse
mkdir build-arm64
CC=clang-13 CXX=clang++-13 cmake . -Bbuild-arm64 -DCMAKE_TOOLCHAIN_FILE=cmake/linux/toolchain-aarch64.cmake
ninja -C build-arm64

The resulting binary will run only on Linux with the AARCH64 CPU architecture.