mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Build fixes (#1718)
* Embedded compiler fixes * common lib not needed for clang and lld * Fix pthread link * Fix shared build * Arm fixes 1 * arm fix * Unused fix * Build fixes * release --pbuilder * release pbuilder fix * FORCE_PBUILDER_CREATE=1 release * release: Auto use clang with sanitizers * Fix build without poco data odbc lib. zlib arm build fix. * Fix freebsd build and build without mysql * Tests: Dont eat my cpu! * Test me
This commit is contained in:
parent
bd98072259
commit
70e35d0bcc
@ -11,6 +11,10 @@ if (NOT ZLIB_FOUND)
|
|||||||
if (CMAKE_SYSTEM MATCHES "FreeBSD" OR ARCH_I386)
|
if (CMAKE_SYSTEM MATCHES "FreeBSD" OR ARCH_I386)
|
||||||
set (WITH_OPTIM 0 CACHE INTERNAL "") # Bug in assembler
|
set (WITH_OPTIM 0 CACHE INTERNAL "") # Bug in assembler
|
||||||
endif ()
|
endif ()
|
||||||
|
if (ARCH_AARCH64)
|
||||||
|
set(WITH_NEON 1 CACHE INTERNAL "")
|
||||||
|
set(WITH_ACLE 1 CACHE INTERNAL "")
|
||||||
|
endif ()
|
||||||
set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/zlib-ng" "${ClickHouse_BINARY_DIR}/contrib/zlib-ng") # generated zconf.h
|
set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/zlib-ng" "${ClickHouse_BINARY_DIR}/contrib/zlib-ng") # generated zconf.h
|
||||||
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco
|
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco
|
||||||
set (ZLIB_FOUND 1) # for poco
|
set (ZLIB_FOUND 1) # for poco
|
||||||
|
@ -7,10 +7,10 @@ endif ()
|
|||||||
|
|
||||||
set (INTERNAL_COMPILER_EXECUTABLE "clickhouse-clang" CACHE STRING "")
|
set (INTERNAL_COMPILER_EXECUTABLE "clickhouse-clang" CACHE STRING "")
|
||||||
set (INTERNAL_LINKER_EXECUTABLE "clickhouse-lld" CACHE STRING "")
|
set (INTERNAL_LINKER_EXECUTABLE "clickhouse-lld" CACHE STRING "")
|
||||||
set (INTERNAL_COMPILER_NO_WARNING OFF CACHE BOOL "")
|
set (INTERNAL_COMPILER_NO_WARNING OFF CACHE INTERNAL "")
|
||||||
set (INTERNAL_COMPILER_HEADERS "${PATH_SHARE}/clickhouse/headers" CACHE STRING "")
|
set (INTERNAL_COMPILER_HEADERS "${PATH_SHARE}/clickhouse/headers" CACHE STRING "")
|
||||||
set (INTERNAL_COMPILER_HEADERS_ROOT "${INTERNAL_COMPILER_HEADERS}" CACHE STRING "")
|
set (INTERNAL_COMPILER_HEADERS_ROOT "${INTERNAL_COMPILER_HEADERS}" CACHE STRING "")
|
||||||
set (INTERNAL_COMPILER_CUSTOM_ROOT ON CACHE BOOL "")
|
set (INTERNAL_COMPILER_CUSTOM_ROOT ON CACHE INTERNAL "")
|
||||||
|
|
||||||
set (INTERNAL_COMPILER_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${CXX_FLAGS_INTERNAL_COMPILER} -x c++ -march=native -fPIC -fvisibility=hidden -fno-implement-inlines -nostdinc -nostdinc++ -Wno-unused-command-line-argument -Bprefix=${PATH_SHARE}/clickhouse -isysroot=${INTERNAL_COMPILER_HEADERS_ROOT}" CACHE STRING "")
|
set (INTERNAL_COMPILER_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${CXX_FLAGS_INTERNAL_COMPILER} -x c++ -march=native -fPIC -fvisibility=hidden -fno-implement-inlines -nostdinc -nostdinc++ -Wno-unused-command-line-argument -Bprefix=${PATH_SHARE}/clickhouse -isysroot=${INTERNAL_COMPILER_HEADERS_ROOT}" CACHE STRING "")
|
||||||
string(REPLACE "-no-pie" "" INTERNAL_COMPILER_FLAGS ${INTERNAL_COMPILER_FLAGS})
|
string(REPLACE "-no-pie" "" INTERNAL_COMPILER_FLAGS ${INTERNAL_COMPILER_FLAGS})
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#cmakedefine CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_LIBRARY_ARCHITECTURE@"
|
#cmakedefine CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_LIBRARY_ARCHITECTURE@"
|
||||||
|
#if !defined(CMAKE_LIBRARY_ARCHITECTURE)
|
||||||
|
#define CMAKE_LIBRARY_ARCHITECTURE ""
|
||||||
|
#endif
|
||||||
#cmakedefine PATH_SHARE "@PATH_SHARE@"
|
#cmakedefine PATH_SHARE "@PATH_SHARE@"
|
||||||
#cmakedefine INTERNAL_COMPILER_FLAGS "@INTERNAL_COMPILER_FLAGS@"
|
#cmakedefine INTERNAL_COMPILER_FLAGS "@INTERNAL_COMPILER_FLAGS@"
|
||||||
#cmakedefine INTERNAL_COMPILER_EXECUTABLE "@INTERNAL_COMPILER_EXECUTABLE@"
|
#cmakedefine INTERNAL_COMPILER_EXECUTABLE "@INTERNAL_COMPILER_EXECUTABLE@"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <Storages/StorageMySQL.h>
|
#include <Storages/StorageMySQL.h>
|
||||||
|
#if USE_MYSQL
|
||||||
#include <Storages/transformQueryForExternalDatabase.h>
|
#include <Storages/transformQueryForExternalDatabase.h>
|
||||||
#include <Dictionaries/MySQLBlockInputStream.h>
|
#include <Dictionaries/MySQLBlockInputStream.h>
|
||||||
|
|
||||||
@ -44,3 +45,5 @@ BlockInputStreams StorageMySQL::read(
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <Common/config.h>
|
||||||
|
#if USE_MYSQL
|
||||||
|
|
||||||
#include <ext/shared_ptr_helper.h>
|
#include <ext/shared_ptr_helper.h>
|
||||||
|
|
||||||
#include <Storages/IStorage.h>
|
#include <Storages/IStorage.h>
|
||||||
@ -46,3 +49,5 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -6,5 +6,9 @@ list(REMOVE_ITEM clickhouse_table_functions_headers ITableFunction.h TableFuncti
|
|||||||
|
|
||||||
add_library(clickhouse_table_functions ${clickhouse_table_functions_sources})
|
add_library(clickhouse_table_functions ${clickhouse_table_functions_sources})
|
||||||
target_link_libraries(clickhouse_table_functions dbms clickhouse_storages_system ${Poco_Foundation_LIBRARY})
|
target_link_libraries(clickhouse_table_functions dbms clickhouse_storages_system ${Poco_Foundation_LIBRARY})
|
||||||
|
if (Poco_DataODBC_FOUND)
|
||||||
|
target_link_libraries (clickhouse_table_functions ${Poco_DataODBC_LIBRARY})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
target_include_directories (clickhouse_table_functions BEFORE PRIVATE ${SPARCEHASH_INCLUDE_DIR})
|
target_include_directories (clickhouse_table_functions BEFORE PRIVATE ${SPARCEHASH_INCLUDE_DIR})
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#include <TableFunctions/TableFunctionODBC.h>
|
||||||
|
|
||||||
|
#if Poco_DataODBC_FOUND
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <ext/scope_guard.h>
|
#include <ext/scope_guard.h>
|
||||||
|
|
||||||
@ -8,7 +11,6 @@
|
|||||||
#include <Storages/StorageODBC.h>
|
#include <Storages/StorageODBC.h>
|
||||||
#include <TableFunctions/ITableFunction.h>
|
#include <TableFunctions/ITableFunction.h>
|
||||||
#include <TableFunctions/TableFunctionFactory.h>
|
#include <TableFunctions/TableFunctionFactory.h>
|
||||||
#include <TableFunctions/TableFunctionODBC.h>
|
|
||||||
#include <Common/Exception.h>
|
#include <Common/Exception.h>
|
||||||
#include <Common/typeid_cast.h>
|
#include <Common/typeid_cast.h>
|
||||||
#include <Core/Defines.h>
|
#include <Core/Defines.h>
|
||||||
@ -122,3 +124,5 @@ void registerTableFunctionODBC(TableFunctionFactory & factory)
|
|||||||
factory.registerFunction<TableFunctionODBC>();
|
factory.registerFunction<TableFunctionODBC>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <Common/config.h>
|
||||||
|
#if Poco_DataODBC_FOUND
|
||||||
|
|
||||||
#include <TableFunctions/ITableFunction.h>
|
#include <TableFunctions/ITableFunction.h>
|
||||||
|
|
||||||
|
|
||||||
@ -20,3 +23,5 @@ public:
|
|||||||
StoragePtr execute(const ASTPtr & ast_function, const Context & context) const override;
|
StoragePtr execute(const ASTPtr & ast_function, const Context & context) const override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -11,7 +11,9 @@ void registerTableFunctionRemote(TableFunctionFactory & factory);
|
|||||||
void registerTableFunctionShardByHash(TableFunctionFactory & factory);
|
void registerTableFunctionShardByHash(TableFunctionFactory & factory);
|
||||||
void registerTableFunctionNumbers(TableFunctionFactory & factory);
|
void registerTableFunctionNumbers(TableFunctionFactory & factory);
|
||||||
void registerTableFunctionCatBoostPool(TableFunctionFactory & factory);
|
void registerTableFunctionCatBoostPool(TableFunctionFactory & factory);
|
||||||
|
#if Poco_DataODBC_FOUND
|
||||||
void registerTableFunctionODBC(TableFunctionFactory & factory);
|
void registerTableFunctionODBC(TableFunctionFactory & factory);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if USE_MYSQL
|
#if USE_MYSQL
|
||||||
void registerTableFunctionMySQL(TableFunctionFactory & factory);
|
void registerTableFunctionMySQL(TableFunctionFactory & factory);
|
||||||
@ -27,7 +29,10 @@ void registerTableFunctions()
|
|||||||
registerTableFunctionShardByHash(factory);
|
registerTableFunctionShardByHash(factory);
|
||||||
registerTableFunctionNumbers(factory);
|
registerTableFunctionNumbers(factory);
|
||||||
registerTableFunctionCatBoostPool(factory);
|
registerTableFunctionCatBoostPool(factory);
|
||||||
|
|
||||||
|
#if Poco_DataODBC_FOUND
|
||||||
registerTableFunctionODBC(factory);
|
registerTableFunctionODBC(factory);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if USE_MYSQL
|
#if USE_MYSQL
|
||||||
registerTableFunctionMySQL(factory);
|
registerTableFunctionMySQL(factory);
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
|
|
||||||
#include <stdlib.h> /// for __THROW
|
#include <stdlib.h> /// for __THROW
|
||||||
|
|
||||||
|
// freebsd have no __THROW
|
||||||
|
#if !defined(__THROW)
|
||||||
|
#define __THROW
|
||||||
|
#endif
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user