From 9f4ca013882f2df10a499a63aaa4e7b766a89d06 Mon Sep 17 00:00:00 2001 From: Sabareesh-Kumar-Anandan <59681634+Sabareesh-Kumar-Anandan@users.noreply.github.com> Date: Tue, 15 Dec 2020 22:14:46 +0530 Subject: [PATCH] [sonic-config-engine] Adding dependent pkgs needed for arm compilation (#6186) libxslt-dev and libz-dev are dependencies for lxml==4.6.1 which is required for pyangbind==0.8.1 lxml-4.6.2-cp37-cp37m-manylinux1_x86_64.whl is directly downloaded in amd64 whereas in arm this is built from lxml-4.6.2.tar.gz Signed-off-by: Sabareesh Kumar Anandan --- dockers/docker-config-engine-buster/Dockerfile.j2 | 4 ++++ dockers/docker-config-engine-stretch/Dockerfile.j2 | 4 ++++ files/build_templates/sonic_debian_extension.j2 | 5 +++++ rules/ntp.mk | 2 +- sonic-slave-buster/Dockerfile.j2 | 3 +++ sonic-slave-stretch/Dockerfile.j2 | 3 +++ 6 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dockers/docker-config-engine-buster/Dockerfile.j2 b/dockers/docker-config-engine-buster/Dockerfile.j2 index 9e21571bb..df9c9f473 100644 --- a/dockers/docker-config-engine-buster/Dockerfile.j2 +++ b/dockers/docker-config-engine-buster/Dockerfile.j2 @@ -12,6 +12,10 @@ RUN apt-get update && \ python-dev \ python3-dev \ apt-utils \ +{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %} + libxslt-dev \ + libz-dev \ +{%- endif %} python-setuptools \ python3-setuptools diff --git a/dockers/docker-config-engine-stretch/Dockerfile.j2 b/dockers/docker-config-engine-stretch/Dockerfile.j2 index 8bc847d6f..66f47a02c 100644 --- a/dockers/docker-config-engine-stretch/Dockerfile.j2 +++ b/dockers/docker-config-engine-stretch/Dockerfile.j2 @@ -10,6 +10,10 @@ RUN apt-get update && \ build-essential \ python-pip \ python-dev \ +{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %} + libxslt-dev \ + libz-dev \ +{%- endif %} python-setuptools RUN pip install --upgrade pip diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index d29efc7d4..e678e10d2 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -149,6 +149,11 @@ sudo cp {{sonic_py_common_py3_wheel_path}} $FILESYSTEM_ROOT/$SONIC_PY_COMMON_PY3 sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install $SONIC_PY_COMMON_PY3_WHEEL_NAME sudo rm -rf $FILESYSTEM_ROOT/$SONIC_PY_COMMON_PY3_WHEEL_NAME +# Install dependency pkgs for SONiC config engine Python 2 package +if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then + sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install libxslt-dev libz-dev +fi + # Install SONiC config engine Python 2 package CONFIG_ENGINE_PY2_WHEEL_NAME=$(basename {{config_engine_py2_wheel_path}}) sudo cp {{config_engine_py2_wheel_path}} $FILESYSTEM_ROOT/$CONFIG_ENGINE_PY2_WHEEL_NAME diff --git a/rules/ntp.mk b/rules/ntp.mk index beffba7e8..13cbb495f 100644 --- a/rules/ntp.mk +++ b/rules/ntp.mk @@ -3,7 +3,7 @@ NTP_VERSION = 4.2.8p12+dfsg export NTP_VERSION -NTP = ntp_$(NTP_VERSION)-4+deb10u2_amd64.deb +NTP = ntp_$(NTP_VERSION)-4+deb10u2_$(CONFIGURED_ARCH).deb $(NTP)_SRC_PATH = $(SRC_PATH)/ntp SONIC_MAKE_DEBS += $(NTP) SONIC_STRETCH_DEBS += $(NTP) diff --git a/sonic-slave-buster/Dockerfile.j2 b/sonic-slave-buster/Dockerfile.j2 index ca141863b..2f31ce33a 100644 --- a/sonic-slave-buster/Dockerfile.j2 +++ b/sonic-slave-buster/Dockerfile.j2 @@ -248,6 +248,9 @@ RUN apt-get update && apt-get install -y \ python3-sphinx \ # For sonic config engine testing python-dev \ +{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %} + libxslt-dev \ +{%- endif %} # For lockfile procmail \ # For gtest diff --git a/sonic-slave-stretch/Dockerfile.j2 b/sonic-slave-stretch/Dockerfile.j2 index 75230d291..6d4f8b4ac 100644 --- a/sonic-slave-stretch/Dockerfile.j2 +++ b/sonic-slave-stretch/Dockerfile.j2 @@ -244,6 +244,9 @@ RUN apt-get update && apt-get install -y \ python3-sphinx \ # For sonic config engine testing python-dev \ +{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %} + libxslt-dev \ +{%- endif %} # For lockfile procmail \ # For pam_tacplus build