Skip to main content

How to Build ClickHouse on Linux for RISC-V 64 Architecture

As of writing (11.11.2021) building for risc-v considered to be highly experimental. Not all features can be enabled.

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 RISC-V 64 CPU architecture. This is intended for continuous integration checks that run on Linux servers.

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

Install Clang-16

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

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

Build ClickHouse

cd ClickHouse
mkdir build-riscv64
ninja -C build-riscv64

The resulting binary will run only on Linux with the RISC-V 64 CPU architecture.