[pacman-dev] interest in using meson over autotools?

Dave Reisner d at falconindy.com
Sat Jul 7 23:13:24 UTC 2018


Hi,

I'm probably not the first to suggest that Autotools is slow and
terrible, but here it is: Autotools is slow and terrible. Concretely, a
few things I find highly annoying about our current use of Autotools:

* We have to carry hacks to the build system itself just to ensure that
  our binaries aren't overlinked.
* Data is duplicated across Makefiles -- derived path configurations such
  as LOCALEDIR or CONFFILE.
* Code is duplicated across directories (symlinked to src/common). As a
  result, we have poor isolation and rebuild the code multiple times.
* './configure && make -C src/pacman pacman' fails. It seems absurd that
  the user at the command line should have to know to build libalpm
  first. Isn't that the whole point of a dependency-tracking build
  system?

Subjectively, the configuration itself is archaic and verbose. Does
anyone *really* want to spend time understanding the quoting semantics
of m4, or figure out where things like $ac_cv_sys_file_offset_bits come
from?

Yes, some of this could be resolved by fixing/rewriting the autotools
madness to not use recursive make, but I'd suggest we just drop
autotools and adopt meson. Meson can easily fix all of the above.

Why meson?

* It's fast. I wrote the initial meson.build files to compile libalpm.so
  and pacman (this took me under an hour). The resulting build takes 1/3
  of the time of the equivalent autotools build. The ./configure
  equivalent in meson will be faster too, but I can't compare that yet
  because my meson-equivalent is incomplete. Trust me, it'll be faster.
* It's modular. You can still constrain lots of subdirectory specifics in
  subdirectory meson.build files.
* It's easy to read. The config is python-ish, and it's very concise.
  The documentation is comprehensive and has plenty of examples.
* There's lots of upstream support, and the community is growing. In
  Arch Linux, 175 packages are built using meson (largely because gnome
  has decided to adopt meson). We would not be an early adopter of meson.
* It's portable. meson supports all the targets where we currently have
  actual users.

Would there be interest in accepting patches to make these changes? I
propose we would carry both build systems in parallel for a major
release before eventually dropping autotools.

Feedback wanted,
dR


More information about the pacman-dev mailing list