From b3e8949d2a589a9dc42280bf2bc43a863d0b7f9a Mon Sep 17 00:00:00 2001 From: proller Date: Fri, 30 Mar 2018 16:58:00 +0300 Subject: [PATCH] CLICKHOUSE-3675 Add glibc version test Fix zookeeper tools compile --- contrib/zookeeper-cmake/CMakeLists.txt | 2 ++ dbms/src/Server/CMakeLists.txt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/contrib/zookeeper-cmake/CMakeLists.txt b/contrib/zookeeper-cmake/CMakeLists.txt index 1211f1f8e14..df8859ffbeb 100644 --- a/contrib/zookeeper-cmake/CMakeLists.txt +++ b/contrib/zookeeper-cmake/CMakeLists.txt @@ -192,9 +192,11 @@ endif() # cli executable add_executable(cli ${LIBRARY_DIR}/src/cli.c) target_link_libraries(cli zookeeper) +target_link_libraries(cli $<$:m>) # load_gen executable if(WANT_SYNCAPI AND NOT WIN32) add_executable(load_gen ${LIBRARY_DIR}/src/load_gen.c) target_link_libraries(load_gen zookeeper) + target_link_libraries(load_gen $<$:m>) endif() diff --git a/dbms/src/Server/CMakeLists.txt b/dbms/src/Server/CMakeLists.txt index d268851f63a..a153d3c932a 100644 --- a/dbms/src/Server/CMakeLists.txt +++ b/dbms/src/Server/CMakeLists.txt @@ -192,6 +192,9 @@ else () add_custom_target (clickhouse-bundle ALL DEPENDS ${CLICKHOUSE_BUNDLE}) endif () +set (GLIBC_MAX_REQUIRED 2.4) +add_test(NAME GLIBC_required_version COMMAND bash -c "readelf -s ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-server | grep '@GLIBC' | grep -oP 'GLIBC_[\\d\\.]+' | sort | uniq | sort -r | perl -lnE 'exit 1 if $_ gt q{GLIBC_${GLIBC_MAX_REQUIRED}}'") + install ( FILES config.xml users.xml DESTINATION ${CLICKHOUSE_ETC_DIR}/clickhouse-server