From 140a289f8e979d443a989cdbd65bf786edd21ad7 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Thu, 29 Apr 2021 17:00:38 +0300 Subject: [PATCH 01/11] Remove unused compilers --- docker/packager/deb/Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docker/packager/deb/Dockerfile b/docker/packager/deb/Dockerfile index 902929a2644..3002783945c 100644 --- a/docker/packager/deb/Dockerfile +++ b/docker/packager/deb/Dockerfile @@ -35,22 +35,16 @@ RUN curl -O https://clickhouse-builds.s3.yandex.net/utils/1/dpkg-deb \ RUN apt-get update \ && apt-get install \ alien \ - clang-10 \ clang-11 \ - clang-tidy-10 \ clang-tidy-11 \ cmake \ debhelper \ devscripts \ - g++-9 \ - gcc-9 \ gdb \ git \ gperf \ lld-10 \ lld-11 \ - llvm-10 \ - llvm-10-dev \ llvm-11 \ llvm-11-dev \ moreutils \ From 26068a4d286aa2740771e836620d02d5ecbfcd35 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Thu, 29 Apr 2021 20:10:01 +0300 Subject: [PATCH 02/11] Updated llvm.cmake --- cmake/find/llvm.cmake | 2 +- docker/packager/deb/Dockerfile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/find/llvm.cmake b/cmake/find/llvm.cmake index e0ba1d9b039..0025cc0f9d3 100644 --- a/cmake/find/llvm.cmake +++ b/cmake/find/llvm.cmake @@ -26,7 +26,7 @@ endif () if (NOT USE_INTERNAL_LLVM_LIBRARY) set (LLVM_PATHS "/usr/local/lib/llvm") - foreach(llvm_v 10 9 8) + foreach(llvm_v 12 11) if (NOT LLVM_FOUND) find_package (LLVM ${llvm_v} CONFIG PATHS ${LLVM_PATHS}) endif () diff --git a/docker/packager/deb/Dockerfile b/docker/packager/deb/Dockerfile index 3002783945c..2f1d28efe61 100644 --- a/docker/packager/deb/Dockerfile +++ b/docker/packager/deb/Dockerfile @@ -43,7 +43,6 @@ RUN apt-get update \ gdb \ git \ gperf \ - lld-10 \ lld-11 \ llvm-11 \ llvm-11-dev \ From f8dcba8435a2ef51745e3b22842a4332091445b8 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Thu, 29 Apr 2021 22:45:15 +0300 Subject: [PATCH 03/11] Updated llvm search version --- cmake/find/llvm.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmake/find/llvm.cmake b/cmake/find/llvm.cmake index 0025cc0f9d3..ea0ba0a8a3b 100644 --- a/cmake/find/llvm.cmake +++ b/cmake/find/llvm.cmake @@ -26,11 +26,9 @@ endif () if (NOT USE_INTERNAL_LLVM_LIBRARY) set (LLVM_PATHS "/usr/local/lib/llvm") - foreach(llvm_v 12 11) - if (NOT LLVM_FOUND) - find_package (LLVM ${llvm_v} CONFIG PATHS ${LLVM_PATHS}) - endif () - endforeach () + if (NOT LLVM_FOUND) + find_package (LLVM 11...<12 CONFIG PATHS ${LLVM_PATHS}) + endif () if (LLVM_FOUND) # Remove dynamically-linked zlib and libedit from LLVM's dependencies: From ecb05a5f403bccb8c89d2c0cc16c7b2bae9235df Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Fri, 30 Apr 2021 17:36:05 +0300 Subject: [PATCH 04/11] Update Dockerfile --- docker/packager/deb/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/packager/deb/Dockerfile b/docker/packager/deb/Dockerfile index 2f1d28efe61..8c5d1dbb3fd 100644 --- a/docker/packager/deb/Dockerfile +++ b/docker/packager/deb/Dockerfile @@ -61,7 +61,7 @@ RUN apt-get update \ RUN echo 'deb http://archive.ubuntu.com/ubuntu/ focal-proposed restricted main multiverse universe' > /etc/apt/sources.list.d/proposed-repositories.list RUN apt-get update \ - && apt-get install gcc-10 g++-10 --yes --no-install-recommends + && apt-get install gcc-10 g++-10 --yes RUN rm /etc/apt/sources.list.d/proposed-repositories.list && apt-get update From 0c5e5a030034e9b481a4e570b4355bb1e54887fd Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sat, 1 May 2021 00:47:15 +0300 Subject: [PATCH 05/11] Update llvm.cmake --- cmake/find/llvm.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/find/llvm.cmake b/cmake/find/llvm.cmake index ea0ba0a8a3b..0d69fb19d07 100644 --- a/cmake/find/llvm.cmake +++ b/cmake/find/llvm.cmake @@ -27,7 +27,7 @@ if (NOT USE_INTERNAL_LLVM_LIBRARY) set (LLVM_PATHS "/usr/local/lib/llvm") if (NOT LLVM_FOUND) - find_package (LLVM 11...<12 CONFIG PATHS ${LLVM_PATHS}) + find_package (LLVM 11...12 CONFIG PATHS ${LLVM_PATHS}) endif () if (LLVM_FOUND) From 939b940c2978109cb2dcb89e0e43a8a796baf40c Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sat, 1 May 2021 00:47:34 +0300 Subject: [PATCH 06/11] Update Dockerfile --- docker/packager/deb/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/packager/deb/Dockerfile b/docker/packager/deb/Dockerfile index 8c5d1dbb3fd..81b9f9e2b6a 100644 --- a/docker/packager/deb/Dockerfile +++ b/docker/packager/deb/Dockerfile @@ -43,6 +43,7 @@ RUN apt-get update \ gdb \ git \ gperf \ + lld-10 \ lld-11 \ llvm-11 \ llvm-11-dev \ From 012620b71da6cec80fae10007c3d3f57f804b239 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Sat, 1 May 2021 08:07:55 +0300 Subject: [PATCH 07/11] Update llvm.cmake --- cmake/find/llvm.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/find/llvm.cmake b/cmake/find/llvm.cmake index 0d69fb19d07..b4a11000f4f 100644 --- a/cmake/find/llvm.cmake +++ b/cmake/find/llvm.cmake @@ -27,7 +27,7 @@ if (NOT USE_INTERNAL_LLVM_LIBRARY) set (LLVM_PATHS "/usr/local/lib/llvm") if (NOT LLVM_FOUND) - find_package (LLVM 11...12 CONFIG PATHS ${LLVM_PATHS}) + find_package (LLVM 11.1 11 CONFIG PATHS ${LLVM_PATHS}) endif () if (LLVM_FOUND) From 37ce69d40e5b6d057a439821f91201fa03661389 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Sat, 1 May 2021 08:08:36 +0300 Subject: [PATCH 08/11] Update llvm.cmake --- cmake/find/llvm.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/find/llvm.cmake b/cmake/find/llvm.cmake index b4a11000f4f..56b345fa308 100644 --- a/cmake/find/llvm.cmake +++ b/cmake/find/llvm.cmake @@ -26,9 +26,11 @@ endif () if (NOT USE_INTERNAL_LLVM_LIBRARY) set (LLVM_PATHS "/usr/local/lib/llvm") - if (NOT LLVM_FOUND) - find_package (LLVM 11.1 11 CONFIG PATHS ${LLVM_PATHS}) - endif () + foreach(llvm_v 11.1 11) + if (NOT LLVM_FOUND) + find_package (LLVM ${llvm_v} CONFIG PATHS ${LLVM_PATHS}) + endif () + endforeach () if (LLVM_FOUND) # Remove dynamically-linked zlib and libedit from LLVM's dependencies: From cda164c3cda4d4125be44d893e1daf0519ab034b Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Sat, 1 May 2021 08:09:20 +0300 Subject: [PATCH 09/11] Update llvm.cmake --- cmake/find/llvm.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/find/llvm.cmake b/cmake/find/llvm.cmake index 56b345fa308..dfb3a0e820a 100644 --- a/cmake/find/llvm.cmake +++ b/cmake/find/llvm.cmake @@ -24,7 +24,7 @@ if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/llvm/llvm/CMakeLists.txt") endif () if (NOT USE_INTERNAL_LLVM_LIBRARY) - set (LLVM_PATHS "/usr/local/lib/llvm") + set (LLVM_PATHS "/usr/local/lib/llvm" "/usr/lib/llvm") foreach(llvm_v 11.1 11) if (NOT LLVM_FOUND) From b879d05ec442a26d3106f79b2b30cd8084547005 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 1 May 2021 10:06:30 +0300 Subject: [PATCH 10/11] Fix build --- src/Interpreters/ExpressionJIT.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Interpreters/ExpressionJIT.cpp b/src/Interpreters/ExpressionJIT.cpp index cc37025f699..962d90f5d96 100644 --- a/src/Interpreters/ExpressionJIT.cpp +++ b/src/Interpreters/ExpressionJIT.cpp @@ -3,6 +3,7 @@ #if USE_EMBEDDED_COMPILER #include +#include #include #include From ba815acafaf4172940f982e29d658b5f2b959adc Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 1 May 2021 11:23:12 +0300 Subject: [PATCH 11/11] Update library list --- cmake/find/llvm.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/find/llvm.cmake b/cmake/find/llvm.cmake index dfb3a0e820a..6ea7a5fd683 100644 --- a/cmake/find/llvm.cmake +++ b/cmake/find/llvm.cmake @@ -102,7 +102,6 @@ LLVMRuntimeDyld LLVMX86CodeGen LLVMX86Desc LLVMX86Info -LLVMX86Utils LLVMAsmPrinter LLVMDebugInfoDWARF LLVMGlobalISel