From a047b9691f659896c29db994ccbe5d0148e34108 Mon Sep 17 00:00:00 2001 From: xumia Date: Tue, 27 Dec 2022 11:19:31 +0000 Subject: [PATCH] [Build] Fix libyang build broken issue --- files/build_templates/sonic_debian_extension.j2 | 4 ++++ sonic-slave-buster/Dockerfile.j2 | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index cda42793ae57..32e26ceccc39 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -266,6 +266,10 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y -t sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install gir1.2-glib-2.0 libdbus-1-3 libgirepository-1.0-1 sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y -t $IMAGE_DISTRO-backports install libsystemd0 +if [[ $CONFIGURED_ARCH == armhf ]]; then + sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install dbus-python==1.2.18 +fi + # Install SONiC host services package SONIC_HOST_SERVICES_PY3_WHEEL_NAME=$(basename {{sonic_host_services_py3_wheel_path}}) sudo cp {{sonic_host_services_py3_wheel_path}} $FILESYSTEM_ROOT/$SONIC_HOST_SERVICES_PY3_WHEEL_NAME diff --git a/sonic-slave-buster/Dockerfile.j2 b/sonic-slave-buster/Dockerfile.j2 index 957e0f646998..0aee50000071 100644 --- a/sonic-slave-buster/Dockerfile.j2 +++ b/sonic-slave-buster/Dockerfile.j2 @@ -354,9 +354,6 @@ RUN apt-get update && apt-get install -y \ libsystemd-dev \ pkg-config -# Upgrade cmake to support dbus-python build in armhf -RUN apt-get install -t buster-backports -y cmake - RUN apt-get -y build-dep openssh # Build fix for ARMHF buster libsairedis @@ -380,6 +377,9 @@ RUN apt-get -y build-dep openssh # workaround because of https://bugs.launchpad.net/qemu/+bug/1805913, just disable aspell RUN cp /bin/true /usr/bin/aspell + + # The cmake (>3.15) is required to install the latest version of dbus-python in armhf, but the cmake will conflict with libyang + RUN pip3 install dbus-python==1.2.18 {%- endif %} ## Config dpkg