mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Build fixes (#7063)
* Build fixes * fix * Fix * fix * Fix install(export.. * Freebsd fixes * Freebsd fixes * Fix warning * fix * More PRIVATE linking * Fix review * Timmy * fix * fix
This commit is contained in:
parent
c743a9f9ff
commit
594c535bd4
@ -205,6 +205,7 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_FLAGS} -fn
|
||||
set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 ${CMAKE_C_FLAGS_ADD}")
|
||||
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g3 -ggdb3 -fno-inline ${CMAKE_C_FLAGS_ADD}")
|
||||
|
||||
option (ENABLE_LIBRARIES "Enable all libraries (Global default switch)" ON)
|
||||
|
||||
option (UNBUNDLED "Try find all libraries in system. We recommend to avoid this mode for production builds, because we cannot guarantee exact versions and variants of libraries your system has installed. This mode exists for enthusiastic developers who search for trouble. Also it is useful for maintainers of OS packages." OFF)
|
||||
if (UNBUNDLED)
|
||||
@ -373,7 +374,9 @@ endif ()
|
||||
|
||||
include (cmake/print_flags.cmake)
|
||||
|
||||
install (EXPORT global DESTINATION cmake)
|
||||
if (TARGET global-group)
|
||||
install (EXPORT global DESTINATION cmake)
|
||||
endif ()
|
||||
|
||||
add_subdirectory (contrib EXCLUDE_FROM_ALL)
|
||||
|
||||
|
@ -4,7 +4,7 @@ if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/base64/lib/lib.c")
|
||||
endif ()
|
||||
|
||||
if (NOT MISSING_INTERNAL_BASE64_LIBRARY)
|
||||
option (ENABLE_BASE64 "Enable base64" ON)
|
||||
option (ENABLE_BASE64 "Enable base64" ${ENABLE_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
if (ENABLE_BASE64)
|
||||
|
@ -1,4 +1,4 @@
|
||||
option (ENABLE_BROTLI "Enable brotli" ON)
|
||||
option (ENABLE_BROTLI "Enable brotli" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_BROTLI)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
option (ENABLE_CAPNP "Enable Cap'n Proto" ON)
|
||||
option (ENABLE_CAPNP "Enable Cap'n Proto" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_CAPNP)
|
||||
|
||||
|
@ -1,17 +1,19 @@
|
||||
if (NOT ARCH_ARM AND NOT OS_FREEBSD)
|
||||
option (ENABLE_FASTOPS "Enable fast vectorized mathematical functions library by Mikhail Parakhin" ${NOT_UNBUNDLED})
|
||||
endif ()
|
||||
if(NOT ARCH_ARM AND NOT OS_FREEBSD AND NOT OS_DARWIN)
|
||||
option(ENABLE_FASTOPS "Enable fast vectorized mathematical functions library by Mikhail Parakhin" ${ENABLE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (ENABLE_FASTOPS AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if(ENABLE_FASTOPS)
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/fastops/fastops/fastops.h")
|
||||
message(FATAL_ERROR "submodule contrib/fastops is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set(USE_FASTOPS 0)
|
||||
message(WARNING "submodule contrib/fastops is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set(MISSING_INTERNAL_FASTOPS_LIBRARY 1)
|
||||
endif()
|
||||
set (USE_FASTOPS 1)
|
||||
set (FASTOPS_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/fastops/)
|
||||
set (FASTOPS_LIBRARY fastops)
|
||||
else ()
|
||||
if(NOT MISSING_INTERNAL_FASTOPS_LIBRARY)
|
||||
set(USE_FASTOPS 1)
|
||||
set(FASTOPS_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/fastops/)
|
||||
set(FASTOPS_LIBRARY fastops)
|
||||
endif()
|
||||
else()
|
||||
set(USE_FASTOPS 0)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
message (STATUS "Using fastops=${USE_FASTOPS}: ${FASTOPS_INCLUDE_DIR} : ${FASTOPS_LIBRARY}")
|
||||
message(STATUS "Using fastops=${USE_FASTOPS}: ${FASTOPS_INCLUDE_DIR} : ${FASTOPS_LIBRARY}")
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Check if gperf was installed
|
||||
find_program(GPERF gperf)
|
||||
if(GPERF)
|
||||
option(ENABLE_GPERF "Use gperf function hash generator tool" ON)
|
||||
option(ENABLE_GPERF "Use gperf function hash generator tool" ${ENABLE_LIBRARIES})
|
||||
endif()
|
||||
if (ENABLE_GPERF)
|
||||
if(NOT GPERF)
|
||||
|
@ -1,19 +1,29 @@
|
||||
option (ENABLE_H3 "Enable H3" ${ENABLE_LIBRARIES})
|
||||
if (ENABLE_H3)
|
||||
|
||||
option (USE_INTERNAL_H3_LIBRARY "Set to FALSE to use system h3 library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
set (H3_INCLUDE_PATHS /usr/local/include/h3)
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib/include/h3Index.h")
|
||||
if(USE_INTERNAL_H3_LIBRARY)
|
||||
message(WARNING "submodule contrib/h3 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
endif()
|
||||
set(MISSING_INTERNAL_H3_LIBRARY 1)
|
||||
set(USE_INTERNAL_H3_LIBRARY 0)
|
||||
endif()
|
||||
|
||||
if (USE_INTERNAL_H3_LIBRARY)
|
||||
set (H3_LIBRARY h3)
|
||||
set (H3_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib/include)
|
||||
else ()
|
||||
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 h3api.h PATHS ${H3_INCLUDE_PATHS})
|
||||
endif ()
|
||||
|
||||
if (H3_LIBRARY AND H3_INCLUDE_DIR)
|
||||
set (USE_H3 1)
|
||||
else ()
|
||||
set (USE_H3 0)
|
||||
endif ()
|
||||
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using h3=${USE_H3}: ${H3_INCLUDE_DIR} : ${H3_LIBRARY}")
|
||||
|
@ -1,5 +1,5 @@
|
||||
if(NOT ARCH_ARM AND NOT OS_FREEBSD AND NOT APPLE AND USE_PROTOBUF)
|
||||
option(ENABLE_HDFS "Enable HDFS" 1)
|
||||
option(ENABLE_HDFS "Enable HDFS" ${ENABLE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_HDFS)
|
||||
|
@ -1,5 +1,5 @@
|
||||
if (HAVE_SSSE3)
|
||||
option (ENABLE_HYPERSCAN "Enable hyperscan" ON)
|
||||
option (ENABLE_HYPERSCAN "Enable hyperscan" ${ENABLE_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
if (ENABLE_HYPERSCAN)
|
||||
|
@ -1,6 +1,6 @@
|
||||
option(ENABLE_ICU "Enable ICU" ON)
|
||||
option(ENABLE_ICU "Enable ICU" ${ENABLE_LIBRARIES})
|
||||
|
||||
if(ENABLE_ICU AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if(ENABLE_ICU)
|
||||
if (APPLE)
|
||||
set(ICU_ROOT "/usr/local/opt/icu4c" CACHE STRING "")
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Broken in macos. TODO: update clang, re-test, enable
|
||||
if (NOT APPLE)
|
||||
option (ENABLE_EMBEDDED_COMPILER "Set to TRUE to enable support for 'compile' option for query execution" 1)
|
||||
option (USE_INTERNAL_LLVM_LIBRARY "Use bundled or system LLVM library. Default: system library for quicker developer builds." ${APPLE})
|
||||
option (ENABLE_EMBEDDED_COMPILER "Set to TRUE to enable support for 'compile' option for query execution" ${ENABLE_LIBRARIES})
|
||||
option (USE_INTERNAL_LLVM_LIBRARY "Use bundled or system LLVM library. Default: system library for quicker developer builds." 0)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_EMBEDDED_COMPILER)
|
||||
|
@ -1,6 +1,9 @@
|
||||
# This file copied from contrib/poco/cmake/FindODBC.cmake to allow build without submodules
|
||||
|
||||
option (ENABLE_ODBC "Enable ODBC" ${OS_LINUX})
|
||||
if(OS_LINUX)
|
||||
option (ENABLE_ODBC "Enable ODBC" ${ENABLE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_ODBC)
|
||||
if (OS_LINUX)
|
||||
option(USE_INTERNAL_ODBC_LIBRARY "Set to FALSE to use system odbc library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
@ -1,4 +1,4 @@
|
||||
option (ENABLE_ORC "Enable ORC" 1)
|
||||
option (ENABLE_ORC "Enable ORC" ${ENABLE_LIBRARIES})
|
||||
|
||||
if(ENABLE_ORC)
|
||||
option (USE_INTERNAL_ORC_LIBRARY "Set to FALSE to use system ORC instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
@ -1,8 +1,10 @@
|
||||
option (ENABLE_PARQUET "Enable parquet" ON)
|
||||
if (Protobuf_PROTOC_EXECUTABLE)
|
||||
option (ENABLE_PARQUET "Enable parquet" ${ENABLE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (ENABLE_PARQUET AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if (ENABLE_PARQUET)
|
||||
|
||||
if (NOT OS_FREEBSD AND NOT APPLE) # Freebsd: ../contrib/arrow/cpp/src/arrow/util/bit-util.h:27:10: fatal error: endian.h: No such file or directory
|
||||
if (NOT OS_FREEBSD AND NOT OS_DARWIN) # Freebsd: ../contrib/arrow/cpp/src/arrow/util/bit-util.h:27:10: fatal error: endian.h: No such file or directory
|
||||
option(USE_INTERNAL_PARQUET_LIBRARY "Set to FALSE to use system parquet library instead of bundled" ${NOT_UNBUNDLED})
|
||||
endif()
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
option (ENABLE_PROTOBUF "Enable protobuf" ON)
|
||||
option(ENABLE_PROTOBUF "Enable protobuf" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_PROTOBUF AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if(ENABLE_PROTOBUF)
|
||||
|
||||
option(USE_INTERNAL_PROTOBUF_LIBRARY "Set to FALSE to use system protobuf instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
@ -104,4 +104,4 @@ endif()
|
||||
|
||||
endif()
|
||||
|
||||
message(STATUS "Using protobuf=${USE_PROTOBUF}: ${Protobuf_INCLUDE_DIR} : ${Protobuf_LIBRARY}")
|
||||
message(STATUS "Using protobuf=${USE_PROTOBUF}: ${Protobuf_INCLUDE_DIR} : ${Protobuf_LIBRARY} : ${Protobuf_PROTOC_EXECUTABLE}")
|
||||
|
@ -1,4 +1,4 @@
|
||||
option(ENABLE_RAPIDJSON "Use rapidjson" ON)
|
||||
option(ENABLE_RAPIDJSON "Use rapidjson" ${ENABLE_LIBRARIES})
|
||||
if(NOT ENABLE_RAPIDJSON)
|
||||
return()
|
||||
endif()
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Freebsd: contrib/cppkafka/include/cppkafka/detail/endianness.h:53:23: error: 'betoh16' was not declared in this scope
|
||||
if (NOT ARCH_ARM AND NOT ARCH_32 AND NOT APPLE AND NOT OS_FREEBSD AND OPENSSL_FOUND)
|
||||
option (ENABLE_RDKAFKA "Enable kafka" ON)
|
||||
option (ENABLE_RDKAFKA "Enable kafka" ${ENABLE_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cppkafka/CMakeLists.txt")
|
||||
|
@ -1,8 +1,8 @@
|
||||
include (CMakePushCheckState)
|
||||
cmake_push_check_state ()
|
||||
|
||||
option (ENABLE_READLINE "Enable readline" 1)
|
||||
if (ENABLE_READLINE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
option (ENABLE_READLINE "Enable readline" ${ENABLE_LIBRARIES})
|
||||
if (ENABLE_READLINE)
|
||||
|
||||
set (READLINE_PATHS "/usr/local/opt/readline/lib")
|
||||
# First try find custom lib for macos users (default lib without history support)
|
||||
|
@ -1,6 +1,6 @@
|
||||
option(USE_SNAPPY "Enable support of snappy library" ON)
|
||||
option(USE_SNAPPY "Enable support of snappy library" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (USE_SNAPPY AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if(USE_SNAPPY)
|
||||
option (USE_INTERNAL_SNAPPY_LIBRARY "Set to FALSE to use system snappy library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if(NOT USE_INTERNAL_SNAPPY_LIBRARY)
|
||||
|
@ -1,6 +1,6 @@
|
||||
option (ENABLE_SSL "Enable ssl" ON)
|
||||
option(ENABLE_SSL "Enable ssl" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_SSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if(ENABLE_SSL)
|
||||
|
||||
if(NOT ARCH_32)
|
||||
option(USE_INTERNAL_SSL_LIBRARY "Set to FALSE to use system *ssl library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
@ -1,4 +1,4 @@
|
||||
option (USE_UNWIND "Enable libunwind (better stacktraces)" ON)
|
||||
option (USE_UNWIND "Enable libunwind (better stacktraces)" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT CMAKE_SYSTEM MATCHES "Linux" OR ARCH_ARM OR ARCH_32)
|
||||
set (USE_UNWIND OFF)
|
||||
|
@ -54,7 +54,7 @@ if (LINKER_NAME)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CROSSCOMPILING)
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if (OS_DARWIN)
|
||||
set (CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
set (CMAKE_C_COMPILER_TARGET x86_64-apple-darwin)
|
||||
set (CMAKE_CXX_COMPILER_TARGET x86_64-apple-darwin)
|
||||
@ -65,15 +65,14 @@ if (CMAKE_CROSSCOMPILING)
|
||||
set (HAS_POST_2038_EXITCODE "0" CACHE STRING "Result from TRY_RUN" FORCE)
|
||||
set (HAS_POST_2038_EXITCODE__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
|
||||
|
||||
# CMake < 3.13 doesn't respect same-name variables as values for options.
|
||||
# FIXME: broken dependencies
|
||||
# set (USE_SNAPPY OFF)
|
||||
# set (ENABLE_SSL OFF)
|
||||
# set (ENABLE_PROTOBUF OFF)
|
||||
# set (ENABLE_PARQUET OFF)
|
||||
# set (ENABLE_READLINE OFF)
|
||||
# set (ENABLE_ICU OFF)
|
||||
# set (ENABLE_FASTOPS OFF)
|
||||
set (USE_SNAPPY OFF CACHE INTERNAL "")
|
||||
set (ENABLE_SSL OFF CACHE INTERNAL "")
|
||||
set (ENABLE_PROTOBUF OFF CACHE INTERNAL "")
|
||||
set (ENABLE_PARQUET OFF CACHE INTERNAL "")
|
||||
set (ENABLE_READLINE OFF CACHE INTERNAL "")
|
||||
set (ENABLE_ICU OFF CACHE INTERNAL "")
|
||||
set (ENABLE_FASTOPS OFF CACHE INTERNAL "")
|
||||
|
||||
message (STATUS "Cross-compiling for Darwin")
|
||||
else ()
|
||||
|
@ -212,7 +212,11 @@ endif()
|
||||
|
||||
|
||||
add_library(${ARROW_LIBRARY} ${ARROW_SRCS})
|
||||
add_dependencies(${ARROW_LIBRARY} protoc)
|
||||
|
||||
if (USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
add_dependencies(${ARROW_LIBRARY} protoc)
|
||||
endif()
|
||||
|
||||
target_include_directories(${ARROW_LIBRARY} SYSTEM PUBLIC ${ClickHouse_SOURCE_DIR}/contrib/arrow/cpp/src PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cpp/src ${Boost_INCLUDE_DIRS})
|
||||
target_link_libraries(${ARROW_LIBRARY} PRIVATE ${DOUBLE_CONVERSION_LIBRARIES} ${Protobuf_LIBRARY})
|
||||
if (ARROW_WITH_LZ4)
|
||||
|
@ -35,7 +35,7 @@ ${JEMALLOC_SOURCE_DIR}/src/tsd.c
|
||||
${JEMALLOC_SOURCE_DIR}/src/witness.c
|
||||
)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if(OS_DARWIN)
|
||||
list(APPEND SRCS ${JEMALLOC_SOURCE_DIR}/src/zone.c)
|
||||
endif()
|
||||
|
||||
|
@ -185,7 +185,7 @@ set(SRCS
|
||||
# target
|
||||
add_library(hdfs3 ${SRCS} ${PROTO_SOURCES} ${PROTO_HEADERS})
|
||||
|
||||
if (USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
if(USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
add_dependencies(hdfs3 protoc)
|
||||
endif()
|
||||
|
||||
|
@ -270,6 +270,7 @@ target_link_libraries(clickhouse_common_io
|
||||
PUBLIC
|
||||
${CITYHASH_LIBRARIES}
|
||||
PRIVATE
|
||||
${Poco_XML_LIBRARY}
|
||||
${ZLIB_LIBRARIES}
|
||||
${EXECINFO_LIBRARIES}
|
||||
PUBLIC
|
||||
@ -330,7 +331,7 @@ dbms_target_include_directories(SYSTEM PUBLIC ${PCG_RANDOM_INCLUDE_DIR})
|
||||
|
||||
dbms_target_include_directories(SYSTEM BEFORE PUBLIC ${PDQSORT_INCLUDE_DIR})
|
||||
|
||||
if (NOT USE_INTERNAL_LZ4_LIBRARY)
|
||||
if (NOT USE_INTERNAL_LZ4_LIBRARY AND LZ4_INCLUDE_DIR)
|
||||
dbms_target_include_directories(SYSTEM BEFORE PRIVATE ${LZ4_INCLUDE_DIR})
|
||||
endif ()
|
||||
|
||||
|
@ -10,7 +10,7 @@ set(CLICKHOUSE_SERVER_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/TCPHandler.cpp
|
||||
)
|
||||
|
||||
if (USE_POCO_NETSSL)
|
||||
if (USE_SSL)
|
||||
set(CLICKHOUSE_SERVER_SOURCES
|
||||
${CLICKHOUSE_SERVER_SOURCES}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/MySQLHandler.cpp
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <Common/config.h>
|
||||
#if USE_POCO_NETSSL
|
||||
#if USE_SSL
|
||||
#include "MySQLHandler.h"
|
||||
|
||||
#include <limits>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <Common/config.h>
|
||||
#if USE_POCO_NETSSL
|
||||
#if USE_SSL
|
||||
|
||||
#include <Poco/Net/TCPServerConnection.h>
|
||||
#include <Poco/Net/SecureStreamSocket.h>
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <Common/config.h>
|
||||
#if USE_POCO_NETSSL
|
||||
#include "MySQLHandlerFactory.h"
|
||||
#if USE_POCO_NETSSL && USE_SSL
|
||||
#include <Common/OpenSSLHelpers.h>
|
||||
#include <Poco/Crypto/X509Certificate.h>
|
||||
#include <Poco/Net/SSLManager.h>
|
||||
#include <Poco/Net/TCPServerConnectionFactory.h>
|
||||
#include <Poco/Util/Application.h>
|
||||
@ -9,7 +8,6 @@
|
||||
#include <ext/scope_guard.h>
|
||||
#include "IServer.h"
|
||||
#include "MySQLHandler.h"
|
||||
#include "MySQLHandlerFactory.h"
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Common/config.h>
|
||||
#if USE_POCO_NETSSL
|
||||
#if USE_POCO_NETSSL && USE_SSL
|
||||
|
||||
#include <Poco/Net/TCPServerConnectionFactory.h>
|
||||
#include <atomic>
|
||||
|
@ -813,7 +813,7 @@ int Server::main(const std::vector<std::string> & /*args*/)
|
||||
|
||||
create_server("mysql_port", [&](UInt16 port)
|
||||
{
|
||||
#if USE_POCO_NETSSL
|
||||
#if USE_SSL
|
||||
Poco::Net::ServerSocket socket;
|
||||
auto address = socket_bind_listen(socket, listen_host, port, /* secure = */ true);
|
||||
socket.setReceiveTimeout(Poco::Timespan());
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
|
||||
/*
|
||||
* Copyright 2012-present Facebook, Inc.
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
|
||||
/*
|
||||
* Copyright 2012-present Facebook, Inc.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
|
||||
#include <Common/Elf.h>
|
||||
#include <Common/Exception.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
|
||||
#include <IO/MMapReadBufferFromFile.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <Common/config.h>
|
||||
#if USE_POCO_NETSSL
|
||||
#if USE_SSL
|
||||
#include "OpenSSLHelpers.h"
|
||||
#include <ext/scope_guard.h>
|
||||
#include <openssl/err.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <Common/config.h>
|
||||
#if USE_POCO_NETSSL
|
||||
#if USE_SSL
|
||||
|
||||
#include <Core/Types.h>
|
||||
|
||||
|
@ -250,7 +250,7 @@ static void toStringEveryLineImpl(const StackTrace::Frames & frames, size_t offs
|
||||
if (size == 0)
|
||||
return callback("<Empty trace>");
|
||||
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
const DB::SymbolIndex & symbol_index = DB::SymbolIndex::instance();
|
||||
std::unordered_map<std::string, DB::Dwarf> dwarfs;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
|
||||
#include <Common/SymbolIndex.h>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
@ -1,11 +1,14 @@
|
||||
#include <Common/checkStackSize.h>
|
||||
#include <Common/Exception.h>
|
||||
#include <ext/scope_guard.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <cstdint>
|
||||
#include <sstream>
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
# include <pthread_np.h>
|
||||
#endif
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
// .h autogenerated by cmake!
|
||||
|
||||
#cmakedefine01 USE_RE2_ST
|
||||
#cmakedefine01 USE_SSL
|
||||
#cmakedefine01 USE_POCO_NETSSL
|
||||
#cmakedefine01 USE_HDFS
|
||||
#cmakedefine01 USE_CPUID
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <Common/filesystemHelpers.h>
|
||||
#include <common/config_common.h>
|
||||
#include <Poco/File.h>
|
||||
#include <Poco/Path.h>
|
||||
#include <Poco/Version.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
bool enoughSpaceInDirectory(const std::string & path, size_t data_size)
|
||||
bool enoughSpaceInDirectory(const std::string & path [[maybe_unused]], size_t data_size [[maybe_unused]])
|
||||
{
|
||||
#if !UNBUNDLED
|
||||
#if POCO_VERSION >= 0x01090000
|
||||
auto free_space = Poco::File(path).freeSpace();
|
||||
if (data_size > free_space)
|
||||
return false;
|
||||
|
@ -14,7 +14,7 @@ NO_INLINE const void * getAddress()
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
using namespace DB;
|
||||
|
||||
if (argc < 2)
|
||||
|
@ -12,4 +12,3 @@
|
||||
#cmakedefine01 USE_POCO_REDIS
|
||||
#cmakedefine01 USE_INTERNAL_LLVM_LIBRARY
|
||||
#cmakedefine01 USE_SSL
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <Poco/Version.h>
|
||||
#include <DataStreams/MergeSortingBlockInputStream.h>
|
||||
#include <DataStreams/MergingSortedBlockInputStream.h>
|
||||
#include <DataStreams/NativeBlockOutputStream.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
|
||||
#include <Common/Elf.h>
|
||||
#include <Common/Dwarf.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && !defined(__FreeBSD__)
|
||||
|
||||
#include <Common/SymbolIndex.h>
|
||||
#include <Columns/ColumnString.h>
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <iomanip>
|
||||
#include <thread>
|
||||
#include <future>
|
||||
#include <Poco/Version.h>
|
||||
#include <Poco/Util/Application.h>
|
||||
#include <Common/Stopwatch.h>
|
||||
#include <Common/setThreadName.h>
|
||||
|
@ -136,14 +136,14 @@ auto wrapJITSymbolResolver(llvm::JITSymbolResolver & jsr)
|
||||
{
|
||||
#if USE_INTERNAL_LLVM_LIBRARY && LLVM_VERSION_PATCH == 0
|
||||
// REMOVE AFTER contrib/llvm upgrade
|
||||
auto flags = [&](llvm::orc::SymbolFlagsMap & flags, const llvm::orc::SymbolNameSet & symbols)
|
||||
auto flags = [&](llvm::orc::SymbolFlagsMap & flags_internal, const llvm::orc::SymbolNameSet & symbols)
|
||||
{
|
||||
llvm::orc::SymbolNameSet missing;
|
||||
for (const auto & symbol : symbols)
|
||||
{
|
||||
auto resolved = jsr.lookupFlags({*symbol});
|
||||
if (resolved && resolved->size())
|
||||
flags.emplace(symbol, resolved->begin()->second);
|
||||
flags_internal.emplace(symbol, resolved->begin()->second);
|
||||
else
|
||||
missing.emplace(symbol);
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
#include <Poco/Version.h>
|
||||
#include <Processors/Transforms/MergeSortingTransform.h>
|
||||
#include <Processors/IAccumulatingTransform.h>
|
||||
#include <Processors/Transforms/MergingSortedTransform.h>
|
||||
|
||||
#include <Common/formatReadable.h>
|
||||
#include <Common/ProfileEvents.h>
|
||||
#include <common/config_common.h>
|
||||
|
||||
#include <IO/WriteBufferFromFile.h>
|
||||
#include <Compression/CompressedWriteBuffer.h>
|
||||
|
||||
#include <DataStreams/NativeBlockInputStream.h>
|
||||
#include <DataStreams/NativeBlockOutputStream.h>
|
||||
|
||||
|
1
debian/clickhouse-client.install
vendored
1
debian/clickhouse-client.install
vendored
@ -5,4 +5,3 @@ usr/bin/clickhouse-benchmark
|
||||
usr/bin/clickhouse-format
|
||||
usr/bin/clickhouse-obfuscator
|
||||
etc/clickhouse-client/config.xml
|
||||
usr/bin/clickhouse-extract-from-config
|
||||
|
1
debian/clickhouse-common-static.install
vendored
1
debian/clickhouse-common-static.install
vendored
@ -1,3 +1,4 @@
|
||||
usr/bin/clickhouse
|
||||
usr/bin/clickhouse-odbc-bridge
|
||||
usr/bin/clickhouse-extract-from-config
|
||||
etc/security/limits.d/clickhouse.conf
|
||||
|
2
debian/clickhouse-server-common.install
vendored
2
debian/clickhouse-server-common.install
vendored
@ -1,2 +0,0 @@
|
||||
etc/clickhouse-server/config.xml etc/clickhouse-server
|
||||
etc/clickhouse-server/users.xml etc/clickhouse-server
|
@ -1,5 +1,5 @@
|
||||
if (OS_LINUX AND NOT SANITIZE AND NOT ARCH_ARM AND NOT ARCH_32 AND NOT ARCH_PPC64LE)
|
||||
set(ENABLE_JEMALLOC_DEFAULT 1)
|
||||
set(ENABLE_JEMALLOC_DEFAULT ${ENABLE_LIBRARIES})
|
||||
else ()
|
||||
set(ENABLE_JEMALLOC_DEFAULT 0)
|
||||
endif ()
|
||||
|
@ -1,4 +1,4 @@
|
||||
option(ENABLE_MYSQL "Enable MySQL" 1)
|
||||
option(ENABLE_MYSQL "Enable MySQL" ${ENABLE_LIBRARIES})
|
||||
if(ENABLE_MYSQL)
|
||||
if(OS_LINUX)
|
||||
option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
6
utils/build/build_debian_shared.sh
Executable file
6
utils/build/build_debian_shared.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd ../.. && pwd)
|
||||
|
||||
CMAKE_FLAGS="-DUSE_STATIC_LIBRARIES=0 -DCLICKHOUSE_SPLIT_BINARY=1 $CMAKE_FLAGS"
|
||||
. $ROOT_DIR/release
|
6
utils/build/build_minimal.sh
Executable file
6
utils/build/build_minimal.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
CMAKE_FLAGS+=" -DENABLE_LIBRARIES=0 "
|
||||
. $CUR_DIR/build_no_submodules.sh
|
22
utils/build/build_no_submodules.sh
Executable file
22
utils/build/build_no_submodules.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
cd ${CUR_DIR}/../..
|
||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
BRANCH=${BRANCH:=master}
|
||||
ROOT_DIR=${CUR_DIR}/../build_no_submodules
|
||||
mkdir -p $ROOT_DIR
|
||||
cd $ROOT_DIR
|
||||
URL=`git remote get-url origin | sed 's/.git$//'`
|
||||
wget -O ch.zip $URL/archive/${BRANCH}.zip
|
||||
unzip -ou ch.zip
|
||||
|
||||
# TODO: make disableable lz4 zstd
|
||||
# TODO: USE_INTERNAL_DOUBLE_CONVERSION_LIBRARY : cmake test
|
||||
# Shared because /usr/bin/ld.gold: error: /usr/lib/x86_64-linux-gnu/libcrypto.a(err.o): multiple definition of 'ERR_remove_thread_state'
|
||||
CMAKE_FLAGS+="-DUSE_STATIC_LIBRARIES=0 -DUSE_INTERNAL_DOUBLE_CONVERSION_LIBRARY=0 $CMAKE_FLAGS"
|
||||
EXTRAPACKAGES+="libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-regex-dev liblz4-dev libzstd-dev libpoco-dev libdouble-conversion-dev libcctz-dev libre2-dev libsparsehash-dev $EXTRAPACKAGES"
|
||||
. $ROOT_DIR/ClickHouse-${BRANCH}/release
|
Loading…
Reference in New Issue
Block a user