From 47d4351d3ad2787ae7781d868608eb0e3c7797c7 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 3 Jul 2019 21:20:45 +0800 Subject: [PATCH] ceph.spec.in,install-dep.sh: pin to gcc-c++-8.2.1 as an intermediate solution before https://bugzilla.redhat.com/show_bug.cgi?id=1726630 gets fixed. Fixes: https://tracker.ceph.com/issues/40646 Signed-off-by: Kefu Chai --- ceph.spec.in | 3 ++- install-deps.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ceph.spec.in b/ceph.spec.in index 08c40ee0dbe..cc084d6990d 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -151,7 +151,8 @@ BuildRequires: fuse-devel %if 0%{?rhel} == 7 # devtoolset offers newer make and valgrind-devel, but the old ones are good # enough. -BuildRequires: devtoolset-8-gcc-c++ >= 8.2.1 +# see https://github.com/ceph/ceph/pull/28859 +BuildRequires: devtoolset-8-gcc-c++ = 8.2.1 %else BuildRequires: gcc-c++ %endif diff --git a/install-deps.sh b/install-deps.sh index 4bc86a80a00..4addfbed7cd 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -197,6 +197,11 @@ EOF source /opt/rh/devtoolset-$dts_ver/enable fi fi + if [ $(rpm -q --queryformat "%{VERSION}" devtoolset-$dts_ver-gcc-c++) = 8.3.1 ]; then + # rollback to avoid using a buggy version + $SUDO yum remove -y devtoolset-8-gcc-c++ devtoolset-8-gcc devtoolset-8-libstdc++-devel + $SUDO yum install -y devtoolset-8-gcc-c++-8.2.1-3.el7 + fi } if [ x$(uname)x = xFreeBSDx ]; then -- 2.39.5