[FFmpeg-devel] [RFC] New build system

Martin Herkt lachs0r+ffmpeg at srsfckn.biz
Fri Jun 15 03:16:30 EEST 2018

On Friday, June 15, 2018 12:45:53 AM CEST Jean-Baptiste Kempf wrote:
> Hello,
> On Thu, 14 Jun 2018, at 18:03, Josh de Kock wrote:
> > As such, I'd like to propose adopting a new build system to FFmpeg,
> > namely Meson[1]. There has already been a fair amount of work (not by
> I think this is a great idea.
> Custom buildsystem are almost always wrong and/or broken.
> Beside autotools (and sometimes CMake), everything is always broken on a
> system or another.

As an “outsider” who only (cross-)builds and packages FFmpeg, I concur. Except 
that CMake is always broken everywhere and under all circumstances unless you 
go out of your way to emulate sane behavior, at which point you have even more 
boilerplate than with custom Makefiles, and it still won’t work on anything 
you haven’t tested. Meson on the other hand is one of the very few build 
systems that actually care about packagers.

FFmpeg’s build system is unique because despite its lack of caching, one must 
sometimes make clean and reconfigure everything when bisecting for bugs. Maybe 
depfile generation is buggy or someting. In any case, it’s super annoying. 
Then there’s the slowness and make’s suboptimal job distribution on multi-core 
systems and distributed builds. Not something I’d want to suffer during 

I think Meson is still a little immature in some places, but an effort should 
be made nonetheless. My experiences with it have been very positive, and the 
documentation had answers to all of my questions. It’s easy to figure out and 
there are few surprises, which is something I cannot say about shell scripts.

Its codebase is also fairly lean compared to some of the alternatives and its 
developers seem open to changes, so all hope isn’t lost if there’s something 
fundamentally wrong with it.

> And they don't want it to be turing-complete, which is great, and avoids
> creating a monster.

Some people might disagree with this and call it another CMake due to its 
custom language (which is as far from the truth as it gets), but it’s a good 
thing indeed. A mostly declarative build system which delegates complex tasks 
to external scripts with clear responsibilities (and provides some 
introspection) is much nicer to work with than a fat monolith with intermixed 
dependency testing, file template processing logic and stack machines.

I think you should at least give it a try.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180615/08ec28f2/attachment.sig>

More information about the ffmpeg-devel mailing list