From 68850012bd261a53c728aa9767928b636ecf1adc Mon Sep 17 00:00:00 2001 From: proller Date: Wed, 27 Dec 2017 22:26:18 +0300 Subject: [PATCH] Embedded compiler fixes --- dbms/src/AggregateFunctions/AggregateFunctionArgMinMax.h | 1 + dbms/src/Interpreters/Compiler.cpp | 8 ++++---- dbms/src/Interpreters/EmbeddedDictionaries.h | 2 +- dbms/src/Interpreters/config_compile.h.in | 1 + debian/pbuilder-test/100_test_run | 5 +---- libs/libcommon/include/common/StringRef.h | 6 ++++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/dbms/src/AggregateFunctions/AggregateFunctionArgMinMax.h b/dbms/src/AggregateFunctions/AggregateFunctionArgMinMax.h index 0c30749c07..a5062df436 100644 --- a/dbms/src/AggregateFunctions/AggregateFunctionArgMinMax.h +++ b/dbms/src/AggregateFunctions/AggregateFunctionArgMinMax.h @@ -3,6 +3,7 @@ #include #include #include +#include // SingleValueDataString used in embedded compiler namespace DB diff --git a/dbms/src/Interpreters/Compiler.cpp b/dbms/src/Interpreters/Compiler.cpp index 73a9b56f85..b63dd438a4 100644 --- a/dbms/src/Interpreters/Compiler.cpp +++ b/dbms/src/Interpreters/Compiler.cpp @@ -229,14 +229,14 @@ void Compiler::compile( /// echo | g++ -x c++ -E -Wp,-v - " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/include/c++/*" - " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/include/x86_64-linux-gnu/c++/*" + " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/include/" CMAKE_LIBRARY_ARCHITECTURE "/c++/*" " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/include/c++/*/backward" " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/include/clang/*/include" /// if compiler is clang (from package) " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/local/lib/clang/*/include" /// if clang installed manually - " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/lib/gcc/x86_64-linux-gnu/*/include-fixed" - " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/lib/gcc/x86_64-linux-gnu/*/include" + " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/lib/gcc/" CMAKE_LIBRARY_ARCHITECTURE "/*/include-fixed" + " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/lib/gcc/" CMAKE_LIBRARY_ARCHITECTURE "/*/include" " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/local/include" /// if something installed manually - " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/include/x86_64-linux-gnu" + " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/include/" CMAKE_LIBRARY_ARCHITECTURE " -isystem " INTERNAL_COMPILER_HEADERS_ROOT "/usr/include" #endif " -I " INTERNAL_COMPILER_HEADERS "/dbms/src/" diff --git a/dbms/src/Interpreters/EmbeddedDictionaries.h b/dbms/src/Interpreters/EmbeddedDictionaries.h index 9345d3a082..a4f9730840 100644 --- a/dbms/src/Interpreters/EmbeddedDictionaries.h +++ b/dbms/src/Interpreters/EmbeddedDictionaries.h @@ -6,7 +6,7 @@ #include -namespace Poco { class Logger; } +namespace Poco { class Logger; namespace Util { class AbstractConfiguration; } } class RegionsHierarchies; class TechDataHierarchy; diff --git a/dbms/src/Interpreters/config_compile.h.in b/dbms/src/Interpreters/config_compile.h.in index 0655cfd95d..a3e8779957 100644 --- a/dbms/src/Interpreters/config_compile.h.in +++ b/dbms/src/Interpreters/config_compile.h.in @@ -1,5 +1,6 @@ #pragma once +#cmakedefine CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_LIBRARY_ARCHITECTURE@" #cmakedefine PATH_SHARE "@PATH_SHARE@" #cmakedefine INTERNAL_COMPILER_FLAGS "@INTERNAL_COMPILER_FLAGS@" #cmakedefine INTERNAL_COMPILER_EXECUTABLE "@INTERNAL_COMPILER_EXECUTABLE@" diff --git a/debian/pbuilder-test/100_test_run b/debian/pbuilder-test/100_test_run index 926e1e7123..c2941eb8d3 100755 --- a/debian/pbuilder-test/100_test_run +++ b/debian/pbuilder-test/100_test_run @@ -1,9 +1,6 @@ #!/bin/bash -# delete me: -env - clickhouse-client -q "SELECT * from system.build_options;" # --no-shard because default server listen only :: and 127.0.0.1 -[ -n "$TEST_RUN" ] && clickhouse-test --no-shard --queries /usr/share/clickhouse-test/queries || true +[ -n "$TEST_RUN" ] && clickhouse-test --no-shard --queries /usr/share/clickhouse-test/queries --tmp /tmp/clickhouse-test/ || true diff --git a/libs/libcommon/include/common/StringRef.h b/libs/libcommon/include/common/StringRef.h index d7cc4d9e6f..a32a1dccc8 100644 --- a/libs/libcommon/include/common/StringRef.h +++ b/libs/libcommon/include/common/StringRef.h @@ -14,6 +14,10 @@ #include #endif +#if __SSE4_2__ + #include + #include +#endif /// The thing to avoid creating strings to find substrings in the hash table. @@ -172,8 +176,6 @@ struct StringRefHash64 #if __SSE4_2__ -#include - /// Parts are taken from CityHash. inline UInt64 hashLen16(UInt64 u, UInt64 v) -- GitLab