Skip to content

Commit

Permalink
Fix clickhouse build
Browse files Browse the repository at this point in the history
  • Loading branch information
fdr400 committed Jan 28, 2025
1 parent 7fd5aec commit 2d0601c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion cmake/modules/Findclickhouse-cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ _userver_module_find_include(
)

_userver_module_find_library(
NAMES clickhouse-cpp-lib
# on Linux, clickhouse should be linked dynamically
# because new clickhouse versions have broker install
# with static libraries
NAMES libclickhouse-cpp-lib.so clickhouse-cpp-lib
PATH_SUFFIXES
clickhouse-cpp
yandex/clickhouse-cpp
Expand Down
4 changes: 2 additions & 2 deletions scripts/clickhouse/ubuntu-install-clickhouse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Exit on any error and treat unset variables as errors, print all commands
set -euox pipefail

CLICKHOUSE_VERSION=${CLICKHOUSE_VERSION:=v2.3.0}
CLICKHOUSE_VERSION=${CLICKHOUSE_VERSION:=v2.5.1}

# Installing Clickhouse C++ client libraries from sources
git clone --depth 1 -b ${CLICKHOUSE_VERSION} https://github.com/ClickHouse/clickhouse-cpp.git
(cd clickhouse-cpp && mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. && make -j $(nproc) && make install)
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .. && make -j $(nproc) && make install)
rm -rf clickhouse-cpp/
2 changes: 1 addition & 1 deletion scripts/docker/setup-base-ubuntu-22.04-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ apt clean all

# You could override those versions from command line
export AMQP_VERSION=${AMQP_VERSION:=v4.3.18}
export CLICKHOUSE_VERSION=${CLICKHOUSE_VERSION:=v2.3.0}
export CLICKHOUSE_VERSION=${CLICKHOUSE_VERSION:=v2.5.1}
export ROCKSDB_VERSION=${ROCKSDB_VERSION:=v8.9.1}
export POSTGRESQL_VERSION=${POSTGRESQL_VERSION:=14}

Expand Down

0 comments on commit 2d0601c

Please sign in to comment.