chdb-io / chdb

chDB is an in-process OLAP SQL Engine 🚀 powered by ClickHouse
https://clickhouse.com/chdb
Apache License 2.0
2.17k stars 75 forks source link

Fail to build with llvm@18 on Mac Arm64 #217

Closed qingant closed 6 months ago

qingant commented 6 months ago
/Users/tao/dev/chdb/base/poco/Foundation/src/pcre_dfa_exec.c:2190:21: error: 'switch' missing 'default' label [-Werror,-Wswitch-default]
 2190 |       if (clen > 0) switch(c)
      |                     ^
1 error generated.
auxten commented 6 months ago

For All Info: https://discord.com/channels/1098133460310294528/1098133460310294531/1244294006620422204

auxten commented 6 months ago

Upgrade to LLVM@18 needs rebasing to ClickHouse 24 first

auxten commented 6 months ago

If you want to build now, here is a temp patch:

diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake
index 00fa32a6b7f..4b97c4f3d9c 100644
--- a/cmake/warnings.cmake
+++ b/cmake/warnings.cmake
@@ -46,5 +46,9 @@ if (COMPILER_CLANG)
     no_warning(thread-safety-negative) # experimental flag, too many false positives
     no_warning(enum-constexpr-conversion) # breaks magic-enum library in clang-16
     no_warning(unsafe-buffer-usage) # too aggressive
+    no_warning(switch-default)
+    no_warning(missing-field-initializers)
+    no_warning(deprecated-declarations)
+    no_warning(thread-safety-reference-return)
     # TODO Enable conversion, sign-conversion, double-promotion warnings.
 endif ()