[Mesa-dev] [RFC libdrm 0/2] Replace the build system with meson

Kai Wasserbäch kai at dev.carbon-project.org
Tue Mar 21 16:50:52 UTC 2017


Hey Dylan,
I've just a few points, since I'm not too enthused by the prospect of having to
deal with yet another build system with yet another slightly different syntax.
But ultimately this is only a "my 2 cents" e-mail, since others are way deeper
involved with Mesa and their opinion is what matters in the end. Anyway, here
goes nothing.

This might be a dumb question but isn't Meson (through wrap files) one of the
build systems that download crap from all over the internet silently? Ie. making
a packager's/distribution's life hell? There is
<https://github.com/mesonbuild/meson/wiki/Wrap-dependency-system-manual#toggling-between-distro-packages-and-embedded-source>
but that seems to imply a silent fallback to downloading stuff. I would rather
have a configure step that fails if a dependency is not met instead of building
something that can't be distributed. Or is there a magic "--distribution-build"
flag? If there isn't I would rather see a switch to CMake (as others have
pointed out in this thread: many projects in the vicinity of Mesa already use
CMake), but I get that there's a lot of hate for CMake (even though the Meson
syntax looks a lot like CMake, so I'm not really sure why?) and such a switch
would be unlikely.

Dylan Baker wrote on 16.03.2017 22:25:
> Why bother, and why would we want this?
> 
> First it's written in python, which means the potential developer base
> is massive. And it provides a recursive view for humans, but a
> non-recursive view for the system. This is the best of both worlds,
> humans can organize the build system in a way that makes sense, and the
> machine gets a non-recursive build system. It also uses ninja rather
> than make, and ninja is faster than make inherently.

Well, CMake (and probably others), see
<https://cmake.org/cmake/help/latest/generator/Ninja.html>, can use/generate for
ninja too.

> Meson is also a
> simpler syntax than autotools or cmake it's not Turing Complete by
> design nor does it expose python, again, by design. This allows meson
> itself to be reimplemented in a another language if python becomes a
> dead-end or a bottle-neck. It also makes it much easier to understand
> what the build system is doing.
> 
> What's different about using meson?
> 
> Well, apart from a faster builds and less magic in the build system? The
> configure flags are different, it uses -D<opt>=<value> more like cmake
> than the --enable or --with flags of autotools, although oddly it uses
> --prefix and friends when calling meson, but not with mesonconf, there's
> a bug opened on this. Meson also doesn't support in-tree builds at all;
> all builds are done out of tree. It also doesn't provide a "make dist"
> target, fortunately there's this awesome tool called git, and it
> provides a "git archive" command that does much the same thing. Did I
> mention it's fast?

Nothing against git archive, but you then would need to maintain .gitattributes
in addition to the build system input files, correct? Right now the distribution
rules are just in the Makefile.in files, making them more visible and less
easily forgotten.

> [...]

Cheers,
Kai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170321/64087332/attachment.sig>


More information about the mesa-dev mailing list