clickhouse/clickhouse
Dependencies
ClickHouse is a self-contained C++ binary with everything statically linked. Third-party libraries live as submodules under contrib/. The repo currently has 256 contrib submodules (an entry per *-cmake directory or library directory).
This page is a guided tour, not an exhaustive list. Run ls contrib/ for the full listing.
Why vendor everything?
- Reproducibility. No surprise from system library updates. Every build at a given commit pulls the same dependency commits.
- Single static binary.
clickhouse-serverdoesn't dynamically link against anything outside libc / libpthread / libstdc++. - Patches. ClickHouse maintains internal patches over many libraries. Vendoring is the only way to keep them coherent.
- Cross-compilation. A bundled toolchain (LLVM/Clang) plus
contrib/builds on Linux x86_64, aarch64, RISC-V, PowerPC, s390x, FreeBSD, and macOS.
Categories
Storage / formats / lakehouse
arrow,avro,protobuf,capnproto,simdjson,rapidjson,flatbuffers,msgpack-c,numpy-c-cmake,mongo-c-driver.aws*,azure,aws-crt-cpp,aws-c-*— S3 and Azure SDK split into many small libs.delta-kernel-rs— Delta Lake table-format reader.apache-iceberg-tools— Iceberg helpers.librdkafka(viacppkafka).nats.c.amqpcpp(AMQP-CPP).librocksdb(RocksDB) — backsEmbeddedRocksDBand Keeper's RocksDB log.unixodbc,nanodbc— ODBC bridge.bzip2,lz4,zstd,xz,zlib-ng,snappy— compression codecs.
Networking
boost,boost-cmake.c-ares,libcurl-cmake,wolfssl-cmake,openssl(boringssl-cmake),s2n-tls,nuraft.pocoproject-poco— used pervasively for HTTP, XML, threading.grpcandprotoc-gen-validate-cmake.
SQL parsing and query
antlr4-cpp-runtime,antlr4-grammars— used by some adapters.re2,vectorscan(Hyperscan fork) — regex engines.usearch+SimSIMD— vector search.xxhash,wyhash,farmhash,cityhash102(vendored) — hash families.hyperscan(the original).
Cryptography and hashing
boringssl-cmake,cyrus-sasl-cmake,gostssl,nettle-cmake,s2n-tls.sha3iuf-cmake,morton-nd-cmake.
Date / time / locale
cctz,cctz-cmake,unicode-data,unicode-c,icu,icu-cmake.
LLVM / JIT / fuzzing / tooling
llvm-project— used both as the vendored compiler toolchain and for runtime JIT (src/Interpreters/JIT/).libcxx,libcxxabi,libunwind— vendored libc++.libfuzzer-cmake.
Database integrations
mariadb-connector-c,libpqxx,libpq,mongo-c-driver,mongocxx-c,cassandra-cpp-driver,redis-plus-plus,aerospike-client-c,prometheus-cpp.
Geo / math
s2geometry-cmake,h3-cmake,boost-geometry,liburing(Linux io_uring),eigen-cmake.fastfloat,dragonbox.
XML / YAML / TOML / JSON
pocoproject-poco,rapidjson,simdjson,yaml-cpp-cmake,tomlplusplus.
Misc
replxx— line editor for the client.skim— fuzzy finder used by some tools.duckdb-cmake(the duck) — used in some experimental paths and tests.ai-sdk-cpp— recent addition for AI integrations.bech32,morton-nd-cmake,idn2-cmake.
Maintenance
- Submodules are committed at exact SHAs.
git submodule update --init --recursivebrings them in. - Each
<lib>-cmake/directory is the in-tree CMake recipe; the upstream sources are untouched. - Renovation typically happens via PRs that bump submodule pointers and adapt the cmake files.
Runtime dependencies
clickhouse-server static binary needs:
- A modern Linux (kernel 3.10+, but glibc 2.17+ is the practical floor; musl works too).
- libc, libpthread, libdl, librt.
- libstdc++ (linked statically when built with bundled libcxx).
That's it. There are no required runtime services beyond what the operator configures (Keeper, S3, Postgres, …).
Build dependencies
- A C++20 compiler (the project uses Clang 16+, vendored).
- CMake 3.20+.
- Ninja or Make.
- Python 3 (test runner and build helpers).
- Rust toolchain — for
rust/crates wired into the binary (prql,corrosion,delta-kernel-rs,tantivy_search,chdig, …). The build pulls them into the C++ link stage.
See Getting started for the build walkthrough.
Related pages
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.