Hi Christophe,
Thanks for your comments, as you said, it should be my 
old glib version issue.


Regards,
Alex


----- Original Message -----
From: "Christophe Fergeau" <[email protected]>
To: "Alex Jia" <[email protected]>
Cc: "Daniel Berrange" <[email protected]>, "libvir" <[email protected]>
Sent: Friday, January 13, 2012 4:58:08 PM
Subject: Re: [libvirt] [libvirt-glib] Compilation warning and error

On Thu, Jan 12, 2012 at 10:50:57PM -0500, Alex Jia wrote:
>   CC     libvirt_gobject_1_0_la-libvirt-gobject-main.lo
>   CC     libvirt_gobject_1_0_la-libvirt-gobject-domain-snapshot.lo
>   CC     libvirt_gobject_1_0_la-libvirt-gobject-domain-device.lo
> libvirt-gobject-domain-device.c: In function 
> 'gvir_domain_device_set_property':
> libvirt-gobject-domain-device.c:77: warning: implicit declaration of function 
> 'g_clear_object'
> libvirt-gobject-domain-device.c:77: warning: nested extern declaration of 
> 'g_clear_object'

This was added in glib 2.28

>   CC     libvirt_gobject_1_0_la-libvirt-gobject-domain-disk.lo
>   CC     libvirt_gobject_1_0_la-libvirt-gobject-domain-interface.lo
>   CC     libvirt_gobject_1_0_la-libvirt-gobject-domain.lo
> libvirt-gobject-domain.c: In function 'gvir_domain_save_helper':
> libvirt-gobject-domain.c:777: warning: implicit declaration of function 
> 'g_simple_async_result_take_error'
> libvirt-gobject-domain.c:777: warning: nested extern declaration of 
> 'g_simple_async_result_take_error'

This was added in glib 2.28 too

>   CC     libvirt_gobject_1_0_la-libvirt-gobject-interface.lo
> libvirt-gobject-interface.c:158: error: expected declaration specifiers or 
> '...' before 'gvir_interface_handle'
> libvirt-gobject-interface.c:159: error: expected declaration specifiers or 
> '...' before 'gvir_interface_handle_copy'
> libvirt-gobject-interface.c:159: error: expected declaration specifiers or 
> '...' before 'gvir_interface_handle_free'
> libvirt-gobject-interface.c:158: error: parameter 1 has incomplete type
> libvirt-gobject-interface.c:161: warning: return type defaults to 'int'
> libvirt-gobject-interface.c:158: warning: no previous prototype for 
> 'G_DEFINE_BOXED_TYPE'

And this was added in glib 2.26

But configure.ac only checks for glib 2.10, you probably have an older
glib. Adding compatibility fallbacks for older glibs for these functions
shouldn't be too hard, spice-gtk added such fallbacks recently.

Christophe

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to