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 6CF45A0526; Tue, 10 Nov 2020 12:25:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F23772B9D; Tue, 10 Nov 2020 12:25:18 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by dpdk.org (Postfix) with ESMTP id 7CD39F90 for ; Tue, 10 Nov 2020 12:25:17 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 73007E99; Tue, 10 Nov 2020 06:25:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 10 Nov 2020 06:25:15 -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= xm4+LU+Ps+4jUHJsVTMhLPeOkYHnHaUpAu2G9FVJa04=; b=vpM4Fzv/XylMTRCX x8QHNZClYj0+JpAYnH7Pz/SXWdp7cdEhkI46LYWyYi84V7nJLY86l5XGp/128rtN +d86OP2NsxCtINdOkCzahDl+WPe9AUZOdwuYj1qypzL2vCC44vi0G403ud49kZC4 tBStZr3pGMdGaNN+/JHHZxpPI21m3XHUHrmvfM+xJIs+HYX8U7/+HFgiF0ncqStG K+506fExlUzq1Ik/yyPTw6XrjiQRNu9kpo4OxyGlhLjKM7ylicRRhb4a3zI1R/ok C4MpYSM4+2yvs1gyFdqqP10RXDxDJcFDzLuqwzjqlElAYedoHUpy9OQ6+ms/2eIM 4zxqkQ== 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=xm4+LU+Ps+4jUHJsVTMhLPeOkYHnHaUpAu2G9FVJa 04=; b=TCs1Z14yvAtk3sXBnFavsWagfb3uLiFCPiqJS5YKCOah8yfW74L45fkMC UAF8O2pfOQ3qPvzTQrHpi412nVoUE0vNckP5K3lyKBQlf7+5ltct/MVwDEnRFxzK vb40SkJ5u/kBnQ9Lypip4hNaPZUxOJDOKdFKs6Fn30Ruq20j25aortzrlQhCmv3O oWUBynhZVDfNn3JqxFg1tkKC5J1Zdz3ilHwaTtacTHItK/zBNOLO+/Y5uYJB5M4K 3jQvFzUgNdmE4tO2M5ikI/ic4lSLJnkeWsxXMxstGXS+8hsvxXvvHXxieY32icEP yHy8uEcQU3QCxgkZZsyIyxjt9F+fA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddujedgvdejucetufdoteggodetrfdotf 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 2CEE53280060; Tue, 10 Nov 2020 06:25:14 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, david.marchand@redhat.com Date: Tue, 10 Nov 2020 12:25:13 +0100 Message-ID: <2594616.PNtlxbl9Qa@thomas> In-Reply-To: <20201110100851.GA1641@bricha3-MOBL.ger.corp.intel.com> References: <20201027173836.891184-1-bruce.richardson@intel.com> <5825181.Lnf5Olbaf0@thomas> <20201110100851.GA1641@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] devtools/test-meson-builds: allow custom set of examples 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" 10/11/2020 11:08, Bruce Richardson: > On Mon, Nov 09, 2020 at 08:26:10PM +0100, Thomas Monjalon wrote: > > 09/11/2020 19:02, Bruce Richardson: > > > On Mon, Nov 09, 2020 at 06:09:51PM +0100, Thomas Monjalon wrote: > > > > 27/10/2020 18:38, Bruce Richardson: > > > > > To test the installation process of DPDK using "ninja install" > > > > > test-meson-builds.sh builds a subset of the examples using "make". > > > > > To allow more flexibility for people testing, allow the set of > > > > > examples chosen for this make test to be overridden using variable > > > > > "DPDK_BUILD_TEST_EXAMPLES" in the environment. > > > > > > > > > > Since a number of example apps link against drivers directly even > > > > > for shared builds, we need to ensure that LD_LIBRARY_PATH points to > > > > > the main DPDK lib folder so any dependencies of those drivers can > > > > > be found e.g. that the PCI/vdev bus driver .so is found. [All > > > > > drivers are symlinked from drivers dir back to lib dir on install, > > > > > so only one dir rather than two is needed in the path.] > > > > [...] > > > > > +libdir=$(dirname $(find $DESTDIR -name librte_eal.so)) +export > > > > > LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH > > > > > > > > I don't get why libdir is required for some examples, and not for > > > > others? The pkg-config file is not enough? > > > > > > > > > > It's only needed for examples that link against drivers directly. > > > > > > I believe it's needed in those cases, because app linker flags > > > (including e.g. -lrte_pmd_bond) occur before the pkg-config flags, > > > which means that the linker at that point does not have the path to > > > find the dependencies of the driver. [In a normal build, this wouldn't > > > be necessary because the library directory would be a standard path] > > > > If it's just a matter of ordering, it would be a better example to fix > > the ordering in the Makefile, isn't it? > > > > I thought about that, but it seems strange to have the DPDK linker flags > appear before the application specific flags. The general style is to have > the apps own linker flags apply first, and then the list of dependencies, > so that any app linker flags take precedence. The other option is to have > two separate LDFLAG variables for the app, one for before pkg-config flags > and the other afterwards, but that is an untidy solution. > > Therefore, I think it's better to keep the ordering in the examples as-is > and just set the library path in the script. It's only a single extra > assignment that is necessary because we are installing to a non-standard > path using DESTDIR. It is OK to add LD_LIBRARY_PATH in test-meson-builds.sh because DPDK is "installed" with a DESTDIR prefix. But this change is unrelated to test more examples, it is a general fix for examples compilation. The thing I'm missing, as I said above, "why libdir is required for some examples, and not for others?" I feel something wrong made linking work where it should not.