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 8D6A1A04BC; Thu, 8 Oct 2020 19:08:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C24CC1BA9F; Thu, 8 Oct 2020 19:08:13 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 1C48F1BA9E for ; Thu, 8 Oct 2020 19:08:11 +0200 (CEST) IronPort-SDR: NNEPx2ndHLk64ehcKxzI7iXl6FHHFR0CqvhEpkoVS+l+lu3b2rT1nzcST5q+E11VETJvrmk8LB iMeYLeHCdAKw== X-IronPort-AV: E=McAfee;i="6000,8403,9768"; a="229559533" X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="229559533" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 10:08:10 -0700 IronPort-SDR: hjZfNEm6BZMusvNFRJvXy2/1HN3nmK1e+VUyTU1+SKF4LaYzoeq6zOPLdJP9g6UbnmibtLsz8M d3GNmSAOQOMw== X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="528570830" Received: from bricha3-mobl.ger.corp.intel.com ([10.213.226.107]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 08 Oct 2020 10:08:09 -0700 Date: Thu, 8 Oct 2020 18:08:05 +0100 From: Bruce Richardson To: dev@dpdk.org Cc: bluca@debian.org Message-ID: <20201008170805.GF1106@bricha3-MOBL.ger.corp.intel.com> References: <20201008170536.124111-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201008170536.124111-1-bruce.richardson@intel.com> Subject: Re: [dpdk-dev] [RFC PATCH] build: use libpcap only from pkg-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" On Thu, Oct 08, 2020 at 06:05:36PM +0100, Bruce Richardson wrote: > 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 > --- > 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' Just sending this as an RFC for consideration, since I hit problems with the pcap code when testing 32-bit (x32) builds, and remembered having hit it previously too. Does anyone see an issue with limiting our pcap detection to pkg-config only in this case? /Bruce