The Ceph CMake files are a bit of a tangled mess. The tcmalloc library was originally linked through an `${ALLOC_LIBS}` definition that was directly added to individual daemon / utility targets. Nautilus reworked how these libraries were linked by refactoring everything into bundles of common libraries [0].
As a result, ceph-osd links the tcmalloc library through several layers of CMake library dependencies:
> `ceph-osd` adds the `os` set of libraries
-> `os` adds the `heap_profiler` set of libraries
--> `heap_profiler` adds the `gperftools::tcmalloc` library
The core issue is that the `heap_profiler` definition removes tcmalloc when `WITH_SEASTAR` is defined [1]. Ubuntu packaging has been built `WITH_SEASTAR=ON` since 16.2.4-0ubuntu1 [2].
More recently, upstream also broke tcmalloc while enabling seastar. They have proposed a solution that switches back to linking individual targets with `${ALLOC_LIBS}` [3]. This fix has been merged into master, with backports to quincy and pacific in progress [4].
The Ceph CMake files are a bit of a tangled mess. The tcmalloc library was originally linked through an `${ALLOC_LIBS}` definition that was directly added to individual daemon / utility targets. Nautilus reworked how these libraries were linked by refactoring everything into bundles of common libraries [0].
As a result, ceph-osd links the tcmalloc library through several layers of CMake library dependencies: :tcmalloc` library
> `ceph-osd` adds the `os` set of libraries
-> `os` adds the `heap_profiler` set of libraries
--> `heap_profiler` adds the `gperftools:
The core issue is that the `heap_profiler` definition removes tcmalloc when `WITH_SEASTAR` is defined [1]. Ubuntu packaging has been built `WITH_SEASTAR=ON` since 16.2.4-0ubuntu1 [2].
More recently, upstream also broke tcmalloc while enabling seastar. They have proposed a solution that switches back to linking individual targets with `${ALLOC_LIBS}` [3]. This fix has been merged into master, with backports to quincy and pacific in progress [4].
[0] https:/ /github. com/ceph/ ceph/pull/ 22990/commits/ 2e012870315e5a0 8e90c27f14666e8 518b94caef /github. com/ceph/ ceph/commit/ 028159ef6ea0f43 c4eaf2314d7d73f 92bbc5bd99 /bugs.launchpad .net/ubuntu/ +source/ ceph/+bug/ 1928645 /github. com/ceph/ ceph/pull/ 46103/commits/ 1e3d2b53cfeeff4 bac2f384c6445b6 5eb9e8396f /tracker. ceph.com/ issues/ 55519
[1] https:/
[2] https:/
[3] https:/
[4] https:/