[PATCH 22.11] Revert "build: add libarchive to optional external dependencies"

Kevin Traynor ktraynor at redhat.com
Mon Feb 19 12:22:04 CET 2024


This reverts commit dec4b39b200a8c4b835f018c6061e81597e9401c.

This patch is reverting the 22.11 backport of upstream commit
22f7184e8b5f ("build: add libarchive to optional external dependencies")

Bruce highlighted [0] that this patch changes dependencies and exposes
some issues with libarchive packages, which leads to link errors.

We should not change the dependencies on already released LTS.

[0]
https://mails.dpdk.org/archives/stable/2023-November/046434.html

Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
---
 config/meson.build  | 5 +++++
 lib/eal/meson.build | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 5f6320ab19..265aaa995c 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -210,4 +210,9 @@ libarchive = dependency('libarchive', required: false, method: 'pkg-config')
 if libarchive.found()
     dpdk_conf.set('RTE_HAS_LIBARCHIVE', 1)
+    # Push libarchive link dependency at the project level to support
+    # statically linking dpdk apps. Details at:
+    # https://inbox.dpdk.org/dev/20210605004024.660267a1@sovereign/
+    add_project_link_arguments('-larchive', language: 'c')
+    dpdk_extra_ldflags += '-larchive'
 endif
 
diff --git a/lib/eal/meson.build b/lib/eal/meson.build
index 04bd3fe351..056beb9461 100644
--- a/lib/eal/meson.build
+++ b/lib/eal/meson.build
@@ -30,7 +30,4 @@ if dpdk_conf.has('RTE_USE_LIBBSD')
     ext_deps += libbsd
 endif
-if dpdk_conf.has('RTE_HAS_LIBARCHIVE')
-    ext_deps += libarchive
-endif
 if cc.has_function('getentropy', prefix : '#include <unistd.h>')
     cflags += '-DRTE_LIBEAL_USE_GETENTROPY'
-- 
2.43.0



More information about the stable mailing list