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 3535DA051C; Tue, 11 Feb 2020 12:36:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 133EE1BDAE; Tue, 11 Feb 2020 12:36:09 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 4BBBD2BF4 for ; Tue, 11 Feb 2020 12:36:08 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D10A021448; Tue, 11 Feb 2020 06:36:07 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 11 Feb 2020 06:36:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=XKzLygB8u1ShIhs2JSSbd3Y4RH0P1b4m4g4i/8ROiXw=; b=p5/r0Vs7ImSo pHUIUQBy1UOCerF3u3arpVTWLtKteBE+6YJ7V2W3NxGFqjz0regNc0a0KmEGsgW0 qKxn58LhwLPxgCoaylYzhYmni5wY+JsoJmlJdqEjlVcM0teMPkfli2/Op+UHPJBO ocS4RNdBf3Ts/LTv/y2XBvI6cSY3Sw8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=XKzLygB8u1ShIhs2JSSbd3Y4RH0P1b4m4g4i/8ROi Xw=; b=Gz6OFxfHsS2wX6a1r5K0Va9ox1+KU3/F3YHKdzJh46zAzhY5eRPob5iMY xtbmEpkrh+sU9yr74aGyjx1C3mdjhbzBTNsceJ8FrgeT4tbAVon6pKCEHGQSTya/ OrFqzmx+5PQq8bqIknJ0CPz9dhs5nHiuXAXLI2d5fWHeQgZptLq6aCjbjybRMtCj 5Z7tVhLOtxbDiOGmbAtMz0yJXTXJnv6wsWp6v+jbbZqg+YZuAbMETZgsS0AjWzUC 1zdcv8pfjuHl2Wp1crQZzSREbdRKtxARMjaiVw6PMGWNHA2Buobiki2NsQ3nwpXX W5Q6h2RQLHW48xUeHcFxAfNw17QxA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrieefgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucffoh hmrghinhepghhithhhuhgsrdgtohhmnecukfhppeejjedrudefgedrvddtfedrudekgeen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomh grshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2727F30607B0; Tue, 11 Feb 2020 06:36:07 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko Date: Tue, 11 Feb 2020 12:36:06 +0100 Message-ID: <10758925.RiKt1P0BV1@xps> In-Reply-To: <20200211112951.GA823@bricha3-MOBL.ger.corp.intel.com> References: <20200127154402.4008069-1-thomas@monjalon.net> <20200211011942.1569573-4-thomas@monjalon.net> <20200211112951.GA823@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 3/5] net/mlx: workaround static linkage with meson 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" 11/02/2020 12:29, Bruce Richardson: > On Tue, Feb 11, 2020 at 02:19:40AM +0100, Thomas Monjalon wrote: > > If ibverbs_link is static and the application choose to link DPDK > > as static libraries, both PMD and ibverbs libraries must be linked > > as static libraries. And the dependencies of ibverbs (netlink) must > > still be linked as shared libraries. > > > > Unfortunately, meson forget about the static requirement for ibverbs > > when generating the .pc file. > > As a result, libibverbs, libmlx4, libmlx5 are listed in Requires.private > > section (allowing to be linked as shared libraries) and libnl is missing. > > > > A fix is in progress for meson, but anyway we will have to live without > > such a fix until a better version of meson is widely available: > > https://github.com/mesonbuild/meson/pull/6393 > > > > In order to avoid meson suggesting shared libraries in the section > > Requires.private of the .pc file, the dependency object is recreated > > with declare_dependency(): > > - cflags are extracted the libibverbs.pc > > - ldflags, from libibverbs.pc, are processed to force > > static flavor of ibverbs libraries, thanks to this syntax: > > -l:libfoo.a > > > > Fixes: 83fff714bd27 ("net/mlx: add static ibverbs linkage with meson") > > > > Signed-off-by: Thomas Monjalon > > Signed-off-by: Bruce Richardson > > --- > > +if build and static_ibverbs > > + # Build without adding shared libs to Requires.private > > + ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout() > > + ext_deps += declare_dependency(compile_args: ibv_cflags.split()) > > + # Add static deps ldflags to internal apps and Libs.private > > + ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout() > > + ext_deps += declare_dependency(link_args:ibv_ldflags.split()) > > +endif > > Is there a reason for specfiying two dependencies, rather than putting both > cflags and ldflags into the one dependency object? Yes, the reason is the patch for dlopen which needs cflags only.