mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 05:22:17 +00:00
Build fixes (#9381)
* Revert "Revert "Build fixes""
This reverts commit 355ff00c2e
.
* zlib link fix
This commit is contained in:
parent
030a8a4164
commit
6b2d6e9392
@ -15,9 +15,8 @@ if (USE_INTERNAL_H3_LIBRARY)
|
|||||||
set (H3_LIBRARY h3)
|
set (H3_LIBRARY h3)
|
||||||
set (H3_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib/include)
|
set (H3_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib/include)
|
||||||
elseif (NOT MISSING_INTERNAL_H3_LIBRARY)
|
elseif (NOT MISSING_INTERNAL_H3_LIBRARY)
|
||||||
set (H3_INCLUDE_PATHS /usr/local/include/h3)
|
|
||||||
find_library (H3_LIBRARY h3)
|
find_library (H3_LIBRARY h3)
|
||||||
find_path (H3_INCLUDE_DIR NAMES h3api.h PATHS ${H3_INCLUDE_PATHS})
|
find_path (H3_INCLUDE_DIR NAMES h3/h3api.h PATHS ${H3_INCLUDE_PATHS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (H3_LIBRARY AND H3_INCLUDE_DIR)
|
if (H3_LIBRARY AND H3_INCLUDE_DIR)
|
||||||
|
@ -29,11 +29,7 @@ if (NOT ZLIB_FOUND AND NOT MISSING_INTERNAL_ZLIB_LIBRARY)
|
|||||||
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco
|
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco
|
||||||
set (ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR}) # for protobuf
|
set (ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR}) # for protobuf
|
||||||
set (ZLIB_FOUND 1) # for poco
|
set (ZLIB_FOUND 1) # for poco
|
||||||
if (USE_STATIC_LIBRARIES)
|
set (ZLIB_LIBRARIES zlib CACHE INTERNAL "")
|
||||||
set (ZLIB_LIBRARIES zlibstatic CACHE INTERNAL "")
|
|
||||||
else ()
|
|
||||||
set (ZLIB_LIBRARIES zlib CACHE INTERNAL "")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
message (STATUS "Using ${INTERNAL_ZLIB_NAME}: ${ZLIB_INCLUDE_DIR} : ${ZLIB_LIBRARIES}")
|
message (STATUS "Using ${INTERNAL_ZLIB_NAME}: ${ZLIB_INCLUDE_DIR} : ${ZLIB_LIBRARIES}")
|
||||||
|
@ -32,8 +32,9 @@ else ()
|
|||||||
find_program (GOLD_PATH NAMES "ld.gold" "gold")
|
find_program (GOLD_PATH NAMES "ld.gold" "gold")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (NOT OS_FREEBSD)
|
||||||
# We prefer LLD linker over Gold or BFD.
|
# We prefer LLD linker over Gold or BFD.
|
||||||
if (NOT LINKER_NAME)
|
if (NOT LINKER_NAME)
|
||||||
if (LLD_PATH)
|
if (LLD_PATH)
|
||||||
if (COMPILER_GCC)
|
if (COMPILER_GCC)
|
||||||
# GCC driver requires one of supported linker names like "lld".
|
# GCC driver requires one of supported linker names like "lld".
|
||||||
@ -43,9 +44,9 @@ if (NOT LINKER_NAME)
|
|||||||
set (LINKER_NAME ${LLD_PATH})
|
set (LINKER_NAME ${LLD_PATH})
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT LINKER_NAME)
|
if (NOT LINKER_NAME)
|
||||||
if (GOLD_PATH)
|
if (GOLD_PATH)
|
||||||
if (COMPILER_GCC)
|
if (COMPILER_GCC)
|
||||||
set (LINKER_NAME "gold")
|
set (LINKER_NAME "gold")
|
||||||
@ -53,6 +54,7 @@ if (NOT LINKER_NAME)
|
|||||||
set (LINKER_NAME ${GOLD_PATH})
|
set (LINKER_NAME ${GOLD_PATH})
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (LINKER_NAME)
|
if (LINKER_NAME)
|
||||||
|
17
contrib/CMakeLists.txt
vendored
17
contrib/CMakeLists.txt
vendored
@ -49,7 +49,6 @@ if (USE_INTERNAL_BTRIE_LIBRARY)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_INTERNAL_ZLIB_LIBRARY)
|
if (USE_INTERNAL_ZLIB_LIBRARY)
|
||||||
unset (BUILD_SHARED_LIBS CACHE)
|
|
||||||
set (ZLIB_ENABLE_TESTS 0 CACHE INTERNAL "")
|
set (ZLIB_ENABLE_TESTS 0 CACHE INTERNAL "")
|
||||||
set (SKIP_INSTALL_ALL 1 CACHE INTERNAL "")
|
set (SKIP_INSTALL_ALL 1 CACHE INTERNAL "")
|
||||||
set (ZLIB_COMPAT 1 CACHE INTERNAL "") # also enables WITH_GZFILEOP
|
set (ZLIB_COMPAT 1 CACHE INTERNAL "") # also enables WITH_GZFILEOP
|
||||||
@ -65,10 +64,14 @@ if (USE_INTERNAL_ZLIB_LIBRARY)
|
|||||||
add_subdirectory (${INTERNAL_ZLIB_NAME})
|
add_subdirectory (${INTERNAL_ZLIB_NAME})
|
||||||
# We should use same defines when including zlib.h as used when zlib compiled
|
# We should use same defines when including zlib.h as used when zlib compiled
|
||||||
target_compile_definitions (zlib PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
|
target_compile_definitions (zlib PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
|
||||||
target_compile_definitions (zlibstatic PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
|
if (TARGET zlibstatic)
|
||||||
|
target_compile_definitions (zlibstatic PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
|
||||||
|
endif ()
|
||||||
if (ARCH_AMD64 OR ARCH_AARCH64)
|
if (ARCH_AMD64 OR ARCH_AARCH64)
|
||||||
target_compile_definitions (zlib PUBLIC X86_64 UNALIGNED_OK)
|
target_compile_definitions (zlib PUBLIC X86_64 UNALIGNED_OK)
|
||||||
target_compile_definitions (zlibstatic PUBLIC X86_64 UNALIGNED_OK)
|
if (TARGET zlibstatic)
|
||||||
|
target_compile_definitions (zlibstatic PUBLIC X86_64 UNALIGNED_OK)
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@ -111,7 +114,7 @@ function(mysql_support)
|
|||||||
endif()
|
endif()
|
||||||
if (USE_INTERNAL_ZLIB_LIBRARY)
|
if (USE_INTERNAL_ZLIB_LIBRARY)
|
||||||
set(ZLIB_FOUND ON)
|
set(ZLIB_FOUND ON)
|
||||||
set(ZLIB_LIBRARY zlibstatic)
|
set(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
|
||||||
set(WITH_EXTERNAL_ZLIB ON)
|
set(WITH_EXTERNAL_ZLIB ON)
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory (mariadb-connector-c)
|
add_subdirectory (mariadb-connector-c)
|
||||||
@ -143,9 +146,6 @@ endif ()
|
|||||||
|
|
||||||
if(USE_INTERNAL_SNAPPY_LIBRARY)
|
if(USE_INTERNAL_SNAPPY_LIBRARY)
|
||||||
set(SNAPPY_BUILD_TESTS 0 CACHE INTERNAL "")
|
set(SNAPPY_BUILD_TESTS 0 CACHE INTERNAL "")
|
||||||
if (NOT MAKE_STATIC_LIBRARIES)
|
|
||||||
set(BUILD_SHARED_LIBS 1) # TODO: set at root dir
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(snappy)
|
add_subdirectory(snappy)
|
||||||
|
|
||||||
@ -254,6 +254,7 @@ if (USE_EMBEDDED_COMPILER AND USE_INTERNAL_LLVM_LIBRARY)
|
|||||||
set (LLVM_ENABLE_PIC 0 CACHE INTERNAL "")
|
set (LLVM_ENABLE_PIC 0 CACHE INTERNAL "")
|
||||||
set (LLVM_TARGETS_TO_BUILD "X86;AArch64" CACHE STRING "")
|
set (LLVM_TARGETS_TO_BUILD "X86;AArch64" CACHE STRING "")
|
||||||
add_subdirectory (llvm/llvm)
|
add_subdirectory (llvm/llvm)
|
||||||
|
target_include_directories(LLVMSupport SYSTEM BEFORE PRIVATE ${ZLIB_INCLUDE_DIR})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_INTERNAL_LIBGSASL_LIBRARY)
|
if (USE_INTERNAL_LIBGSASL_LIBRARY)
|
||||||
|
@ -348,6 +348,7 @@ if (ARROW_WITH_ZLIB)
|
|||||||
endif ()
|
endif ()
|
||||||
if (ARROW_WITH_ZSTD)
|
if (ARROW_WITH_ZSTD)
|
||||||
target_link_libraries(${ARROW_LIBRARY} PRIVATE ${ZSTD_LIBRARY})
|
target_link_libraries(${ARROW_LIBRARY} PRIVATE ${ZSTD_LIBRARY})
|
||||||
|
target_include_directories(${ARROW_LIBRARY} SYSTEM BEFORE PRIVATE ${ZLIB_INCLUDE_DIR})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_include_directories(${ARROW_LIBRARY} PRIVATE SYSTEM ${ORC_INCLUDE_DIR})
|
target_include_directories(${ARROW_LIBRARY} PRIVATE SYSTEM ${ORC_INCLUDE_DIR})
|
||||||
|
@ -41,4 +41,5 @@ endif()
|
|||||||
if (USE_INTERNAL_AVRO_LIBRARY)
|
if (USE_INTERNAL_AVRO_LIBRARY)
|
||||||
add_boost_lib(iostreams)
|
add_boost_lib(iostreams)
|
||||||
target_link_libraries(boost_iostreams_internal PUBLIC ${ZLIB_LIBRARIES})
|
target_link_libraries(boost_iostreams_internal PUBLIC ${ZLIB_LIBRARIES})
|
||||||
|
target_include_directories(boost_iostreams_internal SYSTEM BEFORE PRIVATE ${ZLIB_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
@ -59,4 +59,4 @@ endif()
|
|||||||
|
|
||||||
target_include_directories(libxml2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/linux_x86_64/include)
|
target_include_directories(libxml2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/linux_x86_64/include)
|
||||||
target_include_directories(libxml2 PUBLIC ${LIBXML2_SOURCE_DIR}/include)
|
target_include_directories(libxml2 PUBLIC ${LIBXML2_SOURCE_DIR}/include)
|
||||||
target_include_directories(libxml2 PRIVATE ${ZLIB_INCLUDE_DIR}/include)
|
target_include_directories(libxml2 SYSTEM BEFORE PRIVATE ${ZLIB_INCLUDE_DIR})
|
||||||
|
@ -45,7 +45,10 @@ if (ENABLE_REPLXX)
|
|||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_compile_options(replxx PUBLIC -Wno-documentation)
|
if (NOT (COMPILER_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9))
|
||||||
|
target_compile_options(replxx PUBLIC -Wno-documentation)
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_compile_definitions(replxx PUBLIC USE_REPLXX=1)
|
target_compile_definitions(replxx PUBLIC USE_REPLXX=1)
|
||||||
|
|
||||||
message (STATUS "Using replxx")
|
message (STATUS "Using replxx")
|
||||||
|
@ -176,8 +176,12 @@ elseif (COMPILER_GCC)
|
|||||||
add_cxx_compile_options(-Wsizeof-array-argument)
|
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
|
# 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)
|
add_cxx_compile_options(-Wsizeof-pointer-memaccess)
|
||||||
# Warn about overriding virtual functions that are not marked with the override keyword
|
|
||||||
add_cxx_compile_options(-Wsuggest-override)
|
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 whenever a switch statement has an index of boolean type and the case values are outside the range of a boolean type
|
# 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)
|
add_cxx_compile_options(-Wswitch-bool)
|
||||||
# Warn if a self-comparison always evaluates to true or false
|
# Warn if a self-comparison always evaluates to true or false
|
||||||
|
@ -10,7 +10,11 @@
|
|||||||
#include <Common/typeid_cast.h>
|
#include <Common/typeid_cast.h>
|
||||||
#include <ext/range.h>
|
#include <ext/range.h>
|
||||||
|
|
||||||
#include <h3api.h>
|
#if __has_include(<h3/h3api.h>)
|
||||||
|
# include <h3/h3api.h>
|
||||||
|
#else
|
||||||
|
# include <h3api.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
# include <Common/typeid_cast.h>
|
# include <Common/typeid_cast.h>
|
||||||
# include <ext/range.h>
|
# include <ext/range.h>
|
||||||
|
|
||||||
# include <h3api.h>
|
# if __has_include(<h3/h3api.h>)
|
||||||
|
# include <h3/h3api.h>
|
||||||
|
# else
|
||||||
|
# include <h3api.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
|
@ -8,8 +8,13 @@
|
|||||||
# include <Common/typeid_cast.h>
|
# include <Common/typeid_cast.h>
|
||||||
# include <ext/range.h>
|
# include <ext/range.h>
|
||||||
|
|
||||||
# include <h3api.h>
|
# if __has_include(<h3/h3api.h>)
|
||||||
# include <constants.h>
|
# include <h3/h3api.h>
|
||||||
|
# include <h3/constants.h>
|
||||||
|
# else
|
||||||
|
# include <h3api.h>
|
||||||
|
# include <constants.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
# include <Common/typeid_cast.h>
|
# include <Common/typeid_cast.h>
|
||||||
# include <ext/range.h>
|
# include <ext/range.h>
|
||||||
|
|
||||||
# include <h3api.h>
|
# if __has_include(<h3/h3api.h>)
|
||||||
|
# include <h3/h3api.h>
|
||||||
|
# else
|
||||||
|
# include <h3api.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
# include <Common/typeid_cast.h>
|
# include <Common/typeid_cast.h>
|
||||||
# include <ext/range.h>
|
# include <ext/range.h>
|
||||||
|
|
||||||
# include <h3api.h>
|
# if __has_include(<h3/h3api.h>)
|
||||||
|
# include <h3/h3api.h>
|
||||||
|
# else
|
||||||
|
# include <h3api.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
|
@ -11,7 +11,11 @@
|
|||||||
# include <Common/typeid_cast.h>
|
# include <Common/typeid_cast.h>
|
||||||
# include <ext/range.h>
|
# include <ext/range.h>
|
||||||
|
|
||||||
# include <h3api.h>
|
# if __has_include(<h3/h3api.h>)
|
||||||
|
# include <h3/h3api.h>
|
||||||
|
# else
|
||||||
|
# include <h3api.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
|
7
debian/pbuilder-hooks/B90test-server
vendored
7
debian/pbuilder-hooks/B90test-server
vendored
@ -8,11 +8,6 @@ PACKAGE_INSTALL=${PACKAGE_INSTALL=1}
|
|||||||
TEST_PORT_RANDOM=${TEST_PORT_RANDOM=1}
|
TEST_PORT_RANDOM=${TEST_PORT_RANDOM=1}
|
||||||
|
|
||||||
if [ "${PACKAGE_INSTALL}" ]; then
|
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 ||:
|
dpkg --auto-deconfigure -i /tmp/buildd/*.deb ||:
|
||||||
apt install -y -f --allow-downgrades ||:
|
apt install -y -f --allow-downgrades ||:
|
||||||
dpkg -l | grep clickhouse ||:
|
dpkg -l | grep clickhouse ||:
|
||||||
@ -45,8 +40,6 @@ export CLICKHOUSE_PORT_TCP_SECURE=${CLICKHOUSE_PORT_TCP_SECURE:=9440}
|
|||||||
export CLICKHOUSE_PORT_HTTPS=${CLICKHOUSE_PORT_HTTPS:=8443}
|
export CLICKHOUSE_PORT_HTTPS=${CLICKHOUSE_PORT_HTTPS:=8443}
|
||||||
|
|
||||||
if [ "${TEST_CONNECT}" ]; then
|
if [ "${TEST_CONNECT}" ]; then
|
||||||
sed -i 's/ssl_conf = ssl_sect/#ssl_conf = ssl_sect/g' /etc/ssl/openssl.cnf ||:
|
|
||||||
|
|
||||||
[ "${TEST_PORT_RANDOM}" ] && echo "<yandex><http_port>${CLICKHOUSE_PORT_HTTP}</http_port><tcp_port>${CLICKHOUSE_PORT_TCP}</tcp_port><interserver_http_port>${CLICKHOUSE_PORT_INTERSERVER}</interserver_http_port></yandex>" > /etc/clickhouse-server/config.d/port.xml
|
[ "${TEST_PORT_RANDOM}" ] && echo "<yandex><http_port>${CLICKHOUSE_PORT_HTTP}</http_port><tcp_port>${CLICKHOUSE_PORT_TCP}</tcp_port><interserver_http_port>${CLICKHOUSE_PORT_INTERSERVER}</interserver_http_port></yandex>" > /etc/clickhouse-server/config.d/port.xml
|
||||||
|
|
||||||
if [ "${TEST_SSL}" ]; then
|
if [ "${TEST_SSL}" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user