From edc93babf752d6d4e6c15092a005a59b578f8eac Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 13 Nov 2019 20:11:53 +0800 Subject: [PATCH] install-deps.sh: install binutils 2.28 for xenial ld 2.26 segment faults when linking librados.so in https://github.com/ceph/ceph/pull/16715 . while ld 2.28 always survives. binutils 2.28 is rebuilt and uploaded to chacra binutils/master/7fa393306ed8b93019d225548474c0540b8928f7/ubuntu/xenial, so let's use it instead. the source deb package comes from http://ppa.launchpad.net/jonathonf/binutils/ubuntu i tried to use the binutils 2.30 source package from bionic, but it has build dependency of dpkg-dev (>= 1.19.0.5) which cannot be fulfilled on xenial. so without more changes, we cannot get binutils 2.30 built on xenial using this source package. Fixes: https://tracker.ceph.com/issues/42596 Signed-off-by: Kefu Chai --- install-deps.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/install-deps.sh b/install-deps.sh index be7f4e35113..57cdb32620d 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -144,6 +144,20 @@ function ensure_decent_cmake_on_ubuntu { cmake } +function ensure_decent_binutils_on_ubuntu { + local new=$1 + local old=$(ld --version | head -n1 | grep -Po ' \K[0-9].*') + if dpkg --compare-versions $old ge $new; then + return + fi + install_pkg_on_ubuntu \ + binutils \ + 7fa393306ed8b93019d225548474c0540b8928f7 \ + xenial \ + force \ + binutils +} + function install_pkg_on_ubuntu { local project=$1 shift @@ -308,6 +322,7 @@ else *Xenial*) ensure_decent_gcc_on_ubuntu 8 xenial ensure_decent_cmake_on_ubuntu 3.10.1 + ensure_decent_binutils_on_ubuntu 2.28 [ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu xenial ;; *Bionic*) -- 2.39.5