DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Luca Boccassi <bluca@debian.org>
Cc: dev@dpdk.org, stable@dpdk.org, techboard@dpdk.org
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH 2/2] build: use dependency() instead of find_library()
Date: Mon, 7 Jan 2019 16:55:52 +0000	[thread overview]
Message-ID: <20190107165552.GA23828@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <1546879174.6022.24.camel@debian.org>

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:
> > > 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.
> > > 
> > > 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.
> > 
> > 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.
> 

Looking at the list probably 0.45 is safe for now. The follow-up question
is whether expecting people to get updated meson using pip is reasonable.
If it is, then I'm all in favour of bumping min to 0.47.1 and taking in
your changes below.

> > > 
> > > 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].

> 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.
> > 
> > https://github.com/mesonbuild/meson/issues/2150
> > 
> > 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.
> 

Yep, it was a right royal pain when I was doing the original work. Now that
there is a fix in, we can do cleanups like you suggest if we are prepared
to bump our minimum version.

I'll refer back to the key question here:
"Is it reasonable to ask users compiling DPDK to pull meson from pip rather
than using the distro built-in version?"
[Adding techboard on CC, in the hopes they might have some thoughts]

If it is ok for most folks, and personally I don't think it's a big deal,
then that gives us a faster path forward. If not, we raise the minimum more
slowly, and keep the existing way of managing the dependencies for a while
longer. Worst case, I'd still hope by 19.11 LTS for us to have minimum
0.47.1 to have the fix in question.

/Bruce

  reply	other threads:[~2019-01-07 16:55 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03 17:57 [dpdk-dev] [PATCH 1/2] build: use static deps of libs for pkg-config libs.private Luca Boccassi
2019-01-03 17:57 ` [dpdk-dev] [PATCH 2/2] build: use dependency() instead of find_library() Luca Boccassi
2019-01-07 14:28   ` Bruce Richardson
2019-01-07 16:39     ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
2019-01-07 16:55       ` Bruce Richardson [this message]
2019-01-07 17:03         ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon
2019-01-07 17:45           ` [dpdk-dev] [dpdk-stable] [dpdk-techboard] " Thomas Monjalon
2019-01-07 21:09             ` Luca Boccassi
2019-01-07 22:03               ` Luca Boccassi
2019-01-11 11:10         ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
2019-01-11 11:52           ` Bruce Richardson
2019-01-11 12:39             ` Luca Boccassi
2019-01-11 14:24               ` Bruce Richardson
2019-01-11 14:56                 ` Luca Boccassi
2019-01-11 15:49                   ` Bruce Richardson
2019-01-11 16:27                     ` Luca Boccassi
2019-01-11 12:38 ` [dpdk-dev] [PATCH v2 1/3] build: use static deps of libs for pkg-config libs.private Luca Boccassi
2019-01-11 12:38   ` [dpdk-dev] [PATCH v2 2/3] build: use dependency() instead of find_library() Luca Boccassi
2019-01-11 12:38   ` [dpdk-dev] [PATCH v2 3/3] build: bump minimum Meson to 0.47.1 and use dependency() for libbsd Luca Boccassi
2019-01-11 14:27     ` Bruce Richardson
2019-01-11 14:30       ` Bruce Richardson
2019-01-11 15:04         ` Luca Boccassi
2019-01-11 15:50           ` Bruce Richardson
2019-01-11 16:14             ` Luca Boccassi
2019-01-11 16:26 ` [dpdk-dev] [PATCH v3 1/4] build: bump minimum Meson version to 0.47.1 Luca Boccassi
2019-01-11 16:26   ` [dpdk-dev] [PATCH v3 2/4] build: use dependency() instead of find_library() Luca Boccassi
2019-01-11 17:21     ` Bruce Richardson
2019-01-11 18:16       ` Luca Boccassi
2019-01-11 21:49         ` Bruce Richardson
2019-01-11 16:26   ` [dpdk-dev] [PATCH v3 3/4] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-01-11 17:22     ` Bruce Richardson
2019-01-11 16:26   ` [dpdk-dev] [PATCH v3 4/4] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-01-11 17:24     ` Bruce Richardson
2019-01-11 17:17   ` [dpdk-dev] [PATCH v3 1/4] build: bump minimum Meson version to 0.47.1 Bruce Richardson
2019-01-11 18:22 ` [dpdk-dev] [PATCH v4 " Luca Boccassi
2019-01-11 18:22   ` [dpdk-dev] [PATCH v4 2/4] build: use dependency() instead of find_library() Luca Boccassi
2019-01-11 18:22   ` [dpdk-dev] [PATCH v4 3/4] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-01-11 18:22   ` [dpdk-dev] [PATCH v4 4/4] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-01-22 13:10 ` [dpdk-dev] [PATCH v5 1/4] build: bump minimum Meson version to 0.47.1 Luca Boccassi
2019-01-22 13:10   ` [dpdk-dev] [PATCH v5 2/4] build: use dependency() instead of find_library() Luca Boccassi
2019-01-22 13:46     ` Bruce Richardson
2019-01-22 14:09       ` Luca Boccassi
2019-01-22 14:24         ` Bruce Richardson
2019-01-22 14:25     ` Bruce Richardson
2019-01-22 13:10   ` [dpdk-dev] [PATCH v5 3/4] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-01-22 13:10   ` [dpdk-dev] [PATCH v5 4/4] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-01-22 13:42   ` [dpdk-dev] [PATCH v5 1/4] build: bump minimum Meson version to 0.47.1 Bruce Richardson
2019-02-06 17:08 ` [dpdk-dev] [PATCH v6 1/5] " Luca Boccassi
2019-02-06 17:08   ` [dpdk-dev] [PATCH v6 2/5] build: use dependency() instead of find_library() Luca Boccassi
2019-02-12 11:15     ` Thomas Monjalon
2019-02-12 11:31       ` Bruce Richardson
2019-02-12 11:36         ` Thomas Monjalon
2019-02-12 11:43           ` Bruce Richardson
2019-02-12 14:47             ` Thomas Monjalon
2019-02-12 15:03               ` Bruce Richardson
2019-02-12 16:21                 ` Thomas Monjalon
2019-02-13 10:49                   ` Luca Boccassi
2019-02-13 11:10                     ` Thomas Monjalon
2019-02-13 13:45                       ` Luca Boccassi
2019-02-13 11:48                     ` Luca Boccassi
2019-02-06 17:08   ` [dpdk-dev] [PATCH v6 3/5] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-02-06 17:08   ` [dpdk-dev] [PATCH v6 4/5] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-02-06 17:08   ` [dpdk-dev] [PATCH v6 5/5] build: use integers for numerical options Luca Boccassi
2019-02-08 14:44     ` Bruce Richardson
2019-02-13 11:54 ` [dpdk-dev] [PATCH v7 1/5] build: bump minimum Meson version to 0.47.1 Luca Boccassi
2019-02-13 11:54   ` [dpdk-dev] [PATCH v7 2/5] build: use dependency() instead of find_library() Luca Boccassi
2019-02-13 15:35     ` Bruce Richardson
2019-02-13 11:54   ` [dpdk-dev] [PATCH v7 3/5] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-02-13 11:54   ` [dpdk-dev] [PATCH v7 4/5] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-02-13 11:54   ` [dpdk-dev] [PATCH v7 5/5] build: use integers for numerical options Luca Boccassi
2019-02-26 17:46 ` [dpdk-dev] [PATCH v8 1/6] build: bump minimum Meson version to 0.47.1 luca.boccassi
2019-02-26 17:46   ` [dpdk-dev] [PATCH v8 2/6] build: use dependency() instead of find_library() luca.boccassi
2019-02-26 17:46   ` [dpdk-dev] [PATCH v8 3/6] build: reorder libraries and build eal before cmdline luca.boccassi
2019-02-26 17:46   ` [dpdk-dev] [PATCH v8 4/6] build: use dependency() for libbsd instead of manual append to ldflags luca.boccassi
2019-02-26 17:46   ` [dpdk-dev] [PATCH v8 5/6] build: use integers for numerical options luca.boccassi
2019-02-26 17:46   ` [dpdk-dev] [PATCH v8 6/6] build: use dependency for pcap and fallback to find_library luca.boccassi
2019-02-26 17:49     ` Luca Boccassi
2019-02-27  8:33       ` Thomas Monjalon
2019-02-27  9:47         ` Bruce Richardson
2019-02-27 10:50           ` Luca Boccassi
2019-02-27 10:56             ` Thomas Monjalon
2019-02-27 12:03               ` Luca Boccassi
2019-02-27 13:53                 ` Bruce Richardson
2019-02-28 17:40                   ` Bruce Richardson
2019-03-01 13:13                     ` Thomas Monjalon
2019-03-01 15:13                       ` Luca Boccassi
2019-03-01 13:22     ` Thomas Monjalon
2019-02-27 11:29   ` [dpdk-dev] [PATCH v8 1/6] build: bump minimum Meson version to 0.47.1 Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190107165552.GA23828@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=techboard@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).