From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "Richardson, Bruce" <bruce.richardson@intel.com>,
"christian.ehrhardt@canonical.com"
<christian.ehrhardt@canonical.com>,
"luca.boccassi@gmail.com" <luca.boccassi@gmail.com>
Subject: Re: [dpdk-dev] [RFC PATCH] replace DPDK config and build system
Date: Wed, 7 Jun 2017 13:08:59 +0000 [thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA640C1AECE@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <20170607104743.275149-1-bruce.richardson@intel.com>
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> Sent: Wednesday, June 7, 2017 11:48 AM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>
> Subject: [dpdk-dev] [RFC PATCH] replace DPDK config and build system
>
> Hi all,
>
> following on from the pressing need to add support in DPDK for detecting
> and managing external dependencies, I undertook to see what options we had.
> However, unrelated to this, over time, I have become increasingly
> frustrated by the complexity of the DPDK configuration and build system. As
> such, I feel that looking at some of the newer build tools that are out
> there might give us the additional functionality we want, along with other
> benefits. As such, I undertook a prototype using "meson"[1] for
> configuration, which uses "ninja" as a backend for doing the actual build.
>
> With these tools we get the following benefits (not a complete list):
> * support for detecting dependencies on the system
> * support for detecting compiler features, including functions, defines
> * improved maintainability through a high-level language, which gives
> decent error messages including line numbers (!!)
> * co-existence with the existing makefile system without making any changes
> to it
> * faster builds using ninja - on my many-core system, the builds seem
> significantly faster than with our existing system. Especially in the
> nothing-has-changed case, builds with my prototype return instantly,
> compared to taking a few seconds to recursively check each directory with
> the current build system
> * the ability to switch to using a standard "ninja" + "ninja install" setup
> * the chance to rework our existing build-config files, and hopefully
> pretty much remove them.
> * pkg-config support.
> * we get to move away from our bespoke build system
> * dependencies in each lib can be moved back to being tracked in the libs
> files themselves, not up a level
>
>
> Of course, it's not a panacea, but having spent hours on the prototype thus
> far, I find working with meson and ninja far more user-friendly than
> working on our makefiles, and again the build speed is a really nice
> improvment too.
>
> The prototype is incomplete, but it does build a reasonable number of our
> libraries, some unit tests, the i40e PMD and the testpmd binary, and I have
> successfully passed traffic using testpmd from the build. Some things are
> not fully correct, e.g. static builds aren't working right now, as I haven't
> correctly done all the dependency tracking, I think, and the cpu flag
> detection has issues. It also has only been tried on x86_64 linux, on a
> couple of systems, so YMMV. However, I feel it's a reasonable enough start
> point to show what we might be able to achieve.
>
> Please take the prototype and test it out. I think it's a better
> alternative to trying to bolt on additional functionality to our existing
> config and build system.
Test drive done; here are my experiences / thoughts:
1) Understanding the Meson build files is much easier for me than the current build-files. I'll admit that bash scripting is not my forte, with the caveat that if my basic bash scripting doesn't suffice, others in the community are probably in a similar position.
2) I see huge value in pkg-config integration - linking made easy. From a developer usability POV, a project should provide a pkg-config file, and configure itself based on the pkg-config files available on the system.
3) The speed of ninja is impressive - particularly in the small-amounts-of-work case. Try it on your own machine if you don't believe me :)
4) "build variants" are super easy, meson build && meson build_variant will create two directories, with .o files contained under it (same as one possible usage of the current system - just calling out that that feature remains).
5) Vim users, there is a "mesonic" plugin[1] which provides syntax highlighting for Meson files, the Meson Options file, and Meson integration to the Vim compiler hooks. Aka typing :make will cause Ninja to be invoked and compile. There are more fancy features, check the script page.
6) Ninja uninstall will reverse a previous installation, and returns a clean system. Nice for testing and integrating DPDK with applications that expect DPDK to be installed system-wide.
Of course no build system is perfect - and I'd guess Meson also has a few gritty details that are not ideal - but to me this test-drive has shown promise. Opinions from non-developers may be of particular interest..
@DPDK Packagers, do you have experience with Meson? Does it integrate well with (your) existing infrastructure? Hope you don't mind me adding you to CC :)
-Harry
[1] http://www.vim.org/scripts/script.php?script_id=5378
next prev parent reply other threads:[~2017-06-07 13:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 10:47 Bruce Richardson
2017-06-07 10:47 ` [dpdk-dev] [RFC PATCH] build for DPDK with meson and ninja Bruce Richardson
[not found] ` <CGME20170607143643eucas1p10bce80dca22034efc6402d5944a6a0ed@eucas1p1.samsung.com>
2017-06-07 14:36 ` [dpdk-dev] [dpdk-dev,RFC] " Ilya Maximets
2017-06-07 14:51 ` Bruce Richardson
2017-06-07 18:12 ` [dpdk-dev] [RFC PATCH] " Jerin Jacob
2017-06-08 8:43 ` Bruce Richardson
2017-06-08 7:20 ` Shreyansh Jain
2017-06-08 8:48 ` Bruce Richardson
2017-06-07 13:08 ` Van Haaren, Harry [this message]
[not found] ` <1496841784.25214.6.camel@gmail.com>
2017-06-07 13:27 ` [dpdk-dev] [RFC PATCH] replace DPDK config and build system Bruce Richardson
2017-06-07 23:26 ` Stephen Hemminger
2017-06-08 8:59 ` Bruce Richardson
2017-06-08 16:26 ` Stephen Hemminger
2017-06-08 18:07 ` Christian Ehrhardt
2017-06-08 18:21 ` Wiles, Keith
2017-06-09 9:05 ` Bruce Richardson
2017-06-09 18:06 ` Wiles, Keith
2017-06-20 13:34 ` Morten Brørup
2017-06-20 13:41 ` Bruce Richardson
2017-06-20 14:25 ` Morten Brørup
2017-06-20 14:43 ` Bruce Richardson
2017-06-22 17:14 ` Neil Horman
2017-06-22 20:27 ` Bruce Richardson
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=E923DB57A917B54B9182A2E928D00FA640C1AECE@IRSMSX101.ger.corp.intel.com \
--to=harry.van.haaren@intel.com \
--cc=bruce.richardson@intel.com \
--cc=christian.ehrhardt@canonical.com \
--cc=dev@dpdk.org \
--cc=luca.boccassi@gmail.com \
/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).