Skip to main content
ClickHouse has experimental support for s390x.

Building ClickHouse for s390x

s390x, as other platforms, builds OpenSSL as a static library. If you want to build with dynamic OpenSSL, you need to pass -DENABLE_OPENSSL_DYNAMIC=1 to CMake. These instructions assume that the host machine is Linux x86_64/ARM and has all the tooling required to build natively based on the build instructions. It also assumes that the host is Ubuntu 22.04 but the following instructions should also work on Ubuntu 20.04. In addition to installing the tooling used to build natively, the following additional packages need to be installed:
To build for s390x:

Running

To emulate you’ll need QEMU user static binary for s390x. On Ubuntu it can be installed with:
Once built, the binary can be run with, e.g.:

Debugging

Install LLDB:
To Debug a s390x executable, run clickhouse using QEMU in debug mode:
In another shell run LLDB and attach, replace <Clickhouse Parent Directory> and <build directory> with the values corresponding to your environment.

Visual Studio Code integration

  • CodeLLDB extension is required for visual debugging.
  • Command Variable extension can help dynamic launches if using CMake Variants.
  • Make sure to set the backend to your LLVM installation eg. "lldb.library": "/usr/lib/x86_64-linux-gnu/liblldb-21.so"
  • Make sure to run the clickhouse executable in debug mode prior to launch. (It is also possible to create a preLaunchTask that automates this)

Example configurations

cmake-variants.yaml

launch.json

settings.json

This would also put different builds under different subfolders of the build folder.

run-debug.sh

tasks.json

Defines a task to run the compiled executable in server mode under a tmp folder next to the binaries, with configuration from under programs/server/config.xml.
Last modified on June 23, 2026