DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC PATCH] build: use libpcap only from pkg-config
@ 2020-10-08 17:05 Bruce Richardson
  2020-10-08 17:08 ` Bruce Richardson
  2020-10-09 14:19 ` [dpdk-dev] [PATCH v2] build: skip detecting libpcap via pcap-config Bruce Richardson
  0 siblings, 2 replies; 12+ messages in thread
From: Bruce Richardson @ 2020-10-08 17:05 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

All recent linux distro's - including RHEL 8 and Ubuntu 18.04 - provide a
pkg-config file for libpcap, and using other methods of finding the library
can cause issues when cross-compiling, so we can limit build support for
pcap versions without a .pc file.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 69f2aeb60..edc6c195a 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -163,13 +163,7 @@ 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 = cc.find_library('pcap', required: false)
-endif
+pcap_dep = dependency('libpcap', required: false, method: 'pkg-config')
 if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
 	dpdk_conf.set('RTE_PORT_PCAP', 1)
 	dpdk_extra_ldflags += '-lpcap'
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-10-12 15:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 17:05 [dpdk-dev] [RFC PATCH] build: use libpcap only from pkg-config Bruce Richardson
2020-10-08 17:08 ` Bruce Richardson
2020-10-09  9:09   ` Luca Boccassi
2020-10-09 10:32     ` Bruce Richardson
2020-10-09 12:51       ` Luca Boccassi
2020-10-09 13:39         ` Bruce Richardson
2020-10-09 14:19 ` [dpdk-dev] [PATCH v2] build: skip detecting libpcap via pcap-config Bruce Richardson
2020-10-09 14:54   ` Luca Boccassi
2020-10-12 15:12     ` David Marchand
2020-10-12 12:02   ` David Marchand
2020-10-12 12:47     ` Bruce Richardson
2020-10-12 12:48   ` Bruce Richardson

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git