Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat docker: build with gcc #845

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion scripts/docker/ubuntu-24.04-base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 1 addition & 3 deletions scripts/docker/ubuntu-24.04-userver.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Loading