From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 796361B6CB; Fri, 11 Jan 2019 17:27:55 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id v13so15828677wrw.5; Fri, 11 Jan 2019 08:27:55 -0800 (PST) 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:mime-version; bh=U0Y4s3taFKuJ/12/1I8FUrQ0CqQENcmoOmfvi+xzxWg=; b=O6aKT7dCEPbSxEf4JXDKBmE/q00N4vZNF0fRxgY3XMU1q1JzeuvuFiwMEnscX28WHW XBu3OL7zvBDYIULzVDfDyNDZwTOP0prYH4rg24Tg53aMxW5PyOScJqqbb0Ps4wWc2ocS QlbsXXlcleAn1Oa0r4VNgk/MWlW0r2dH+g7HJVd7xQGIGh95WyHrR4K2J78zG7Zc4H8Y K3j76Ei9Sx8K7b25HCNpiE3aua0DQZzmXPgJFr04bCcgWJ+sAfe/FrnoN9gL6NOXm+Wo WzKWe4gwSZOrTveLtiy6DN8vrg93xChIEv16P/WMGo84udfigeuGy9YFIFm/CsK6oyeY aBkg== X-Gm-Message-State: AJcUukdbmsFZ+Cz12gLbIBPSAaFnzDvKK5oo+TkYudiBkFJgdBeDcdmx m3T6SdiZ6BoKAcuP+Gm8XZn2Pz2EV9o= X-Google-Smtp-Source: ALg8bN7h5dvf/Y81A6OMt1snu9PM0ZqO25Mnxd8x2TKunsbR/et7cRLmn5cD+vd1tyAoutLJoS2ReQ== X-Received: by 2002:a5d:4512:: with SMTP id s18mr14873665wrq.182.1547224075135; Fri, 11 Jan 2019 08:27:55 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id t18sm14673976wmt.35.2019.01.11.08.27.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 08:27:54 -0800 (PST) Message-ID: <1547224073.4501.19.camel@debian.org> From: Luca Boccassi To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org Date: Fri, 11 Jan 2019 16:27:53 +0000 In-Reply-To: <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> <20190111154912.GA10780@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 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 16:27:55 -0000 On Fri, 2019-01-11 at 15:49 +0000, Bruce Richardson wrote: > 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. > > > > > > > > >=20 > > > > > > > > > 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.=C2=A0 > > > > > > > >=20 > > > > > > > > Won't that mean that the shared libraries other than > > > > > > > > EAL > > > > > > > > will > > > > > > > > have > > > > > > > > undefined references? > > > > > > >=20 > > > > > > > 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]. > > > > > >=20 > > > > > > Looked at this again, and rte_cmdline is using strlcpy as > > > > > > well, > > > > > > and > > > > > > it's built before rte_eal, so it fails: > > > > > >=20 > > > > > > lib/76b5a35@@rte_cmdline@sta/librte_cmdline_cmdline_parse.c > > > > > > .o: > > > > > > In > > > > > > function `cmdline_complete': > > > > > > cmdline_parse.c:(.text+0x861): undefined reference to > > > > > > `strlcpy' > > > > > >=20 > > > > > > Adding it to ext_deps in both rte_cmdline and rte_eal > > > > > > works. Is > > > > > > that an acceptable compromise? > > > > > >=20 > > > > >=20 > > > > > 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. > > > > >=20 > > > > > /Bruce > > > >=20 > > > > 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. > > > >=20 > > > > --=C2=A0 > > >=20 > > > If there is no dependency, why is it being built first? > >=20 > > Comment says "ethdev depends on cmdline for parsing functions" > >=20 > > https://git.dpdk.org/dpdk/tree/lib/meson.build#n12 > >=20 > > --=C2=A0 >=20 > 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. >=20 > /Bruce Reordering seems to work just fine, so I'll just go ahead and add another patch for it in v3. --=20 Kind regards, Luca Boccassi