Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 661008

Summary: sys-cluster/ceph-13.2.0: build fails when dev-cpp/tbb is installed due to broken automagic dep
Product: Gentoo Linux Reporter: Hector Martin <marcan>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jstein, sandino
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Hector Martin 2018-07-12 15:17:41 UTC
Build log snippet:

[ 35%] Linking CXX executable ../bin/ceph-mon
cd /var/tmp/portage/sys-cluster/ceph-13.2.0/work/ceph-13.2.0_build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/ceph-mon.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++  -march=ivybridge -O2 -pipe -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing -fsigned-char -Wno-unknown-pragmas -rdynamic -march=ivybridge -O2 -pipe -ftemplate-depth-1024 -Wnon-virtual-dtor -Wno-unknown-pragmas -Wstrict-null-sentinel -Woverloaded-virtual -fno-new-ttp-matching -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fdiagnostics-color=auto -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free  -Wl,-O1 -Wl,--as-needed -pie CMakeFiles/ceph-mon.dir/ceph_mon.cc.o CMakeFiles/common_texttable_obj.dir/common/TextTable.cc.o  -o ../bin/ceph-mon -Wl,-rpath,/var/tmp/portage/sys-cluster/ceph-13.2.0/work/ceph-13.2.0_build/lib: ../lib/libmon.a ../lib/libos.a ../lib/libglobal-static.a ../lib/libceph-common.so.0 -ldl -lrt -lresolv -ldl -laio -lfuse /var/tmp/portage/sys-cluster/ceph-13.2.0/work/ceph-13.2.0/src/spdk/build/lib/libspdk_nvme.a /var/tmp/portage/sys-cluster/ceph-13.2.0/work/ceph-13.2.0/src/spdk/build/lib/libspdk_log.a /var/tmp/portage/sys-cluster/ceph-13.2.0/work/ceph-13.2.0/src/spdk/build/lib/libspdk_lvol.a -luuid /var/tmp/portage/sys-cluster/ceph-13.2.0/work/ceph-13.2.0/src/spdk/build/lib/libspdk_env_dpdk.a -lrt dpdk/lib/librte_bus_pci.a dpdk/lib/librte_pci.a dpdk/lib/librte_eal.a dpdk/lib/librte_mempool.a dpdk/lib/librte_mempool_ring.a dpdk/lib/librte_mempool_stack.a dpdk/lib/librte_ring.a /var/tmp/portage/sys-cluster/ceph-13.2.0/work/ceph-13.2.0/src/spdk/build/lib/libspdk_util.a ../lib/libkv.a -lleveldb -ltcmalloc rocksdb/librocksdb.a -lsnappy -llz4 ../lib/libcommon.a -lresolv ../lib/libjson_spirit.a ../lib/libcommon_utf8.a ../lib/liberasure_code.a ../boost/lib/libboost_thread.a ../boost/lib/libboost_chrono.a ../boost/lib/libboost_atomic.a ../boost/lib/libboost_system.a ../boost/lib/libboost_random.a ../boost/lib/libboost_program_options.a ../boost/lib/libboost_date_time.a ../boost/lib/libboost_iostreams.a ../boost/lib/libboost_regex.a -lblkid -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lssl -lcrypto -lpthread -ldl -lz 
rocksdb/librocksdb.a(clock_cache.cc.o): In function `tbb::interface5::concurrent_hash_map<rocksdb::(anonymous namespace)::CacheKey, rocksdb::(anonymous namespace)::CacheHandle*, rocksdb::(anonymous namespace)::CacheKey, tbb::tbb_allocator<std::pair<rocksdb::(anonymous namespace)::CacheKey, rocksdb::(anonymous namespace)::CacheHandle*> > >::clear()':
clock_cache.cc:(.text+0x337): undefined reference to `tbb::internal::deallocate_via_handler_v3(void*)'
clock_cache.cc:(.text+0x3a5): undefined reference to `tbb::internal::NFS_Free(void*)'
[snip more errors]

Looks like this is an automagic dep of RocksDB. ceph-13.2.0/src/rocksdb/cache/clock_cache.h enables this codepath if defined(TBB), which is set in ceph-13.2.0/src/rocksdb/CMakeLists.txt if find_package(TBB) succeeds. However, the necessary -ltbb isn't properly passed through to the Ceph build system (only RocksDB itself, but then RocksDB is linked statically which does not carry solib dependency information). Thus Ceph binaries fail to link.

Versions:
=sys-cluster/ceph-13.2.0
=dev-cpp/tbb-2018.20180312

Related:
https://github.com/facebook/rocksdb/issues/3036
Comment 1 Jonas Stein gentoo-dev 2018-07-20 17:50:37 UTC
Thank you for the report. Please recompile and *attach* the logfiles and 
paste the emerge info as described on
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
Please reopen this ticket (Status:unconfirmed) afterwards.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2019-03-20 16:29:21 UTC
(In reply to Jonas Stein from comment #1)
> Please reopen this ticket (Status:unconfirmed) afterwards.

Don't do that.

*** This bug has been marked as a duplicate of bug 667024 ***