[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Meson build

On a Tuesday in 2020, Pavel Hrdina wrote:
On Sun, Aug 30, 2020 at 02:34:56AM +0200, Toolybird wrote:

Just a heads up on my experiences with the new build system.

Arch Linux

Overall, it looks good, so well done!

Just a couple of minor things I noted:

1. Arch uses a meson wrapper script (arch-meson) that sets:

  --buildtype plain

This seems to trigger a bug in meson that results in copious bogus compiler warnings:

cc1: warning: ‘-Wformat-y2k’ ignored without ‘-Wformat’ [-Wformat-y2k]
cc1: warning: ‘-Wformat-extra-args’ ignored without ‘-Wformat’ [-Wformat-extra-args]
cc1: warning: ‘-Wformat-zero-length’ ignored without ‘-Wformat’ [-Wformat-zero-length]
cc1: warning: ‘-Wformat-contains-nul’ ignored without ‘-Wformat’ [-Wformat-contains-nul]
cc1: warning: ‘-Wformat-security’ ignored without ‘-Wformat’ [-Wformat-security]

which of course breaks -Werror builds.

I can easily work around it by setting `-D git_werror=disabled' or even better still:

CFLAGS+=" -Wall" arch-meson...

This should be easily fixable by adding -Wformat in our list of flags
that we pass to compiler. We were incorrectly relying on meson to add
-Wformat automatically and since we add the other -Wformat* flags
manually we should add -Wformat as well. I'll post a patch to fix this.

What would that fix?

It would neither be a plain build, nor a full -Werror build (since we're
missing -Wall).

Maybe this github issue is related?:


2. Arch currently builds libvirt with support for ZFS. Seeing as ZFS is not in the distro proper, a simple Autoconf tweak is used:

ZFS=/usr/bin/zfs ZPOOL=/usr/bin/zpool \
./configure ...

This is surprisingly hard to emulate with meson, in fact it appears impossible, unless I resort to dodgy hacks with sed etc.

I'm not sure I understand the reasoning behind this.

For normal usage users of libvirt should not fake that something exists
to make libvirt building the support for it because obviously it will
not work.

If you are asking from packager POV you should add ZFS as regular build
dependency and also run dependency.

If it's possible to fake it, it's not a build dependency.


I'm looking into the arch linux packaging and if that's your concern I
guess you should create libvirt-storage-zfs sub-package like it is done
for gluster, iscsi-direct and rbd.


Attachment: signature.asc
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]