From cb655281479b5a6af113c22c32d537491f58b44f Mon Sep 17 00:00:00 2001 From: proller Date: Thu, 7 Jun 2018 17:42:38 +0300 Subject: [PATCH] Build fixes (#2481) * Build fixes * fix * Fix package without compiler * Better * fix * fix * fix * Build fix * fix * fix * fix * Build fix * Fix test * test fixes * test: netcat-openbsd * Compile fixes * Update AggregateFunctionStatisticsSimple.h * Update FunctionsRound.h --- dbms/programs/server/CMakeLists.txt | 7 ++++--- .../AggregateFunctions/AggregateFunctionStatisticsSimple.h | 1 + dbms/src/Functions/FunctionsRound.h | 4 ++++ dbms/src/Interpreters/InterpreterShowTablesQuery.cpp | 5 +---- dbms/tests/clickhouse-test-server | 7 ++----- debian/control | 2 +- release | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dbms/programs/server/CMakeLists.txt b/dbms/programs/server/CMakeLists.txt index b7907ed5f98..945f12051a6 100644 --- a/dbms/programs/server/CMakeLists.txt +++ b/dbms/programs/server/CMakeLists.txt @@ -20,9 +20,10 @@ if (CLICKHOUSE_SPLIT_BINARY) install (TARGETS clickhouse-server ${CLICKHOUSE_ALL_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse) 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}}'") +if (NOT APPLE AND NOT ARCH_FREEBSD) + 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}}'") +endif () install ( FILES config.xml users.xml diff --git a/dbms/src/AggregateFunctions/AggregateFunctionStatisticsSimple.h b/dbms/src/AggregateFunctions/AggregateFunctionStatisticsSimple.h index 98350e3eba9..e864d1cf64a 100644 --- a/dbms/src/AggregateFunctions/AggregateFunctionStatisticsSimple.h +++ b/dbms/src/AggregateFunctions/AggregateFunctionStatisticsSimple.h @@ -204,6 +204,7 @@ public: case StatisticsFunctionKind::covarSamp: return "covarSamp"; case StatisticsFunctionKind::corr: return "corr"; } + __builtin_unreachable(); } DataTypePtr getReturnType() const override diff --git a/dbms/src/Functions/FunctionsRound.h b/dbms/src/Functions/FunctionsRound.h index 89fad9fbf1c..35cfa56426d 100644 --- a/dbms/src/Functions/FunctionsRound.h +++ b/dbms/src/Functions/FunctionsRound.h @@ -219,6 +219,8 @@ struct IntegerRoundingComputation x = -x; return x; } + default: + __builtin_unreachable(); } } @@ -232,6 +234,8 @@ struct IntegerRoundingComputation return x; case ScaleMode::Negative: return computeImpl(x, scale); + default: + __builtin_unreachable(); } } diff --git a/dbms/src/Interpreters/InterpreterShowTablesQuery.cpp b/dbms/src/Interpreters/InterpreterShowTablesQuery.cpp index 9895feb6036..df4332c5b16 100644 --- a/dbms/src/Interpreters/InterpreterShowTablesQuery.cpp +++ b/dbms/src/Interpreters/InterpreterShowTablesQuery.cpp @@ -1,15 +1,12 @@ #include - #include #include - #include #include #include - #include - #include +#include namespace DB diff --git a/dbms/tests/clickhouse-test-server b/dbms/tests/clickhouse-test-server index ba96506a140..37c5999fd9d 100755 --- a/dbms/tests/clickhouse-test-server +++ b/dbms/tests/clickhouse-test-server @@ -42,9 +42,8 @@ export CLICKHOUSE_PORT_INTERSERVER=${CLICKHOUSE_PORT_INTERSERVER:=`$CLICKHOUSE_E export CLICKHOUSE_PORT_TCP_SECURE=${CLICKHOUSE_PORT_TCP_SECURE:=`$CLICKHOUSE_EXTRACT_CONFIG --key=tcp_port_secure`} export CLICKHOUSE_PORT_HTTPS=${CLICKHOUSE_PORT_HTTPS:=`$CLICKHOUSE_EXTRACT_CONFIG --key=https_port`} - -rm -rf $DATA_DIR -mkdir -p $LOG_DIR +rm -rf $DATA_DIR || true +mkdir -p $LOG_DIR || true DHPARAM=`$CLICKHOUSE_EXTRACT_CONFIG --key=openSSL.server.dhParamsFile` PRIVATEKEY=`${BIN_DIR}clickhouse-extract-from-config --config=$CLICKHOUSE_CONFIG --key=openSSL.server.privateKeyFile` @@ -78,8 +77,6 @@ $GDB ${BIN_DIR}clickhouse-server --config-file=$CLICKHOUSE_CONFIG -- \ CH_PID=$! sleep 3 - - if [ "$GDB" ]; then # Long symbols read sleep 40 diff --git a/debian/control b/debian/control index f3aa1be41ca..7834efea266 100644 --- a/debian/control +++ b/debian/control @@ -62,7 +62,7 @@ Description: debugging symbols for clickhouse-common-static Package: clickhouse-test Priority: optional Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, clickhouse-client, bash, expect, python, python-lxml, python-termcolor, python-requests, curl, perl, sudo, openssl +Depends: ${shlibs:Depends}, ${misc:Depends}, clickhouse-client, bash, expect, python, python-lxml, python-termcolor, python-requests, curl, perl, sudo, openssl, netcat-openbsd Description: Clickhouse tests diff --git a/release b/release index b918227837d..5623df2a712 100755 --- a/release +++ b/release @@ -53,7 +53,7 @@ do shift elif [[ $1 == '--fast' ]]; then # Wrong but fast pbuilder mode: create base package with all depends - EXTRAPACKAGES="$EXTRAPACKAGES debhelper cmake ninja-build gcc-7 g++-7 libc6-dev libmariadbclient-dev libicu-dev libltdl-dev libreadline-dev libssl-dev unixodbc-dev psmisc bash expect python python-lxml python-termcolor python-requests curl perl sudo openssl" + EXTRAPACKAGES="$EXTRAPACKAGES debhelper cmake ninja-build gcc-7 g++-7 libc6-dev libmariadbclient-dev libicu-dev libltdl-dev libreadline-dev libssl-dev unixodbc-dev psmisc bash expect python python-lxml python-termcolor python-requests curl perl sudo openssl netcat-openbsd" shift else echo "Unknown option $1"