From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 26ED31B922; Fri, 11 Jan 2019 16:49:16 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2019 07:49:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,466,1539673200"; d="scan'208";a="133726710" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.54]) by fmsmga002.fm.intel.com with SMTP; 11 Jan 2019 07:49:14 -0800 Received: by (sSMTP sendmail emulation); Fri, 11 Jan 2019 15:49:13 +0000 Date: Fri, 11 Jan 2019 15:49:13 +0000 From: Bruce Richardson To: Luca Boccassi Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20190111154912.GA10780@bricha3-MOBL.ger.corp.intel.com> References: <20190103175725.5836-1-bluca@debian.org> <20190103175725.5836-2-bluca@debian.org> <20190107142812.GB14912@bricha3-MOBL.ger.corp.intel.com> <1546879174.6022.24.camel@debian.org> <20190107165552.GA23828@bricha3-MOBL.ger.corp.intel.com> <1547205028.4501.9.camel@debian.org> <20190111115254.GA3336@bricha3-MOBL.ger.corp.intel.com> <1547210363.4501.10.camel@debian.org> <20190111142440.GA15912@bricha3-MOBL.ger.corp.intel.com> <1547218588.4501.14.camel@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1547218588.4501.14.camel@debian.org> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 2/2] build: use dependency() instead of find_library() 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: , X-List-Received-Date: Fri, 11 Jan 2019 15:49:18 -0000 On Fri, Jan 11, 2019 at 02:56:28PM +0000, Luca Boccassi wrote: > On Fri, 2019-01-11 at 14:24 +0000, Bruce Richardson wrote: > > On Fri, Jan 11, 2019 at 12:39:23PM +0000, Luca Boccassi wrote: > > > On Fri, 2019-01-11 at 11:52 +0000, Bruce Richardson wrote: > > > > On Fri, Jan 11, 2019 at 11:10:28AM +0000, Luca Boccassi wrote: > > > > > On Mon, 2019-01-07 at 16:55 +0000, Bruce Richardson wrote: > > > > > > On Mon, Jan 07, 2019 at 04:39:34PM +0000, Luca Boccassi > > > > > > wrote: > > > > > > > On Mon, 2019-01-07 at 14:28 +0000, Bruce Richardson wrote: > > > > > > > > On Thu, Jan 03, 2019 at 06:57:25PM +0100, Luca Boccassi > > > > > > > > wrote: > > > > > > > > > For libbsd, which is checked in a top level file and > > > > > > > > > used > > > > > > > > > to be > > > > > > > > > added > > > > > > > > > to the global linker flags array, add it to the > > > > > > > > > ext_deps > > > > > > > > > array > > > > > > > > > of > > > > > > > > > all top level meson files (app, test, lib, examples, > > > > > > > > > drivers). > > > > > > > > > The > > > > > > > > > most correct change would be to let each individual > > > > > > > > > library/driver/app > > > > > > > > > depend on it individually if they use symbols from it, > > > > > > > > > but > > > > > > > > > it > > > > > > > > > would > > > > > > > > > diverge from the legacy Makefile's behaviour and make > > > > > > > > > life > > > > > > > > > a > > > > > > > > > bit > > > > > > > > > more > > > > > > > > > difficult for contributors. > > > > > > > > > > > > > > > > It shouldn't be necessary to add libbsd as a dependency > > > > > > > > for > > > > > > > > everything. I > > > > > > > > think just adding it as a dependency of EAL should work > > > > > > > > fine.  > > > > > > > > > > > > > > Won't that mean that the shared libraries other than EAL > > > > > > > will > > > > > > > have > > > > > > > undefined references? > > > > > > > > > > > > Should not happen. AFAIK when you link against a library in > > > > > > meson > > > > > > it > > > > > > will > > > > > > also link against any of that libraries dependencies too. For > > > > > > shared > > > > > > libraries meson always disallowed undefined references in the > > > > > > linker > > > > > > commandline. [To have libs with undefined refs, e.g. plugins, > > > > > > you > > > > > > need to > > > > > > use "shared_module" rather than "shared_library" command]. > > > > > > > > > > Looked at this again, and rte_cmdline is using strlcpy as well, > > > > > and > > > > > it's built before rte_eal, so it fails: > > > > > > > > > > lib/76b5a35@@rte_cmdline@sta/librte_cmdline_cmdline_parse.c.o: > > > > > In > > > > > function `cmdline_complete': > > > > > cmdline_parse.c:(.text+0x861): undefined reference to `strlcpy' > > > > > > > > > > Adding it to ext_deps in both rte_cmdline and rte_eal works. Is > > > > > that an acceptable compromise? > > > > > > > > > > > > > Sure. If eal has a dependency on cmdline, you probably don't need > > > > to > > > > add it > > > > as an external dependency to EAL too, but it doesn't really hurt > > > > to > > > > do so. > > > > > > > > /Bruce > > > > > > eal does not depend on cmdline, so added in both in v2. I also > > > split > > > the libbsd change and meson bump to 0.47.1 in a separate commit in > > > the > > > series. > > > > > > --  > > > > If there is no dependency, why is it being built first? > > Comment says "ethdev depends on cmdline for parsing functions" > > https://git.dpdk.org/dpdk/tree/lib/meson.build#n12 > > -- So it looks like it could be placed between EAL and ethdev. Not a bit deal either way, so I'm happy enough to leave it as-is for now. /Bruce