[libvirt PATCH 000/351] port libvirt to Meson build system
Daniel P. Berrangé
berrange at redhat.com
Fri Jul 17 18:00:07 UTC 2020
On Fri, Jul 17, 2020 at 07:50:35PM +0200, Pavel Hrdina wrote:
> On Fri, Jul 17, 2020 at 03:51:21PM +0100, Daniel P. Berrangé wrote:
> > On Thu, Jul 16, 2020 at 11:53:56AM +0200, Pavel Hrdina wrote:
> > > So I was finally able to produce the patches to port libvirt to Meson.
> > > Obviously, it is a lot of changes. It might look that some of the
> > > patches could be squashed together but I would rather have it as
> > > separated as possible to make the review not that difficult.
> > >
> > > Once we are done with review I suggest to squash all patches to single
> > > patch as it doesn't make sense to keep them separated as it will not be
> > > possible to build complete libvirt code by any of the build systems.
> > > Trying to achieve that would be even more challenging and the review
> > > would me more difficult.
> > >
> > > The reasoning behind taking this approach is to have 1:1 conversion from
> > > autotools to Meson where each patch removes that part from autotools. It
> > > serves as a check that nothing is skipped and to make sure that the
> > > conversion is complete.
> > >
> > > As probably most of us know Meson is completely different build system
> > > and one of the most challenging things was to deal with the fact that
> > > meson doesn't allow user functions and that everything has to be defined
> > > before it is used.
> > >
> > > Patches are available in my Gitlab repo as well:
> > >
> > > git clone -b meson https://gitlab.com/phrdina/libvirt.git
> > I compared the contents of config.h and meson-config.h for the
> > before and after state, looking at wha "#define" are present.
> > I couple of problems appear
> > HAVE_DECL_SEEK_HOLE, HAVE_LIBATTR, and HAVE_LIBUTIL, WITH_PM_UTILS
> > were not set in meson-config.h
> Nice catch, I actually had a code to define HAVE_DECL_SEEK_HOLE but it
> requires -D_GNU_SOURCE to detect it.
> For some reason I missed HAVE_LIBATTR.
> We don't use HAVE_LIBUTIL anywhere in the code, only HAVE_LIBUTIL_H
> which is in meson-config.h.
We do AC_CHECK_LIB([util],[openpty],) which I think auto-adds
"-lutil" to the global $LIBS, only if needed. So yeah, the HAVE_LIBUTIL
in meson-config.h is not required, as long as we're adding -lutil when
needed in $LIBS.
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list