From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B6453A00E6 for ; Thu, 18 Apr 2019 11:25:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8661F1B92B; Thu, 18 Apr 2019 11:25:24 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id CA6471B8C4; Thu, 18 Apr 2019 11:25:21 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id y197so2047886wmd.0; Thu, 18 Apr 2019 02:25:21 -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:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=QsMPdMc0wnShhw7fC1P7raKfBfafC13ZyumyrYhduek=; b=iORuo6U63qrl2XdxmhiXkf/HuI73rwq2BZh43S6jY88WFzlXgRgZrcMOJlKG2wrCrV kDJLZi+mXrElE0rOE8rp/j7vNl6WE679rSdAV7zLREx5DIs7+IgDY9Vem+T1Ejjt0/0G Wp+Y/5n37WzlCLqlUh6RrivFe4dI+X/N12bVG4HKXUDfulkkpddgvPamJ4oFduVc1y/S NHtJanWM33bKYtnzbZmWk1S/ndLY2kMGBtJYA8Wj8JOIFjLasSr7De7Ta0/iq4bg02fW pPyFGcYFdnwrtmrS7TD7hAkmMkZc9Ox/xjnE4/sPKDcNJAMBdR7BY1oy+QVLHPhhNA0L CoTg== X-Gm-Message-State: APjAAAVJRSBkSzwbsRw1+tzWx2tS0fbWBph7tcJlG0n9scSEoQ9ggADN zYM2SFEnZ1hQLp9iO9fKvvQ= X-Google-Smtp-Source: APXvYqzxFjFyfdeAR/N8Xw+6N2hZ77oivzHAzQWh/oJABL9RdwDOmUfYSZTx6jAT7qkJu0RbQ3cmWA== X-Received: by 2002:a1c:c18d:: with SMTP id r135mr2238540wmf.112.1555579521300; Thu, 18 Apr 2019 02:25:21 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id r30sm4161655wrr.46.2019.04.18.02.25.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2019 02:25:20 -0700 (PDT) Message-ID: <269e446ebbc3696429f73e153c769daf9c4ccced.camel@debian.org> From: Luca Boccassi To: Yongseok Koh Cc: Bruce Richardson , Jerin Jacob Kollanukkaran , Pavan Nikhilesh Bhagavatula , Shahaf Shuler , dev , Thomas Monjalon , "Gavin Hu (Arm Technology China)" , Honnappa Nagarahalli , "stable@dpdk.org" Date: Thu, 18 Apr 2019 10:25:19 +0100 In-Reply-To: <73A9F0FA-6EDC-4D46-BF28-F60915D333B4@mellanox.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> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Mon, 2019-04-15 at 19:48 +0000, Yongseok Koh wrote: > Hi, >=20 >=20 >=20 > Thanks, > Yongseok >=20 > > On Apr 15, 2019, at 3:12 AM, Luca Boccassi < > > bluca@debian.org > > > wrote: > >=20 > > 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. > > >=20 > > > Fixes: e30b4e566f47 ("build: improve dependency handling") > > > Cc:=20 > > > bluca@debian.org > > >=20 > > >=20 > > > Cc:=20 > > > stable@dpdk.org > > >=20 > > >=20 > > >=20 > > > Signed-off-by: Yongseok Koh < > > > yskoh@mellanox.com > > >=20 > > >=20 > > > --- > > > drivers/net/mlx4/meson.build | 19 +++++++++++-------- > > > drivers/net/mlx5/meson.build | 19 +++++++++++-------- > > > 2 files changed, 22 insertions(+), 16 deletions(-) > > >=20 > > > 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=3D"@0@"'.format(LIB_GLUE_VERSION), > > > ] > > > endif > > > -libs =3D [ > > > - dependency('libmnl', required:false), > > > - dependency('libmlx4', required:false), > > > - dependency('libibverbs', required:false), > > > -] > > > +libs =3D [ 'libmnl', 'libmlx4', 'libibverbs' ] > > > +lib_deps =3D [] > > > build =3D true > > > foreach lib:libs > > > - if not lib.found() > > > + lib_dep =3D dependency(lib, required:false) > > > + if not lib_dep.found() > > > + lib_dep =3D cc.find_library(lib, required:false) > >=20 > > Doesn't this end up trying to link the test program to -llibmnl and > > thus failing? >=20 > 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 ? --=20 Kind regards, Luca Boccassi