[libvirt PATCH 037/351] meson: add readline build option

Erik Skultety eskultet at redhat.com
Wed Aug 5 09:23:15 UTC 2020


On Wed, Aug 05, 2020 at 10:59:08AM +0200, Andrea Bolognani wrote:
> On Thu, 2020-07-16 at 11:54 +0200, Pavel Hrdina wrote:
> > +++ b/meson_options.txt
> > @@ -12,3 +12,4 @@ option('test_coverage', type: 'boolean', value: false, description: 'turn on cod
> >  option('apparmor', type: 'feature', value: 'auto', description: 'apparmor support')
> >  option('attr', type: 'feature', value: 'auto', description: 'attr support')
> >  option('audit', type: 'feature', value: 'auto', description: 'audit support')
> > +option('readline', type: 'feature', value: 'auto', description: 'readline support')
> 
> Erik reports that there are issues with building RPMs on CentOS. He
> opened https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/42, but
> it seems to me that the topic should be discussed here instead, so
> I'm quoting his message and replying inline.
> 
> > After libvirt switched to the meson build system, rpmbuild on
> > CentOS is no longer viable as meson >= 0.54.0 is required while
> > only 0.49.2 (at the time of this patch) is available from the
> > package manager. Even if --nodeps is passed, the "%meson" RPM macro
> > won't expand and the build will fail.
> 
> The question is, was dropping RPM build support for CentOS an
> intentional change? I'm not sure it was, because otherwise the spec
> file could have been cleaned up a bit at the same time. If it was
> not, then we need to make use of the `%meson` macro conditional.
> 
> As an aside, I haven't actually checked, but I think that even though
> CentOS 8 ships a version of Meson that's too old for us it should at
> least have the `%meson` macro. Maybe that won't work with a Meson
> installed from PyPi, though...

One thing I haven't tried is to install the old meson and use --nodeps with
rpmbuild, still, rather than having 2 version of meson installed on CentOS for
the rpmbuild, we should fallback to something else if %meson isn't defined.

> 
> > It doesn't end there though, even if meson 0.54.0 were available,
> > the rpm build would still fail because of readline-devel not
> > providing the pkg config file on CentOS-8 which we rely on.
> 
> Looking at the lastest pipeline, all CentOS versions have "readline:
> NO" in their build summary, but the build still succeeded, so I'm not
> sure why the RPM build would fail? readline is an optional
> dependency, and we're not passing `-Dreadline=enabled`.
> 
> Additionally, the complex logic necessary to detect readline
> correctly, even in the absence of its pkg-config file, is still
> present in `meson.build`, so I'm not sure why it's not doing what
> it's supposed to do...

Well, I just reported what happened to me yesterday when I was doing some mdev
review on CentOS 8 and wanted to do an RPM install of the latest libvirt, meson
couldn't be re-built from the latest spec on CentOS 8, but taking the binary
package directly from Fedora 32 worked like a charm and then I hit the readline
issue for some reason, it's true I've had a bunch of packages (including
readline) installed manually in order to overcome the meson issues.
I'll re-try in a completely clean environment to see whether the missing
readline pkg config was only related to my environment or it actually fails the
build.

Erik




More information about the libvir-list mailing list