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 D9C05A04BC; Fri, 9 Oct 2020 16:54:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D3991D5B1; Fri, 9 Oct 2020 16:54:07 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 1091E1D5AC for ; Fri, 9 Oct 2020 16:54:06 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id n15so10617267wrq.2 for ; Fri, 09 Oct 2020 07:54:06 -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=RZTxxeTeoCxeQNytBeD8Suau+U/Vn6CMHJRsZuDOzEQ=; b=oMUXWgMAInZxAu+omYybVDjcior2LfLAm1WJhkVD27GaiIBguqzAVtAuSvxyaQy2EI 3K97OwnnNl7GX+99yq/yCdbmSCY35AZyjR+693siLBEupiSj66ym4dbE4bDF7JR8xrp6 OtEZd+tzdSl++AbQPvODcVy7xJ5A1d7Sj/q3QRqULkj0oJ8P+/1Bp2PM2T737UPG/FYq /D03VTzabAi9zfE12KhS2+FxqP+rIEDu3KygSo0iVsEOhkJoLI4ES4icqi9wnSL1t2i/ VTbc24ApOA8WrODBlQPlRQN4Ly2vvwxUTIIxJBQyXwFsK//pf9Z8Iv7BuaZ32YnBwUEt /ppw== X-Gm-Message-State: AOAM530R9L7NXRUYlYyxxGIhDjd0SwYZZQG7voWRHyRi4jhd+/DEd1hM iWTjgRz+2RO7GCOy0uRYadw= X-Google-Smtp-Source: ABdhPJwc9VZJeg3zL3sIr0AiYVxa9kosXC1Bu1l7jFlceZ7cYI+ar+/NTLnvgF+aBmQPG2QajrKLKA== X-Received: by 2002:adf:8541:: with SMTP id 59mr15518005wrh.61.1602255244673; Fri, 09 Oct 2020 07:54:04 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id s6sm12775875wrg.92.2020.10.09.07.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 07:54:03 -0700 (PDT) Message-ID: From: Luca Boccassi To: Bruce Richardson , dev@dpdk.org Date: Fri, 09 Oct 2020 15:54:03 +0100 In-Reply-To: <20201009141914.205284-1-bruce.richardson@intel.com> References: <20201008170536.124111-1-bruce.richardson@intel.com> <20201009141914.205284-1-bruce.richardson@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] [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" On Fri, 2020-10-09 at 15:19 +0100, Bruce Richardson wrote: > When compiling for a slightly different architecture, e.g. 32-bit on 64-b= it > systems using CFLAGS rather than a cross-file, the pcap-config utility ca= n > 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. >=20 > 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. >=20 > Signed-off-by: Bruce Richardson > --- > config/meson.build | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) >=20 > 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 > =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 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 =3D cc.find_library('pcap', required: false) > endif > if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) Reviewed-by: Luca Boccassi --=20 Kind regards, Luca Boccassi