Re: [PATCH 0/3] Fix examples/ under mingw

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

 



On Wed, Jan 09, 2019 at 01:33:44PM +0100, Andrea Bolognani wrote:
> On Tue, 2019-01-08 at 13:56 -0600, Eric Blake wrote:
> > My recent patch to make all of the examples work independently of
> > gnulib worked fine on Linux, but failed on mingw:
> > https://travis-ci.org/libvirt/libvirt/jobs/476898635
> > 
> > The whole point of gnulib is to work around portability pitfalls so
> > we don't have to bend over backwards thinking about it in our code;
> > and it would be possible to fix this bug by linking the problematic
> > example binaries against gnulib after all.  But since the examples
> > are still small and self-contained enough that using manual
> > workarounds wasn't too daunting, that's the approach I took here.
> 
> It's kind of a done deal now, but I still wonder if it was the right
> approach.
> 
> The way I see it, our examples are supposed to illustrate how to use
> libvirt itself, not how to write C code that is portable to a
> multitude of platforms: with that goal in mind, taking advantage of
> gnulib makes perfect sense, as it allows us to put the focus on the
> usage of libvirt rather than the surrounding compatibility gunk.

Using gnulib is not an easy thing if you are not familiar with
it, largely because of the painful autotools integration it
imposes. It is important that the examples are both simple to
read, and simple to build standalone. We've always considered that
the examples should be possible to build using nothing more than
the C compiler and pkg-config. eg 

  $CC  `pkg-config --cflags --libs libvirt` -o foo foo.c

The benefits of gnulib are not compelling enough to be worth the
complexity that it brings in for the examples. 

Regards,
Daniel
-- 
|: 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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux