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 67889A0527 for ; Thu, 26 Nov 2020 18:07:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E66A8CA3E; Thu, 26 Nov 2020 18:07:40 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id E90F7C9EA; Thu, 26 Nov 2020 18:07:36 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 76C815C00E2; Thu, 26 Nov 2020 12:07:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 26 Nov 2020 12:07:35 -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=fm2; bh= I9ZgNmuSbgfqhj12tTlGCV+4suxPh5pej+ezSkxthQI=; b=qrG3VLuVVQFPqVNA la9ZIWOwFx685OdJnlX8pZzCh7eFJOmxd7E4BwOAbtUjUud1SqhWOoZo9ZmSDDH4 bX/fLGgiU7eiw2I1ARTGGUaPu67WFci68uTqkf5H4l5IqmuYAgY+mJWl3eHtYf8p RvPc5czKiMd8scJBaNUWLyqtWabCw/QVl9I/i7UbMtW6hWQqOh6SBp5rlzGH7gsn WWIq6nbggIaTrk1nCKEDqpO85ctE+xDirgzb5RAkO0V7l7hwg7Xl/lhwrmvvXBke gv5D9ldtwjK34MF6ULlwcZ7GxiQlNpXOk4f3mW9QNPjWgay7i7CHVgdMh2MySAGD pYk4VA== 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=fm1; bh=I9ZgNmuSbgfqhj12tTlGCV+4suxPh5pej+ezSkxth QI=; b=DwwegwsUHsSQzUR1OjrcBw62eoqDz6leqSkP3P+IbO4y4xXEvlbeWRqFX UTycgsN08iXlNhPmh6g2QQWS/8Ekw7MhyS8kBItmwmZKMwLJ9V5fBZTXUDoBav/1 0C4UH1mG7T5GnJsEXDaxmk9TvS1uDuA/lVR6JRHbLSNmC/BfjhbIkpIM8CJ+XhNJ 7+e+2meY02YuglcPQint2GNHUK2dK+4TT/kUlkS0nsvdGv/xoa5YbEVygi2pCKOB sqGLZSvvAD1A/NMjFogFyWnxFxo4VP1/cZfhj2EQ6wu7J7pLCIUJnJ1cerYLAjCc dZxI3LAGZ/KdNwbl6iUcY2rhO4bNA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudehvddgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght 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 990283064AA6; Thu, 26 Nov 2020 12:07:33 -0500 (EST) From: Thomas Monjalon To: Olivier Matz , Bruce Richardson Cc: stable@dpdk.org, dev@dpdk.org, Harry van Haaren , Keith Wiles , Luca Boccassi Date: Thu, 26 Nov 2020 18:07:32 +0100 Message-ID: <2510990.SFP7MGkWmT@thomas> In-Reply-To: <20201126163703.GH1340@bricha3-MOBL.ger.corp.intel.com> References: <20201126142042.24741-1-olivier.matz@6wind.com> <20201126163226.GZ1898@platinum> <20201126163703.GH1340@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH] app: fix plugin load on static builds 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" 26/11/2020 17:37, Bruce Richardson: > On Thu, Nov 26, 2020 at 05:32:26PM +0100, Olivier Matz wrote: > > Hi Bruce, > > > > Thanks for the feedback. > > > > On Thu, Nov 26, 2020 at 03:28:46PM +0000, Bruce Richardson wrote: > > > On Thu, Nov 26, 2020 at 03:20:42PM +0100, Olivier Matz wrote: > > > > When dpdk is compiled as static libraries, it is not possible > > > > to load a plugin from an application. We get the following error: > > > > > > > > EAL: librte_pmd_xxxx.so: undefined symbol: per_lcore__rte_errno > > > > > > > > This happens because the dpdk symbols are not exported. Add them to the > > > > dynamic symbol table by using '-Wl,--export-dynamic'. This option was > > > > previously present when compiled with Makefiles, it was introduced in > > > > commit f9a08f650211 ("eal: add support for shared object drivers") > > > > > > > > Fixes: 16ade738fd0d ("app/testpmd: build with meson") > > > > Fixes: 89f0711f9ddf ("examples: build some samples with meson") > > > > Cc: stable@dpdk.org > > > > > > > > Signed-off-by: Olivier Matz > > > > --- > > > > > > > > Hi, > > > > > > > > Maybe the patch can be improved: I suppose that --export-dynamic > > > > should only be added in case we are linking in static mode. Any > > > > help about how to do that is welcome. > > > > > > get_option('default_library') == 'static' > > > > > > However, if the flag is harmless in shared linking mode, I don't think we > > > need bother with this. > > > > ok > > > > > > > > > > There is probably a better place to define the default ldflags for > > > > all applications (to factorize between app and example). > > > > > > > > Also, should this flag be advertised in pkg-config? > > > > > > > Perhaps. However, I'm not sure how common it would be for people to static > > > link their own apps with DPDK and then want to plug in extra drivers after > > > the fact? Are there any possible negative impacts to making that change? > > > > I don't know if it is common, but this is something we do :) > > > > > If we weren't right before the release deadline I'd definitely suggest > > > adding it to the pkg-config files. At this late stage in release, I'm more > > > cautious. > > > > Yes, it is too late for 20.11. Maybe even for this patch without > > updating pkg-config. > > > > Well, since this is something clearly broken that is of use to you, I think > we should strive to get some fix for it in. Based on the lateness of the > hour, I think your patch is pretty close to the least-risky option we could > take here. Therefore, despite my previous comment about not needing to > limit the additional linking flag to static-builds only, I would suggest - > out of an abundance of caution - that we do so, and keep the rest of your > patch as-is for 20.11. Thereafter we can look at other possible approaches > and simplifications in 21.02 and backport them. > > So, for your patch with "if get_option('default_library') ..." checks added > appropriately: > > Acked-by: Bruce Richardson The most critical issue is for externally built applications statically linked using external plugins. This patch fixes only internal apps built with meson. I am for keeping the issue as-is for 20.11.0, because it is really too late to change a compilation option. We have already been bitten by compilers not supporting an option or being buggy in specific contexts. I prefer not taking this risk for a fix which helps nobody really.