diff --git a/CMakeLists.txt b/CMakeLists.txt index b0aed779dcf..93a5f693036 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,7 +221,7 @@ if (UNBUNDLED OR NOT (OS_LINUX OR APPLE) OR ARCH_32) option (NO_WERROR "Disable -Werror compiler option" ON) endif () -message (STATUS "Building for: ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_PROCESSOR} ${CMAKE_LIBRARY_ARCHITECTURE} ; USE_STATIC_LIBRARIES=${USE_STATIC_LIBRARIES} MAKE_STATIC_LIBRARIES=${MAKE_STATIC_LIBRARIES} UNBUNDLED=${UNBUNDLED} CCACHE=${CCACHE_FOUND} ${CCACHE_VERSION}") +message (STATUS "Building for: ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_PROCESSOR} ${CMAKE_LIBRARY_ARCHITECTURE} ; USE_STATIC_LIBRARIES=${USE_STATIC_LIBRARIES} MAKE_STATIC_LIBRARIES=${MAKE_STATIC_LIBRARIES} SPLIT_SHARED=${SPLIT_SHARED_LIBRARIES} UNBUNDLED=${UNBUNDLED} CCACHE=${CCACHE_FOUND} ${CCACHE_VERSION}") include(GNUInstallDirs) diff --git a/cmake/find_cpuid.cmake b/cmake/find_cpuid.cmake index bc88626405d..552cf3fb3d9 100644 --- a/cmake/find_cpuid.cmake +++ b/cmake/find_cpuid.cmake @@ -1,3 +1,4 @@ +# ARM: Cannot cpuid_get_raw_data: CPUID instruction is not supported if (NOT ARCH_ARM) option (USE_INTERNAL_CPUID_LIBRARY "Set to FALSE to use system cpuid library instead of bundled" ${NOT_UNBUNDLED}) endif () @@ -21,7 +22,7 @@ if (CPUID_LIBRARY AND CPUID_INCLUDE_DIR) # TODO: make virtual target cpuid:cpuid with COMPILE_DEFINITIONS property endif () set (USE_CPUID 1) -elseif (NOT MISSING_INTERNAL_CPUID_LIBRARY) +elseif (NOT ARCH_ARM AND NOT MISSING_INTERNAL_CPUID_LIBRARY) set (CPUID_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libcpuid/include) set (USE_INTERNAL_CPUID_LIBRARY 1) set (CPUID_LIBRARY cpuid) diff --git a/cmake/find_cpuinfo.cmake b/cmake/find_cpuinfo.cmake index c12050c4396..f122026d2bb 100644 --- a/cmake/find_cpuinfo.cmake +++ b/cmake/find_cpuinfo.cmake @@ -1,5 +1,12 @@ option(USE_INTERNAL_CPUINFO_LIBRARY "Set to FALSE to use system cpuinfo library instead of bundled" ${NOT_UNBUNDLED}) +# Now we have no contrib/libcpuinfo, use from system. +if (USE_INTERNAL_CPUINFO_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libcpuinfo/include") + #message (WARNING "submodule contrib/libcpuid is missing. to fix try run: \n git submodule update --init --recursive") + set (USE_INTERNAL_CPUINFO_LIBRARY 0) + set (MISSING_INTERNAL_CPUINFO_LIBRARY 1) +endif () + if(NOT USE_INTERNAL_CPUINFO_LIBRARY) find_library(CPUINFO_LIBRARY cpuinfo) find_path(CPUINFO_INCLUDE_DIR NAMES cpuinfo.h PATHS ${CPUINFO_INCLUDE_PATHS}) diff --git a/dbms/src/Common/Exception.cpp b/dbms/src/Common/Exception.cpp index f62309aff49..b7bbc1bf59e 100644 --- a/dbms/src/Common/Exception.cpp +++ b/dbms/src/Common/Exception.cpp @@ -38,10 +38,10 @@ std::string errnoToString(int code, int e) #endif { std::string tmp = std::to_string(code); - const char * code = tmp.c_str(); + const char * code_str = tmp.c_str(); const char * unknown_message = "Unknown error "; strcpy(buf, unknown_message); - strcpy(buf + strlen(unknown_message), code); + strcpy(buf + strlen(unknown_message), code_str); } return "errno: " + toString(e) + ", strerror: " + std::string(buf); #else diff --git a/dbms/src/Functions/FunctionsRound.h b/dbms/src/Functions/FunctionsRound.h index 23d6fc40523..9e93e16e7bb 100644 --- a/dbms/src/Functions/FunctionsRound.h +++ b/dbms/src/Functions/FunctionsRound.h @@ -205,6 +205,8 @@ inline float roundWithMode(float x, RoundingMode mode) case RoundingMode::Ceil: return ceilf(x); case RoundingMode::Trunc: return truncf(x); } + + __builtin_unreachable(); } inline double roundWithMode(double x, RoundingMode mode) @@ -216,6 +218,8 @@ inline double roundWithMode(double x, RoundingMode mode) case RoundingMode::Ceil: return ceil(x); case RoundingMode::Trunc: return trunc(x); } + + __builtin_unreachable(); } template diff --git a/release b/release index e3c8842a820..b8ed159bc7a 100755 --- a/release +++ b/release @@ -119,7 +119,7 @@ else export SET_BUILDRESULT=${SET_BUILDRESULT:=$CURDIR/..} if [[ -z `which pbuilder` ]] ; then - sudo apt install -y pbuilder fakeroot debhelper debian-archive-keyring debian-keyring lsb-release + sudo apt install -y pbuilder devscripts ccache fakeroot debhelper debian-archive-keyring debian-keyring lsb-release fi . $CURDIR/debian/.pbuilderrc