autotools to meson: policy?

Enrico Weigelt, metux IT consult info at metux.net
Thu Jan 30 13:14:41 UTC 2025


On 29.01.25 18:51, tlaronde at kergis.com wrote:

Hi,

> Theoretically, python is interpreted, so byte-compiling should not be
> necessary.

Yes, and IIRC it's only a cache (for reducing startup time) anyways.
Some distros to package them, but for good reasons they've got their
special build machineries for that - independent of the upstream's
build scripts. Way too much complexity (and too distro specific) that
individual upstreams should ever care about that.

> But for the module concerned---xcbproto---autotools
> byte-compiles by default (and this is wrong, since python is

Ideed. That's certainly a bug in the package (or autotools).

> What I have written for xcbproto allows to explicitely ask for
> byte-compilation.

Yes, that should be really optional - and opt-in.

> But python is a disease that should not be allowed to spread in the X
> sources...

Well, the language itself isn't so bad, but the infrastructure around
it and version zoo is a huge problem.

Golang IMHO is much better here. I'm actually consider using golang for
things like generators, possibly even driving parts of the build
process (and also replacing lots of shell script stuff that way)

BUT (!!!): first need to make sure that it easily works on all target
platforms. Haven't dared to ask NetBSD folks about their view on this;-)

> This is worst than that: every distro has its own way to install
> python modules, due to incompatibilities between versions.

Indeed. But there're ways around that (depending on exact use case)
a) use venv's
b) try to use the lowest common demoninator
c) push the integration work to distro maintainers

It would be much better if all modules would strictly conform to
semver. Then we could go a similar way like golang does (have a machine
readable dependency description) and let a generic (possibly distro-
patched) machinery sort out all the details.

Actually, I'm much in favor of moving build process stuff into generic
tools as much as possible - and let the distros set up those tools
in the right way.

One such tool is pkg-config. IMHO (at least in C world) everybody should
use it (and never even consider writing your own dependency dection
logic, especially NOT all these weird autoconf macros).

The next important step would be a machine readable metadata file
describing the various build configuration items and their dependencies.
That would allow creating (most of) the dist package metadata fully
automatically (before the actual build even starts)

> Once more, for xcbproto I have written POSIX.2 shell scripts so that
> any distribution could put the files where it wants it without relying
> on Meson default handling that is unlikely to do what the distro
> expects

Meson is one of those tools that should be configured by distros, so
upstream code only states what it has / wants, and the tool sorts
out how it exactly needs to be done on the specific target.


--mtx

--
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info at metux.net -- +49-151-27565287



More information about the xorg-devel mailing list