Build failure against glib2-2.74.x
Compiling the libvirt-glib-4.0.0 tarball on Arch Linux against recently updated glib2 (2.74.x) now fails. This used to work fine with older glib2. Output:
FAILED: libvirt-gconfig/libvirt-gconfig-1.0.so.0.4000.0.p/libvirt-gconfig-domain-capabilities-os.c.o
<... snip ...>
In file included from /usr/include/glib-2.0/glib.h:52,
from /usr/include/glib-2.0/gobject/gbinding.h:30,
from /usr/include/glib-2.0/glib-object.h:24,
from ../libvirt-glib-4.0.0/libvirt-gconfig/libvirt-gconfig.h:26,
from ../libvirt-glib-4.0.0/libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c:23:
../libvirt-glib-4.0.0/libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c: In function ‘search_firmwares’:
../libvirt-glib-4.0.0/libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c:70:26: error: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Werror=pointer-sign]
70 | if (!g_str_equal(node->name, "enum"))
/usr/include/glib-2.0/glib/ghash.h:165:39: note: in definition of macro ‘g_str_equal’
165 | #define g_str_equal(v1, v2) (strcmp ((v1), (v2)) == 0)
| ^~
In file included from /usr/include/glib-2.0/glib/galloca.h:35,
from /usr/include/glib-2.0/glib.h:32:
/usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’ {aka ‘const unsigned char *’}
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
cc1: all warnings being treated as errors
I'm guessing something changed in latest glib2 which will require libvirt-glib tweaking. Thanks.