mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
6cb5d0046b
clickhouse_common_io incudes new_delete.cpp, that uses memory.h, which uses sdallocx (jemalloc). And since there is -Wl,--no-undefined every undefined symbols are not allowed, hence clickhouse_common_io must know about sdallocx symbol. For the default build (-DUNBUNDLED=OFF) everything is good, because jemalloc is static, and clickhouse_common_io linked with libcommon (which is linked with jemalloc) But if jemalloc will be shared, and clickhouse_common_io and libcommon is different shared libraries then clickhouse_common_io should be linked with jemalloc, otherwise you will undefined reference to sdallocx error. This can be reproduced using the following build configuration: -DUSE_STATIC_LIBRARIES=OFF -DCLICKHOUSE_SPLIT_BINARY=ON -DSPLIT_SHARED_LIBRARIES=ON -DUNBUNDLED=ON Provided that you have systemd-wide jemalloc>=4 (see memory.h). Refs: https://github.com/yandex/ClickHouse/pull/6878#discussion_r324902295 v2: do not link jemalloc if it is static |
||
---|---|---|
.. | ||
benchmark | ||
cmake | ||
programs | ||
src | ||
tests | ||
CMakeLists.txt |