[dpdk-stable] patch 'build: skip detecting libpcap via pcap-config' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:44:52 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 364bc27dfb965bac34446f3159c0befd8027e498 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Fri, 9 Oct 2020 15:19:14 +0100
Subject: [PATCH] build: skip detecting libpcap via pcap-config

[ upstream commit cce5aecf3c3ce30724e4686bf867f146dd2fb625 ]

When compiling for a slightly different architecture, e.g. 32-bit on 64-bit
systems using CFLAGS rather than a cross-file, the pcap-config utility can
often return parameters that are unusable for the build in question, i.e.
providing the native 64-bit library paths rather than checking for 32-bit
equivalent.

Since many distros now include a version of libpcap with a
pkg-config file, and for those that don't find-library should work ok as a
fallback, we can explicitly just use pkg-config in the dependency search,
causing meson to skip trying to use pcap-config.

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Reviewed-by: Luca Boccassi <bluca at debian.org>
Tested-by: David Marchand <david.marchand at redhat.com>
---
 config/meson.build | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 0a5e5b1c44..9afd05b95e 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -160,11 +160,9 @@ if libbsd.found()
 endif
 
 # check for pcap
-pcap_dep = dependency('pcap', required: false)
-if pcap_dep.found()
-	# pcap got a pkg-config file only in 1.9.0 and before that meson uses
-	# an internal pcap-config finder, which is not compatible with
-	# cross-compilation, so try to fallback to find_library
+pcap_dep = dependency('libpcap', required: false, method: 'pkg-config')
+if not pcap_dep.found()
+	# pcap got a pkg-config file only in 1.9.0
 	pcap_dep = cc.find_library('pcap', required: false)
 endif
 if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.875825162 +0000
+++ 0133-build-skip-detecting-libpcap-via-pcap-config.patch	2020-10-28 10:35:11.704832968 +0000
@@ -1,8 +1,10 @@
-From cce5aecf3c3ce30724e4686bf867f146dd2fb625 Mon Sep 17 00:00:00 2001
+From 364bc27dfb965bac34446f3159c0befd8027e498 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson at intel.com>
 Date: Fri, 9 Oct 2020 15:19:14 +0100
 Subject: [PATCH] build: skip detecting libpcap via pcap-config
 
+[ upstream commit cce5aecf3c3ce30724e4686bf867f146dd2fb625 ]
+
 When compiling for a slightly different architecture, e.g. 32-bit on 64-bit
 systems using CFLAGS rather than a cross-file, the pcap-config utility can
 often return parameters that are unusable for the build in question, i.e.
@@ -14,8 +16,6 @@
 fallback, we can explicitly just use pkg-config in the dependency search,
 causing meson to skip trying to use pcap-config.
 
-Cc: stable at dpdk.org
-
 Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
 Reviewed-by: Luca Boccassi <bluca at debian.org>
 Tested-by: David Marchand <david.marchand at redhat.com>
@@ -24,10 +24,10 @@
  1 file changed, 3 insertions(+), 5 deletions(-)
 
 diff --git a/config/meson.build b/config/meson.build
-index 69f2aeb605..9fb903c9ba 100644
+index 0a5e5b1c44..9afd05b95e 100644
 --- a/config/meson.build
 +++ b/config/meson.build
-@@ -163,11 +163,9 @@ if libbsd.found()
+@@ -160,11 +160,9 @@ if libbsd.found()
  endif
  
  # check for pcap


More information about the stable mailing list