]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: install binutils 2.28 for xenial
authorKefu Chai <kchai@redhat.com>
Wed, 13 Nov 2019 12:11:53 +0000 (20:11 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 13 Nov 2019 16:12:06 +0000 (00:12 +0800)
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 <kchai@redhat.com>
install-deps.sh

index be7f4e351131cd7ea1ec0ab49516abaa58df3feb..57cdb32620d436f59e7f71478c8e827f72616156 100755 (executable)
@@ -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*)