]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-*-setup: use libc allocator when building quincy on bionic 1811/head
authorKefu Chai <kchai@redhat.com>
Fri, 14 May 2021 14:37:08 +0000 (22:37 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 15 May 2021 09:17:33 +0000 (17:17 +0800)
see also https://tracker.ceph.com/issues/39703, to silence the warning
std::allocator<void> is deprecated in C++17 and will be removed in
C++20, so stop using allocator<void> in quincy and up.

but the libtcmalloc shipped by bionic is still buggy (v2.5), so we should not
build qunincy and up with tcmalloc on this distro.

after this change, we only build quincy and up with tcmalloc on non-bionic distro.

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph-dev-new-setup/build/build
ceph-dev-setup/build/build
scripts/build_utils.sh

index 344345c812a8ecab4135fd76ccab2f914f0c4a13..11cc19d2b74b7e2a8e7a0052c1b664126a24cac2 100644 (file)
@@ -64,7 +64,7 @@ else
     echo "forcing."
 fi
 
-ceph_build_args_from_flavor ${FLAVOR}
+ceph_build_args_from_flavor_and_dist ${FLAVOR} ${DIST}
 
 mkdir -p release
 
index ed60f7961abfa8bca0ab23cb031154d133260501..bf94b27d90ef4de84863320a4aa25e76a61f6e32 100644 (file)
@@ -36,7 +36,7 @@ rm -rf release
 echo "Running submodule update ..."
 git submodule update --init
 
-ceph_build_args_from_flavor ${FLAVOR}
+ceph_build_args_from_flavor_and_dist ${FLAVOR} ${DIST}
 
 # When using autotools/autoconf it is possible to see output from `git diff`
 # since some macros can be copied over to the ceph source, triggering this
index cc2876f8a2067674ef3922deb554d2f1404c5c71..ba5005f27bdabc0541e020538e06dccb83d15906 100644 (file)
@@ -821,15 +821,34 @@ gen_debian_version() {
 # Flavor Builds support
 # - CEPH_EXTRA_RPMBUILD_ARGS is consumed by build_rpms()
 # - CEPH_EXTRA_CMAKE_ARGS is consumed by debian/rules and ceph.spec directly
-ceph_build_args_from_flavor() {
+ceph_build_args_from_flavor_and_dist() {
     local flavor=$1
     shift
+    local dist=$1
+    shift
 
     # shellcheck disable=SC2034
     case "${flavor}" in
     default)
         CEPH_EXTRA_RPMBUILD_ARGS="--with tcmalloc"
-        CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc"
+        # we have to build quincy and up on bionic, because some teuthology tests are
+        # still using ubuntu bionic:
+        # - the perftest depends on cosbench which is not compatible with ubuntu/focal, see
+        #   https://tracker.ceph.com/issues/49139
+        # - we need to test old clients which are built on bionic. for instance, we don't build
+        #   nautilus on focal yet.
+        # - some upgrade tests still include bionic facets.
+        if [ "$dist" == "bionic" ]; then
+            local ver
+            ver=$(git describe --abbrev=8 --match "v*" | sed s/^v// | cut -f1 -d'.')
+            # use libc allocator when building on quincy and up on bionic
+            if [ ${ver} -lt 17 ]; then
+                CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc"
+            fi
+        else
+            # always use tcmalloc on non-bionic dists
+            CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc"
+        fi
         ;;
     crimson)
         CEPH_EXTRA_RPMBUILD_ARGS="--with seastar"