From 9fb7892e47f74e629a9ba7921e98ed3f8286aed3 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 30 May 2018 18:09:48 +0800 Subject: [PATCH] build_utils.sh: add ubuntu-ports repo for arm64 build as it offers updated binutils which does not exist in the default repo. and the updated binutils is depended by gcc-7. this change address following failure like: The following packages have unmet dependencies: gcc-7 : Depends: binutils (>= 2.26.1) but 2.26-8ubuntu2 is to be installed when installing g++-7. Signed-off-by: Kefu Chai --- scripts/build_utils.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 60fc25c4..5d9b362e 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -525,7 +525,19 @@ setup_pbuilder_for_new_gcc() { # and gcc-7, and `pbuilder` command will fail. because the `build-essential` # depends on a certain version of gcc which is upgraded already by the one # in test repo. - cat > $hookdir/D05install-gcc-7 < $hookdir/D05install-gcc-7 <> \ + /etc/apt/sources.list.d/ubuntu-toolchain-r.list +echo "deb http://ports.ubuntu.com/ubuntu-ports $DIST-updates main" >> \ + /etc/apt/sources.list.d/ubuntu-toolchain-r.list +# import PPA's signing key into APT's keyring +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F +apt-get update -y -o Acquire::Languages=none -o Acquire::Translation=none || true +apt-get install -y g++-7 +EOF + elif [ "$ARCH" = "x86_64" ]; then + cat > $hookdir/D05install-gcc-7 <> \ /etc/apt/sources.list.d/ubuntu-toolchain-r.list echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu $DIST main" >> \ @@ -539,6 +551,10 @@ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F apt-get -y update -o Acquire::Languages=none -o Acquire::Translation=none || true apt-get install -y g++-7 EOF + else + echo "unsupported arch: $ARCH" + exit 1 + fi chmod +x $hookdir/D05install-gcc-7 setup_gcc_hook 7 > $hookdir/D10update-gcc-alternatives -- 2.39.5