On Tue, Apr 10, 2012 at 09:36:57PM +0100, Daniel P. Berrange wrote:
On Tue, Apr 10, 2012 at 10:29:59PM +0200, Guido Günther wrote:
> otherwise the build fails with:
>
> $ CCLD conn-test
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_domain_new_from_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_set_error(a)LIBVIRT_GLIB_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_network_new_from_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_storage_pool_new_from_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_init_check(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_domain_get_type(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_object_to_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_event_register(a)LIBVIRT_GLIB_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_init_check(a)LIBVIRT_GLIB_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_domain_get_devices(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_storage_vol_new_from_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_secret_new_from_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_interface_new_from_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_domain_disk_get_type(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_domain_disk_get_target_dev(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_domain_interface_get_type(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_node_device_new_from_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_domain_device_get_type(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_object_get_type(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_error_new_literal(a)LIBVIRT_GLIB_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_domain_snapshot_new_from_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_network_filter_new_from_xml(a)LIBVIRT_GCONFIG_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_set_error_literal(a)LIBVIRT_GLIB_0.0.4'
> ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to
`gvir_config_domain_interface_get_ifname(a)LIBVIRT_GCONFIG_0.0.4'
> collect2: ld returned 1 exit status
> ---
> examples/Makefile.am | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/examples/Makefile.am b/examples/Makefile.am
> index b77076d..37a8447 100644
> --- a/examples/Makefile.am
> +++ b/examples/Makefile.am
> @@ -25,6 +25,8 @@ conn_test_SOURCES = \
> conn-test.c
> conn_test_LDADD = \
> ../libvirt-gobject/libvirt-gobject-1.0.la \
> + ../libvirt-gconfig/libvirt-gconfig-1.0.la \
> + ../libvirt-glib/libvirt-glib-1.0.la \
> $(LIBVIRT_LIBS) \
> $(GLIB2_LIBS) \
> $(GOBJECT2_LIBS)
I don't think this is right. libvirt-gobject-1.0.la already specifies
a dependancy on libvirt-gconfig-1.0.la and libvirt-glib-1.0.la, so
we should not have to duplicate that information:
$ grep dependency libvirt-gobject/libvirt-gobject-1.0.la
# Linker flags that can not go in dependency_libs.
dependency_libs=' -lgio-2.0 -lgmodule-2.0
/home/berrange/src/virt/libvirt-glib/libvirt-glib/libvirt-glib-1.0.la -lvirt -ldl
/home/berrange/src/virt/libvirt-glib/libvirt-gconfig/libvirt-gconfig-1.0.la -lgobject-2.0
-lgthread-2.0 -lrt -lglib-2.0 -lxml2'
These are not emitted by Debian's libtool motivated by:
http://lists.debian.org/debian-devel/2009/08/msg00783.html
Fedora discussed something similar:
http://lists.fedoraproject.org/pipermail/devel/2010-November/146343.html
When I revert Debian's libtool patch I indeed end up with the above
dependency_libs line but since the aim is to make these empty I'd be
great to have this applied.
Cheers,
-- Guido