From 54949dbc219ed6db541b8187370bd98f8a27efe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A5=96=E5=BB=BA?= Date: Tue, 21 Nov 2023 16:23:17 +0800 Subject: [PATCH] base: fix missing CFLAGS -fPIC for arm64 (#3428) Signed-off-by: zhangzujian --- dist/images/Dockerfile.base | 14 ++++---------- dist/images/Dockerfile.base-dpdk | 8 +++----- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/dist/images/Dockerfile.base b/dist/images/Dockerfile.base index e37c0355604..47f7e573ae9 100644 --- a/dist/images/Dockerfile.base +++ b/dist/images/Dockerfile.base @@ -42,11 +42,7 @@ RUN cd /usr/src/ && git clone -b branch-22.12 --depth=1 https://github.com/ovn-o # ovn-ic blacklist function not work on ipv6 curl -s https://github.com/kubeovn/ovn/commit/78ab91005854532e7eb5c4fe6b2923ce292e3681.patch | git apply && \ # fix lr-lb dnat with multiple distributed gateway ports - curl -s https://github.com/kubeovn/ovn/commit/80f37c2debbf9f5230403691f791d11cc2b2e277.patch | git apply && \ - if [ "$ARCH" = "arm64" ]; then \ - # fix ovn-northd/ovn-controller not creating pidfile in arm64 - curl -s https://github.com/kubeovn/ovn/commit/fbfea0f1258d9d7723ead7e3dc8d7edbe74863d2.patch | git apply; \ - fi + curl -s https://github.com/kubeovn/ovn/commit/80f37c2debbf9f5230403691f791d11cc2b2e277.patch | git apply RUN apt install -y build-essential fakeroot \ autoconf automake bzip2 debhelper-compat dh-exec dh-python dh-sequence-python3 dh-sequence-sphinxdoc \ @@ -57,18 +53,16 @@ RUN cd /usr/src/ovs && \ ./boot.sh && \ ./configure && \ rm -rf .git && \ - CONFIGURE_OPTS='' && \ + CONFIGURE_OPTS='CFLAGS="-fPIC"' && \ if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS='CFLAGS="-O2 -g -msse4.2 -mpopcnt -fPIC"'; fi && \ DATAPATH_CONFIGURE_OPTS='--prefix=/usr' EXTRA_CONFIGURE_OPTS=$CONFIGURE_OPTS DEB_BUILD_OPTIONS='parallel=8 nocheck nodpdk' make debian-deb -RUN dpkg -i /usr/src/python3-openvswitch*.deb - RUN cd /usr/src/ovn && \ sed -i 's/OVN/ovn/g' debian/changelog && \ rm -rf .git && \ ./boot.sh && \ - CONFIGURE_OPTS='--with-ovs-build=/usr/src/ovs/_debian' && \ - if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS="$CONFIGURE_OPTS CFLAGS='-O2 -g -msse4.2 -mpopcnt -fPIC'"; fi && \ + CONFIGURE_OPTS='--with-ovs-build=/usr/src/ovs/_debian CFLAGS="-fPIC"' && \ + if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS="--with-ovs-build=/usr/src/ovs/_debian CFLAGS='-O2 -g -msse4.2 -mpopcnt -fPIC'"; fi && \ OVSDIR=/usr/src/ovs EXTRA_CONFIGURE_OPTS=$CONFIGURE_OPTS DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary RUN mkdir /packages/ && \ diff --git a/dist/images/Dockerfile.base-dpdk b/dist/images/Dockerfile.base-dpdk index 663f26637c3..aa9e9a7e37f 100644 --- a/dist/images/Dockerfile.base-dpdk +++ b/dist/images/Dockerfile.base-dpdk @@ -70,18 +70,16 @@ RUN cd /usr/src/ovs && \ echo override_dh_shlibdeps: >> /usr/src/ovs/debian/rules && \ echo "\tdh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info" >> /usr/src/ovs/debian/rules && \ export DPDK_DIR=/usr/src/dpdk-stable-22.11.1 && \ - CONFIGURE_OPTS='LIBS=-ljemalloc' && \ + CONFIGURE_OPTS='CFLAGS="-fPIC"' && \ if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS='CFLAGS="-O2 -g -msse4.2 -mpopcnt -fPIC"'; fi && \ DATAPATH_CONFIGURE_OPTS='--prefix=/usr' EXTRA_CONFIGURE_OPTS=$CONFIGURE_OPTS DEB_BUILD_OPTIONS='parallel=8 nocheck' make debian-deb -RUN dpkg -i /usr/src/python3-openvswitch*.deb - RUN cd /usr/src/ovn && \ sed -i 's/OVN/ovn/g' debian/changelog && \ rm -rf .git && \ ./boot.sh && \ - CONFIGURE_OPTS='--with-ovs-build=/usr/src/ovs/_debian' && \ - if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS="$CONFIGURE_OPTS CFLAGS='-O2 -g -msse4.2 -mpopcnt -fPIC'"; fi && \ + CONFIGURE_OPTS='--with-ovs-build=/usr/src/ovs/_debian CFLAGS="-fPIC"' && \ + if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS="--with-ovs-build=/usr/src/ovs/_debian CFLAGS='-O2 -g -msse4.2 -mpopcnt -fPIC'"; fi && \ OVSDIR=/usr/src/ovs EXTRA_CONFIGURE_OPTS=$CONFIGURE_OPTS DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary RUN mkdir /packages/ && \