diff --git a/cmake/modules/Findclickhouse-cpp.cmake b/cmake/modules/Findclickhouse-cpp.cmake index 384d6875cac1..ff3873a70227 100644 --- a/cmake/modules/Findclickhouse-cpp.cmake +++ b/cmake/modules/Findclickhouse-cpp.cmake @@ -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 diff --git a/scripts/clickhouse/ubuntu-install-clickhouse.sh b/scripts/clickhouse/ubuntu-install-clickhouse.sh index f6f8c02de4a0..2279ff495886 100755 --- a/scripts/clickhouse/ubuntu-install-clickhouse.sh +++ b/scripts/clickhouse/ubuntu-install-clickhouse.sh @@ -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/ diff --git a/scripts/docker/setup-base-ubuntu-22.04-env.sh b/scripts/docker/setup-base-ubuntu-22.04-env.sh index e9f729a78a51..38ccff1c33a9 100755 --- a/scripts/docker/setup-base-ubuntu-22.04-env.sh +++ b/scripts/docker/setup-base-ubuntu-22.04-env.sh @@ -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} diff --git a/scripts/docker/ubuntu-24.04-base.dockerfile b/scripts/docker/ubuntu-24.04-base.dockerfile index fada6c79a8eb..9eadc95e8294 100644 --- a/scripts/docker/ubuntu-24.04-base.dockerfile +++ b/scripts/docker/ubuntu-24.04-base.dockerfile @@ -36,7 +36,7 @@ RUN \ COPY scripts/clickhouse/ubuntu-install-clickhouse.sh /userver_tmp/ -# RUN /userver_tmp/ubuntu-install-clickhouse.sh +RUN /userver_tmp/ubuntu-install-clickhouse.sh COPY scripts/rabbitmq/ubuntu_install_rabbitmq_dev.sh /userver_tmp/ RUN /userver_tmp/ubuntu_install_rabbitmq_dev.sh diff --git a/scripts/docker/ubuntu-24.04-userver.dockerfile b/scripts/docker/ubuntu-24.04-userver.dockerfile index d40a40fc3203..a5de1fd52a60 100644 --- a/scripts/docker/ubuntu-24.04-userver.dockerfile +++ b/scripts/docker/ubuntu-24.04-userver.dockerfile @@ -5,10 +5,8 @@ FROM ghcr.io/userver-framework/ubuntu-24.04-userver-base:latest # * all userver test dependencies (e.g. for testsuite) # * built userver itself -RUN apt install -y clang-18 RUN git clone https://github.com/userver-framework/userver \ && cd userver \ - && BUILD_OPTIONS='-DUSERVER_FEATURE_CLICKHOUSE=OFF -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18' \ - ./scripts/build_and_install_all.sh \ + && ./scripts/build_and_install_all.sh \ && cd .. \ && rm -rf userver/