From 9e0b40bf09e373135758737f4ba31e1f270d8429 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Sun, 2 Feb 2020 23:21:49 +0300 Subject: [PATCH] Revert "Build fixes" --- cmake/find/h3.cmake | 3 ++- cmake/find/zlib.cmake | 2 +- cmake/tools.cmake | 8 +++----- contrib/CMakeLists.txt | 13 +++++-------- contrib/replxx-cmake/CMakeLists.txt | 5 +---- dbms/CMakeLists.txt | 8 ++------ dbms/src/Functions/geoToH3.cpp | 6 +----- dbms/src/Functions/h3EdgeAngle.cpp | 6 +----- dbms/src/Functions/h3EdgeLengthM.cpp | 9 ++------- dbms/src/Functions/h3GetResolution.cpp | 6 +----- dbms/src/Functions/h3IsValid.cpp | 6 +----- dbms/src/Functions/h3kRing.cpp | 6 +----- debian/pbuilder-hooks/B90test-server | 7 +++++++ 13 files changed, 28 insertions(+), 57 deletions(-) diff --git a/cmake/find/h3.cmake b/cmake/find/h3.cmake index e01f026950..6abe1ee657 100644 --- a/cmake/find/h3.cmake +++ b/cmake/find/h3.cmake @@ -15,8 +15,9 @@ if (USE_INTERNAL_H3_LIBRARY) set (H3_LIBRARY h3) set (H3_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib/include) elseif (NOT MISSING_INTERNAL_H3_LIBRARY) + set (H3_INCLUDE_PATHS /usr/local/include/h3) find_library (H3_LIBRARY h3) - find_path (H3_INCLUDE_DIR NAMES h3/h3api.h PATHS ${H3_INCLUDE_PATHS}) + find_path (H3_INCLUDE_DIR NAMES h3api.h PATHS ${H3_INCLUDE_PATHS}) endif () if (H3_LIBRARY AND H3_INCLUDE_DIR) diff --git a/cmake/find/zlib.cmake b/cmake/find/zlib.cmake index 7fc30fbfe4..42cfce871d 100644 --- a/cmake/find/zlib.cmake +++ b/cmake/find/zlib.cmake @@ -29,7 +29,7 @@ if (NOT ZLIB_FOUND AND NOT MISSING_INTERNAL_ZLIB_LIBRARY) set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco set (ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR}) # for protobuf set (ZLIB_FOUND 1) # for poco - if (USE_STATIC_LIBRARIES AND DEFINED BUILD_SHARED_LIBS) + if (USE_STATIC_LIBRARIES) set (ZLIB_LIBRARIES zlibstatic CACHE INTERNAL "") else () set (ZLIB_LIBRARIES zlib CACHE INTERNAL "") diff --git a/cmake/tools.cmake b/cmake/tools.cmake index 6aaeb5b8a1..025aac79b5 100644 --- a/cmake/tools.cmake +++ b/cmake/tools.cmake @@ -32,9 +32,8 @@ else () find_program (GOLD_PATH NAMES "ld.gold" "gold") endif () -if (NOT OS_FREEBSD) # We prefer LLD linker over Gold or BFD. - if (NOT LINKER_NAME) +if (NOT LINKER_NAME) if (LLD_PATH) if (COMPILER_GCC) # GCC driver requires one of supported linker names like "lld". @@ -44,9 +43,9 @@ if (NOT OS_FREEBSD) set (LINKER_NAME ${LLD_PATH}) endif () endif () - endif () +endif () - if (NOT LINKER_NAME) +if (NOT LINKER_NAME) if (GOLD_PATH) if (COMPILER_GCC) set (LINKER_NAME "gold") @@ -54,7 +53,6 @@ if (NOT OS_FREEBSD) set (LINKER_NAME ${GOLD_PATH}) endif () endif () - endif () endif () if (LINKER_NAME) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 8fb4c612ec..999d1e96c9 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -54,6 +54,7 @@ if (USE_INTERNAL_BTRIE_LIBRARY) endif () if (USE_INTERNAL_ZLIB_LIBRARY) + unset (BUILD_SHARED_LIBS CACHE) set (ZLIB_ENABLE_TESTS 0 CACHE INTERNAL "") set (SKIP_INSTALL_ALL 1 CACHE INTERNAL "") set (ZLIB_COMPAT 1 CACHE INTERNAL "") # also enables WITH_GZFILEOP @@ -69,14 +70,10 @@ if (USE_INTERNAL_ZLIB_LIBRARY) add_subdirectory (${INTERNAL_ZLIB_NAME}) # We should use same defines when including zlib.h as used when zlib compiled target_compile_definitions (zlib PUBLIC ZLIB_COMPAT WITH_GZFILEOP) - if (TARGET zlibstatic) - target_compile_definitions (zlibstatic PUBLIC ZLIB_COMPAT WITH_GZFILEOP) - endif () + target_compile_definitions (zlibstatic PUBLIC ZLIB_COMPAT WITH_GZFILEOP) if (ARCH_AMD64 OR ARCH_AARCH64) - target_compile_definitions (zlib PUBLIC X86_64 UNALIGNED_OK) - if (TARGET zlibstatic) - target_compile_definitions (zlibstatic PUBLIC X86_64 UNALIGNED_OK) - endif () + target_compile_definitions (zlib PUBLIC X86_64 UNALIGNED_OK) + target_compile_definitions (zlibstatic PUBLIC X86_64 UNALIGNED_OK) endif () endif () @@ -119,7 +116,7 @@ function(mysql_support) endif() if (USE_INTERNAL_ZLIB_LIBRARY) set(ZLIB_FOUND ON) - set(ZLIB_LIBRARY ${ZLIB_LIBRARIES}) + set(ZLIB_LIBRARY zlibstatic) set(WITH_EXTERNAL_ZLIB ON) endif() add_subdirectory (mariadb-connector-c) diff --git a/contrib/replxx-cmake/CMakeLists.txt b/contrib/replxx-cmake/CMakeLists.txt index cc428d957c..1240eb56b3 100644 --- a/contrib/replxx-cmake/CMakeLists.txt +++ b/contrib/replxx-cmake/CMakeLists.txt @@ -45,10 +45,7 @@ if (ENABLE_REPLXX) endif () endif () - if (NOT (COMPILER_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)) - target_compile_options(replxx PUBLIC -Wno-documentation) - endif () - + target_compile_options(replxx PUBLIC -Wno-documentation) target_compile_definitions(replxx PUBLIC USE_REPLXX=1) message (STATUS "Using replxx") diff --git a/dbms/CMakeLists.txt b/dbms/CMakeLists.txt index 16c38400ba..eeda7aa6a1 100644 --- a/dbms/CMakeLists.txt +++ b/dbms/CMakeLists.txt @@ -176,12 +176,8 @@ elseif (COMPILER_GCC) add_cxx_compile_options(-Wsizeof-array-argument) # Warn for suspicious length parameters to certain string and memory built-in functions if the argument uses sizeof add_cxx_compile_options(-Wsizeof-pointer-memaccess) - - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9) - # Warn about overriding virtual functions that are not marked with the override keyword - add_cxx_compile_options(-Wsuggest-override) - endif () - + # Warn about overriding virtual functions that are not marked with the override keyword + add_cxx_compile_options(-Wsuggest-override) # Warn whenever a switch statement has an index of boolean type and the case values are outside the range of a boolean type add_cxx_compile_options(-Wswitch-bool) # Warn if a self-comparison always evaluates to true or false diff --git a/dbms/src/Functions/geoToH3.cpp b/dbms/src/Functions/geoToH3.cpp index 7fc00f2ccb..40c267d865 100644 --- a/dbms/src/Functions/geoToH3.cpp +++ b/dbms/src/Functions/geoToH3.cpp @@ -10,11 +10,7 @@ #include #include -#if __has_include(

) -# include

-#else -# include -#endif +#include namespace DB diff --git a/dbms/src/Functions/h3EdgeAngle.cpp b/dbms/src/Functions/h3EdgeAngle.cpp index 130081f50e..18abc864c3 100644 --- a/dbms/src/Functions/h3EdgeAngle.cpp +++ b/dbms/src/Functions/h3EdgeAngle.cpp @@ -7,11 +7,7 @@ # include # include -# if __has_include(

) -# include

-# else -# include -# endif +# include namespace DB diff --git a/dbms/src/Functions/h3EdgeLengthM.cpp b/dbms/src/Functions/h3EdgeLengthM.cpp index 72cbc98bc6..d3c0db4b4b 100644 --- a/dbms/src/Functions/h3EdgeLengthM.cpp +++ b/dbms/src/Functions/h3EdgeLengthM.cpp @@ -8,13 +8,8 @@ # include # include -# if __has_include(

) -# include

-# include

-# else -# include -# include -# endif +# include +# include namespace DB diff --git a/dbms/src/Functions/h3GetResolution.cpp b/dbms/src/Functions/h3GetResolution.cpp index 1334c7dab5..dfa84e8e07 100644 --- a/dbms/src/Functions/h3GetResolution.cpp +++ b/dbms/src/Functions/h3GetResolution.cpp @@ -7,11 +7,7 @@ # include # include -# if __has_include(

) -# include

-# else -# include -# endif +# include namespace DB diff --git a/dbms/src/Functions/h3IsValid.cpp b/dbms/src/Functions/h3IsValid.cpp index 26ec272a6a..0c4123caf0 100644 --- a/dbms/src/Functions/h3IsValid.cpp +++ b/dbms/src/Functions/h3IsValid.cpp @@ -7,11 +7,7 @@ # include # include -# if __has_include(

) -# include

-# else -# include -# endif +# include namespace DB diff --git a/dbms/src/Functions/h3kRing.cpp b/dbms/src/Functions/h3kRing.cpp index 1b9ae13289..55571472c1 100644 --- a/dbms/src/Functions/h3kRing.cpp +++ b/dbms/src/Functions/h3kRing.cpp @@ -11,11 +11,7 @@ # include # include -# if __has_include(

) -# include

-# else -# include -# endif +# include namespace DB diff --git a/debian/pbuilder-hooks/B90test-server b/debian/pbuilder-hooks/B90test-server index e36c255f9f..670b0c15fc 100755 --- a/debian/pbuilder-hooks/B90test-server +++ b/debian/pbuilder-hooks/B90test-server @@ -8,6 +8,11 @@ PACKAGE_INSTALL=${PACKAGE_INSTALL=1} TEST_PORT_RANDOM=${TEST_PORT_RANDOM=1} if [ "${PACKAGE_INSTALL}" ]; then + #for PKG in $(ls /tmp/buildd/*.deb | sed -e's,.*/,,;s,_.*,,' ); do + # apt-get install -y --force-yes "$PKG" ||: + # apt-get remove -y "$PKG" ||: + #done + dpkg --auto-deconfigure -i /tmp/buildd/*.deb ||: apt install -y -f --allow-downgrades ||: dpkg -l | grep clickhouse ||: @@ -40,6 +45,8 @@ export CLICKHOUSE_PORT_TCP_SECURE=${CLICKHOUSE_PORT_TCP_SECURE:=9440} export CLICKHOUSE_PORT_HTTPS=${CLICKHOUSE_PORT_HTTPS:=8443} if [ "${TEST_CONNECT}" ]; then + sed -i 's/ssl_conf = ssl_sect/#ssl_conf = ssl_sect/g' /etc/ssl/openssl.cnf ||: + [ "${TEST_PORT_RANDOM}" ] && echo "${CLICKHOUSE_PORT_HTTP}${CLICKHOUSE_PORT_TCP}${CLICKHOUSE_PORT_INTERSERVER}" > /etc/clickhouse-server/config.d/port.xml if [ "${TEST_SSL}" ]; then -- GitLab