From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id CDA491B505; Mon, 7 Jan 2019 17:39:36 +0100 (CET) Received: by mail-wr1-f65.google.com with SMTP id q18so1076650wrx.9; Mon, 07 Jan 2019 08:39:36 -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=PaKi8q7CPKz4/w275whJ6wUzS5oB0SEZesRy/SzZ0LY=; b=NFflZUylLkF4H1FhIMr/og2uZbw2mzMNG0dOpYlPSDGUxOBVqUMYsPj0j7O8n+ZFYP 9IBGemOSCZrKE5A5EJd7Z7YrFfyyf96Np66491nMrlU7afqYTb7O/dUXJv/xhFTq2YFh 5pU6SS7FD8MLH4Jr1umSjXzyvZgVPxDEy9bSI/FZwwu/2C6eDcK/c+5vFh44CU/5pfl0 8VGwTOlsChOov0HrMyQu7GZ5OQYFP1Tiy2DNJ8Airvj1mwy8HKiMVUPCzFNELtdHL2Tu HeZaXWZjc/X0D6JwQxFJ8RrbTWIeb2SKGuAeSYmekGGpcS9R+nt4maAtYHfuUjEMwZBh UF3g== X-Gm-Message-State: AJcUukcSy7kRb9atvX2lMLqK+0gAIxU5fTMB2xkXpZc4MWIDuAfWbgIf 1KV1NVXvoGbRttdOhvlD2Tc= X-Google-Smtp-Source: ALg8bN63TFKoMt9Sv4B1aMNGkcwbwOpB0sXWs8hpai+plYw3OsFdnL3OcoglOOwJc3lEAaNuE8wddg== X-Received: by 2002:a05:6000:51:: with SMTP id k17mr49610974wrx.259.1546879176221; Mon, 07 Jan 2019 08:39:36 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id e17sm44098625wrs.79.2019.01.07.08.39.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Jan 2019 08:39:35 -0800 (PST) Message-ID: <1546879174.6022.24.camel@debian.org> From: Luca Boccassi To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org Date: Mon, 07 Jan 2019 16:39:34 +0000 In-Reply-To: <20190107142812.GB14912@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> 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] [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: Mon, 07 Jan 2019 16:39:36 -0000 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: > > Whenever possible (if the library ships a pkg-config file) use > > meson's > > dependency() function to look for it, as it will automatically add > > it > > to the Requires.private list if needed, to allow for static builds > > to > > succeed for reverse dependencies of DPDK. Otherwise the recursive > > dependencies are not parsed, and users doing static builds have to > > resolve them manually by themselves. > > When using this API avoid additional checks that are superfluos and > > take extra time, and avoid adding the linker flag manually which > > causes > > it to be duplicated. > >=20 > > An internal checker has been added to Meson 0.42 to detect libpcap, > > which ships a custom tool rather than a pkg-config file, so bump > > the > > minimum Meson version from 0.41 to 0.42. >=20 > If we are going to bump the version, I think we should bump it > further to > e.g. 0.46 or 0.47 unless there is anyone who still wants an earlier > version. That should get rid of a number of the meson version > warnings we > see on each run. The distros situation, as far as I can see: Debian 10 0.49 Ubuntu 18.04 LTS 0.45 Ubuntu 18.10 0.47 Fedora 27 0.43 Fedora 28 0.45 SUSE Leap 15 0.46 FreeBSD 10 0.46 CentOS 7 0.47 So by bumping to 0.47, required to fix the bug below, we'd leave behind a fair few distros. Now for me it's fine to go to 0.47 - but I think the CC to stable should then be removed. > >=20 > > 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.=20 Won't that mean that the shared libraries other than EAL will have undefined references? Now, in practice it would be fine because I'm pretty sure none of them can and would actually be used without EAL, so when linking executables everything will be fine, but for example the Debian build tools will at the very least print warnings if a shared library links > However, in > conjunction with meson version checks, I believe this was done this > way > originally because of a meson bug which caused recursive dependencies > for > things like this to get duplicated many times in the build.ninja > file. >=20 > https://github.com/mesonbuild/meson/issues/2150 >=20 > If we take the approach of adding bsd explicitly using dependency > object > our minimum version needs to have the fix for this bug included. Ah that's not nice. Just verified, and it happens with dependency() as well as find_library(). It was fixed in 0.47.1. > >=20 > > Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja > > builds") > > Cc: stable@dpdk.org > >=20 > > Signed-off-by: Luca Boccassi > > --- > >=20 > > Bruce, dependency() by default tries pkg-config first, then cmake, > > then > > the internal project-specific finders (like pcap). If you think > > it's > > worth it I can add fallbacks in case a system, for whatever reason, > > does not install a pc file despite the upstream project providing > > one. > > It would add more clutter and more verbosity, but it would not > > cause > > other issues. >=20 > I'd prefer to keep it without that for now. If the lack of .pc files > causes > issues we can revisit. >=20 > /Bruce Ok. --=20 Kind regards, Luca Boccassi