Created attachment 455110 [details] emerge --info This version of ceph is failing on following errors: ========================================================= x86_64-pc-linux-gnu-gcc -iquote /tmp/portage/sys-cluster/ceph-10.2.3-r2/work/ceph-10.2.3/src/include -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing -fsigned-char -rdynamic -O2 -g -pipe -Wall -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fPIE -fstack-protector-strong -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing -march=skylake -mabm -maes -madx -mrtm -mavx256-split-unaligned-load -mavx256-split-unaligned-store --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=6144 -O2 -pipe -fwrapv -DNDEBUG -iquote /tmp/portage/sys-cluster/ceph-10.2.3-r2/work/ceph-10.2.3/src/include -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -DCEPH_LIBDIR=/usr/lib64 -DCEPH_PKGLIBDIR=/usr/lib64/ceph -DGTEST_USE_OWN_TR1_TUPLE=0 -D_REENTRANT -fPIC -I/usr/include/python2.7 -c /tmp/portage/sys-cluster/ceph-10.2.3-r2/work/ceph-10.2.3/src/build/rados.c -o /tmp/portage/sys-cluster/ceph-10.2.3-r2/work/ceph-10.2.3/src/build/temp.linux-x86_64-2.7/tmp/portage/sys-cluster/ceph-10.2.3-r2/work/ceph-10.2.3/src/build/rados.o rocksdb/librocksdb.a(format.o): In function `rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*)': /tmp/portage/sys-cluster/ceph-10.2.3-r2/work/ceph-10.2.3/src/rocksdb/./util/compression.h:644: undefined reference to `ZSTD_decompress' rocksdb/librocksdb.a(block_based_table_builder.o): In function `rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /tmp/portage/sys-cluster/ceph-10.2.3-r2/work/ceph-10.2.3/src/rocksdb/./util/compression.h:620: undefined reference to `ZSTD_compressBound' /tmp/portage/sys-cluster/ceph-10.2.3-r2/work/ceph-10.2.3/src/rocksdb/./util/compression.h:623: undefined reference to `ZSTD_compress' collect2: error: ld returned 1 exit status Makefile:15860: recipe for target 'ceph-objectstore-tool' failed ========================================================= I created latest ebuild for ZSTD version 1.1.1 available here: https://github.com/archenroot/gentoo-overlay/blob/master/app-arch/zstd/zstd-1.1.1.ebuild I removed completely the patch from ebuild, it compiled well and and ceph looks also healthy now.
Mistake, ZSTD 1.1.1 doesn't do any difference, actually I am not 100% sure now, if the errors are really related or not to ZSTD facebook package or not.
In case it helps as I encountered this too: ZSTD is being used in work/ceph-10.2.4/src/rocksdb/util/compression.h, and seems to be enabled in work/ceph-10.2.4/src/rocksdb/build_tools/build_detect_platform: ... # Test whether zstd library is installed $CXX $CFLAGS $COMMON_FLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF #include <zstd.h> int main() {} EOF if [ "$?" = 0 ]; then COMMON_FLAGS="$COMMON_FLAGS -DZSTD" PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lzstd" JAVA_LDFLAGS="$JAVA_LDFLAGS -lzstd" fi ... but seems that -lzstd is not passed.
Well even I try to emerge zstd, the libs are not visible, probably the ebuild for zstd could be broken?... Will check
There's code to handle bzip2 and lz4 dependencies of librocksdb.a, but zstd is missing: https://github.com/ceph/ceph/blob/v10.2.3/src/kv/CMakeLists.txt I've experienced the same issue with ceph-10.2.6-r1.
We're using autotools instead of cmake though... The cmake code comes from this pull request: https://github.com/ceph/ceph/pull/7126 And that references this commit which contains the autotools support: https://github.com/ceph/ceph/commit/911e7a02a244a75595eac8644bb75b0f2011b04e
Created attachment 469800 [details, diff] configure: link against zstd if detected This fixes it.
Fixed in ceph-10.2.7-r1 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17519e6e45d0244df45ce7494b50fa1477a0f541