On Fri, Jul 17, 2020 at 07:00:07PM +0100, Daniel P. Berrangé wrote: > 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. meson.build:1377 is where we check for -lutil and if the library exists it's added to link arguments so it is covered. Pavel
Attachment:
signature.asc
Description: PGP signature