Skip to content

Commit

Permalink
install-dep,rpm: use devtools-8 on amd64
Browse files Browse the repository at this point in the history
seems devtools-8 is not packaged on aarch64. and we are suffering from
ICE on centos7 when building with GCC-7.3. so let's try GCC-8.2!

Fixes: http://tracker.ceph.com/issues/38892
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Mar 22, 2019
1 parent 507e97a commit 5ae3b06
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ceph.spec.in
Expand Up @@ -146,7 +146,11 @@ BuildRequires: fuse-devel
%if 0%{?rhel} == 7
# devtoolset offers newer make and valgrind-devel, but the old ones are good
# enough.
%ifarch x86_64
BuildRequires: devtoolset-8-gcc-c++ >= 8.2.1
%else
BuildRequires: devtoolset-7-gcc-c++ >= 7.3.1-5.13
%endif
%else
BuildRequires: gcc-c++
%endif
Expand Down
12 changes: 7 additions & 5 deletions install-deps.sh
Expand Up @@ -183,11 +183,11 @@ function ensure_decent_gcc_on_rh {
cat <<EOF
Your GCC is too old. Please run following command to add DTS to your environment:
scl enable devtoolset-7 bash
scl enable devtoolset-8 bash
Or add following line to the end of ~/.bashrc to add it permanently:
source scl_source enable devtoolset-7
source scl_source enable devtoolset-8
see https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/ for more details.
EOF
Expand Down Expand Up @@ -343,7 +343,7 @@ else
case $(uname -m) in
x86_64)
$SUDO yum -y install centos-release-scl
dts_ver=7
dts_ver=8
;;
aarch64)
$SUDO yum -y install centos-release-scl-rh
Expand All @@ -353,8 +353,10 @@ else
;;
esac
elif test $ID = rhel -a $MAJOR_VERSION = 7 ; then
$SUDO yum-config-manager --enable rhel-server-rhscl-7-rpms
dts_ver=7
$SUDO yum-config-manager \
--enable rhel-server-rhscl-7-rpms \
--enable rhel-7-server-devtools-rpms
dts_ver=8
fi
;;
esac
Expand Down

0 comments on commit 5ae3b06

Please sign in to comment.