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 824F2A04BC; Fri, 9 Oct 2020 11:09:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E1281C22C; Fri, 9 Oct 2020 11:09:17 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 8F0D71C22B for ; Fri, 9 Oct 2020 11:09:14 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id f21so9043714wml.3 for ; Fri, 09 Oct 2020 02:09:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=KhT8+gjpvnUL6Kzr5sNPwk4qC8UAN10nL/h4TeEnOrA=; b=Y5taPLV+UayyjV6AwbMIeQS5S6TPKXaOprX4pwebeVjyCbra7RMCTbv9/T1/t9ohr9 ZS/jCU+uOXe8rBN8nZGLEGmwFMLH2hj5K2ehf+zqu2bgUVnRS79KuPZXRrLfnXPYzoI9 xLlzKPMaMkeFHkHbCFSh0+p2YWdgXtbkU8xsHph/7ePbTCVU0D7Ng/huRYuWQG0ygqQ9 luAh8dbrzRGDJjFr3AHHTYFNO38PIptkYAVmzZMnq3k9qzNCsdAUvGd+OGnUuquuOBA3 UB/O+KzsW6z5RV8ls0rdCkyCObgPa6250NgmG5rSwKoRkaecrKQiSyaBG37/ibpOfFLV RBLw== X-Gm-Message-State: AOAM530r/KBFcSdrAMj6zyD3j/T/bQKIdDbWdJE0/rpLFBz/1KpTYDjZ qnR2xc6r7lwcI2lyt1dACkk= X-Google-Smtp-Source: ABdhPJwamR1BAbULUwWGLgP74wWs7x5MpWuOwOmrvNIz9LKUe5X/SylVXFx9RDwxWLfZBx7T87g6/A== X-Received: by 2002:a7b:c953:: with SMTP id i19mr12972112wml.52.1602234553283; Fri, 09 Oct 2020 02:09:13 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 67sm10933798wmb.31.2020.10.09.02.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 02:09:12 -0700 (PDT) Message-ID: <4e40d3fa1af950ab760995828c46125211f5960b.camel@debian.org> From: Luca Boccassi To: Bruce Richardson , dev@dpdk.org Date: Fri, 09 Oct 2020 10:09:11 +0100 In-Reply-To: <20201008170805.GF1106@bricha3-MOBL.ger.corp.intel.com> References: <20201008170536.124111-1-bruce.richardson@intel.com> <20201008170805.GF1106@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 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, 2020-10-08 at 18:08 +0100, Bruce Richardson wrote: > 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 lib= rary > > can cause issues when cross-compiling, so we can limit build support fo= r > > pcap versions without a .pc file. > >=20 > > Signed-off-by: Bruce Richardson > > --- > > config/meson.build | 8 +------- > > 1 file changed, 1 insertion(+), 7 deletions(-) > >=20 > > 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 > > =20 > > # check for pcap > > -pcap_dep =3D 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 =3D cc.find_library('pcap', required: false) > > -endif > > +pcap_dep =3D dependency('libpcap', required: false, method: 'pkg-confi= g') > > if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep= ) > > dpdk_conf.set('RTE_PORT_PCAP', 1) > > dpdk_extra_ldflags +=3D '-lpcap' >=20 > 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. >=20 > Does anyone see an issue with limiting our pcap detection to pkg-config > only in this case? >=20 > /Bruce Sadly it's not yet available in Debian stable: https://packages.debian.org/buster/amd64/libpcap0.8-dev/filelist Also for Ubuntu 18.04, it's only available with the bionic-updates repository, and only for the past month - it shipped without it. I'm absolutely keen on using only pkg-config (so much that I did the packaging changes myself to ship it in libpcap-dev [1][2]) but perhaps in the interest of compatibility it's better to wait next year, so that the new Debian stable supports it, and the Ubuntu 18.04 LTS fix had the chance to rollout everywhere? --=20 Kind regards, Luca Boccassi [1] http://changelogs.ubuntu.com/changelogs/pool/main/libp/libpcap/libpcap_= 1.8.1-6ubuntu1.18.04.2/changelog [2] https://metadata.ftp-master.debian.org/changelogs//main/libp/libpcap/li= bpcap_1.9.1-4_changelog