This will fix CMAKE_POLICY_DEFAULT_CMP0077 for snappy:
CMake Warning (dev) at contrib/snappy/CMakeLists.txt:11 (option):
Policy CMP0077 is not set: option() honors normal variables. Run
"cmake
--help-policy CMP0077" for policy details. Use the cmake_policy
command to
set the policy and suppress this warning.
For compatibility with older versions of CMake, option is clearing the
normal variable 'BUILD_SHARED_LIBS'.
This warning is for project developers. Use -Wno-dev to suppress it.
MOTIVATION:
- remove double-conversion external dependency
- remove flatc (but flatbuffers is still required, arrow just shipped
with generated files and that's it)
CHANGED:
- remove pre-generated headers, it is shipped with the arrow
- remove flatc (see above)
NOTES (see tests changes):
- and snappy error is reported as unsupported compression.
Otherwise fails:
FAILED: src/CMakeFiles/dbms.dir/Storages/RabbitMQ/RabbitMQBlockInputStream.cpp.o
...
In file included from ../src/Storages/RabbitMQ/RabbitMQHandler.h:9,
from ../src/Storages/RabbitMQ/StorageRabbitMQ.h:11,
from ../src/Storages/RabbitMQ/RabbitMQBlockInputStream.h:5,
from ../src/Storages/RabbitMQ/RabbitMQBlockInputStream.cpp:3:
../contrib/AMQP-CPP/include/amqpcpp/libuv.h:22:10: fatal error: uv.h: No such file or directory
cmake reports:
CMake Warning (dev) at contrib/re2/CMakeLists.txt:15 (option):
Policy CMP0077 is not set: option() honors normal variables. Run "cmake
--help-policy CMP0077" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
For compatibility with older versions of CMake, option is clearing the
normal variable 'BUILD_SHARED_LIBS'.
This warning is for project developers. Use -Wno-dev to suppress it.
Othewise cmake reports:
-- Configuring done
CMake Warning (dev) in contrib/googletest/googletest/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "gtest" has an INTERFACE_LINK_LIBRARIES property which differs from
its LINK_INTERFACE_LIBRARIES_DEBUG properties.
INTERFACE_LINK_LIBRARIES:
global-group;Threads::Threads
LINK_INTERFACE_LIBRARIES_DEBUG:
Threads::Threads
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /src/ch/clickhouse/.cmake-tmp
gcc10 reports:
FAILED: src/CMakeFiles/unit_tests_dbms.dir/Columns/tests/gtest_column_unique.cpp.o
<snip>
../contrib/googletest/googletest/include/gtest/gtest-printers.h:287:7: error: use of deleted function ‘std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char8_t) [with _Traits = std::char_traits<char>]’
287 | *os << value;
| ~~~~^~~~~~~~
In file included from ../base/common/../common/StringRef.h:6,
from ../src/Columns/IColumn.h:7,
from ../src/Columns/IColumnUnique.h:2,
from ../src/Columns/ColumnUnique.h:2,
from ../src/Columns/tests/gtest_column_unique.cpp:1:
/usr/include/c++/10.1.0/ostream:544:5: note: declared here
544 | operator<<(basic_ostream<char, _Traits>&, char8_t) = delete;
|
Otherwise cmake reports:
CMake Warning at contrib/googletest/googletest/CMakeLists.txt:54 (project):
VERSION keyword not followed by a value or was followed by a value that
expanded to nothing.
(since GOOGLETEST_VERSION is set in contrib/googletest/CMakeLists.txt)
By default IMPORTED target has a scope in the directory in which it is created
and below. This leads to the following issues when building UNBUNDLED:
Target "clickhouse" links to target "Poco::Data::ODBC" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
In case of OSX jemalloc register itself as a default zone allocator.
But when you link statically then zone_register() will not be called,
and even will be optimized out:
$ nm clickhouse.patched | grep -c zone_register
0
Fix this, by manually calling it.
v2: extern C
Right now it aborts (Abort trap: 6) on osx, the issue does not looks
like [1], but should be investigated, so disable for now.
What is interesting that it works under debugger, so I guess it is
indeed the order of symbol replacements...
[1]: https://github.com/jemalloc/jemalloc/issues/420
And since it does not supported it produces the following warning:
<jemalloc>: No getcpu support: percpu_arena:percpu
<jemalloc>: perCPU arena getcpu() not available. Setting narenas to 8.
However it is uses narenas=ncpu instead of default narenas=ncpu*4