From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B6E71A04B6; Mon, 12 Oct 2020 14:48:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96A4E1D6FA; Mon, 12 Oct 2020 14:48:23 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id A25231D6C8; Mon, 12 Oct 2020 14:48:20 +0200 (CEST) IronPort-SDR: dU3eaWqojGHffUU75CL2+negebvg1ihyiFDhTp759Gy4zT4Cpdn5Vd6vvvy7tDyY9zxO3Rrb/v +rQ7AM/TxtRg== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="163092709" X-IronPort-AV: E=Sophos;i="5.77,366,1596524400"; d="scan'208";a="163092709" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 05:48:19 -0700 IronPort-SDR: mQvCaCXSTgm1RVpwycnLIioU6UGhh2VnZm9uhjxAeyAKpD8pV9we4E3SNlvsFCPKD1JplvbOp3 CVp8lxb+YGlA== X-IronPort-AV: E=Sophos;i="5.77,366,1596524400"; d="scan'208";a="529940825" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.38.166]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 12 Oct 2020 05:48:18 -0700 Date: Mon, 12 Oct 2020 13:48:14 +0100 From: Bruce Richardson To: dev@dpdk.org Cc: bluca@debian.org, stable@dpdk.org Message-ID: <20201012124814.GD565@bricha3-MOBL.ger.corp.intel.com> References: <20201008170536.124111-1-bruce.richardson@intel.com> <20201009141914.205284-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201009141914.205284-1-bruce.richardson@intel.com> Subject: Re: [dpdk-dev] [PATCH v2] build: skip detecting libpcap via pcap-config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" +CC stable for consideration On Fri, Oct 09, 2020 at 03:19:14PM +0100, Bruce Richardson wrote: > 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. > CC: stable@dpdk.org > Signed-off-by: Bruce Richardson > --- > config/meson.build | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/config/meson.build b/config/meson.build > index 69f2aeb60..9fb903c9b 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -163,11 +163,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.25.1 >