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:
Running
To emulate you’ll need QEMU user static binary for s390x. On Ubuntu it can be installed with:Debugging
Install LLDB:<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
preLaunchTaskthat automates this)
Example configurations
cmake-variants.yaml
launch.json
settings.json
This would also put different builds under different subfolders of thebuild folder.
run-debug.sh
tasks.json
Defines a task to run the compiled executable inserver mode under a tmp folder next to the binaries, with configuration from under programs/server/config.xml.