[libvirt] [libvirt-glib] Explicitly link conn-test against libvirt-gconfig libvirt-glib

Daniel P. Berrange berrange at redhat.com
Wed Apr 11 12:41:20 UTC 2012


On Wed, Apr 11, 2012 at 01:54:27PM +0200, Guido Günther wrote:
> 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 at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_set_error at LIBVIRT_GLIB_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_network_new_from_xml at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_storage_pool_new_from_xml at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_init_check at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_domain_get_type at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_object_to_xml at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_event_register at LIBVIRT_GLIB_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_init_check at LIBVIRT_GLIB_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_domain_get_devices at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_storage_vol_new_from_xml at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_secret_new_from_xml at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_interface_new_from_xml at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_domain_disk_get_type at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_domain_disk_get_target_dev at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_domain_interface_get_type at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_node_device_new_from_xml at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_domain_device_get_type at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_object_get_type at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_error_new_literal at LIBVIRT_GLIB_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_domain_snapshot_new_from_xml at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_network_filter_new_from_xml at LIBVIRT_GCONFIG_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_set_error_literal at LIBVIRT_GLIB_0.0.4'
> > > ../libvirt-gobject/.libs/libvirt-gobject-1.0.so: undefined reference to `gvir_config_domain_interface_get_ifname at 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.

Oh lovely, break in-tree linkage to fix an out of tree linkage problem.

Reluctant ACK to your patch


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list