From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6B02C10F0E for ; Thu, 18 Apr 2019 10:14:59 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 67AD1214DA for ; Thu, 18 Apr 2019 10:14:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67AD1214DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B9CC41B942; Thu, 18 Apr 2019 12:14:57 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E27871B92D; Thu, 18 Apr 2019 12:14:55 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2019 03:14:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,365,1549958400"; d="scan'208";a="143917204" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.220.103]) by fmsmga007.fm.intel.com with SMTP; 18 Apr 2019 03:14:51 -0700 Received: by (sSMTP sendmail emulation); Thu, 18 Apr 2019 11:14:51 +0100 Date: Thu, 18 Apr 2019 11:14:51 +0100 From: Bruce Richardson To: Luca Boccassi Cc: Yongseok Koh , Jerin Jacob Kollanukkaran , Pavan Nikhilesh Bhagavatula , Shahaf Shuler , dev , Thomas Monjalon , "Gavin Hu (Arm Technology China)" , Honnappa Nagarahalli , "stable@dpdk.org" Message-ID: <20190418101450.GA1817@bricha3-MOBL.ger.corp.intel.com> References: <20190412232451.30197-1-yskoh@mellanox.com> <20190412232451.30197-4-yskoh@mellanox.com> <27a65b1d1737f475a6e32d5c3947d1c2b81d37fb.camel@debian.org> <73A9F0FA-6EDC-4D46-BF28-F60915D333B4@mellanox.com> <269e446ebbc3696429f73e153c769daf9c4ccced.camel@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <269e446ebbc3696429f73e153c769daf9c4ccced.camel@debian.org> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH 3/6] net/mlx: fix library search in meson build 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, Apr 18, 2019 at 10:25:19AM +0100, Luca Boccassi wrote: > On Mon, 2019-04-15 at 19:48 +0000, Yongseok Koh wrote: > > Hi, > > > > > > > > Thanks, > > Yongseok > > > > > On Apr 15, 2019, at 3:12 AM, Luca Boccassi < > > > bluca@debian.org > > > > wrote: > > > > > > On Fri, 2019-04-12 at 16:24 -0700, Yongseok Koh wrote: > > > > If MLNX_OFED is installed, there's no .pc file installed for > > > > libraries and > > > > dependency() can't find libraries by pkg-config. By adding > > > > fallback > > > > of > > > > using cc.find_library(), libraries are properly located. > > > > > > > > Fixes: e30b4e566f47 ("build: improve dependency handling") > > > > Cc: > > > > bluca@debian.org > > > > > > > > > > > > Cc: > > > > stable@dpdk.org > > > > > > > > > > > > > > > > Signed-off-by: Yongseok Koh < > > > > yskoh@mellanox.com > > > > > > > > > > > > --- > > > > drivers/net/mlx4/meson.build | 19 +++++++++++-------- > > > > drivers/net/mlx5/meson.build | 19 +++++++++++-------- > > > > 2 files changed, 22 insertions(+), 16 deletions(-) > > > > > > > > diff --git a/drivers/net/mlx4/meson.build > > > > b/drivers/net/mlx4/meson.build > > > > index de020701d1..9082f69f25 100644 > > > > --- a/drivers/net/mlx4/meson.build > > > > +++ b/drivers/net/mlx4/meson.build > > > > @@ -13,21 +13,24 @@ if pmd_dlopen > > > > '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION), > > > > ] > > > > endif > > > > -libs = [ > > > > - dependency('libmnl', required:false), > > > > - dependency('libmlx4', required:false), > > > > - dependency('libibverbs', required:false), > > > > -] > > > > +libs = [ 'libmnl', 'libmlx4', 'libibverbs' ] > > > > +lib_deps = [] > > > > build = true > > > > foreach lib:libs > > > > - if not lib.found() > > > > + lib_dep = dependency(lib, required:false) > > > > + if not lib_dep.found() > > > > + lib_dep = cc.find_library(lib, required:false) > > > > > > Doesn't this end up trying to link the test program to -llibmnl and > > > thus failing? > > > > I also worried about that. But it works fine. > > Looks meson is smart enough. :-) > > Sorry, not to be skeptical, but at least with the meson version I was > using when doing something similar I'm sure this didn't work - > find_library just takes the parameter, adds "-l" in front of it and > uses it to compile. > > In the meson configure log, do you see: > > Dependency libmlx4 found: NO > Library libmlx4 found: YES > My understanding was the same as yours, Luca, and I'm pretty sure older versions used to have that restriction. I think we should - out of an abundance of caution - remove the "lib" prefix from all library/dependency requests. /Bruce