On Tue, Jun 27, 2017 at 05:34:59PM +0800, longguang.yue wrote: > Hi, all: > i back port a patch which makes qemu depends on util directory. > so i correct its dependency by applying a patch. but another error occur. > the patch is http://libvirt.org/git/?p=libvirt.git;a=commit;h=57b5e27d3d74f8dbb77ac909b405d99d555eca46 That's wrong - qemu (and every driver in libvirt) has *always* depended on the util directory - nothing changed in that respect in this patch. The patch adds a new method in the util code, and exports that method to drivers in the normal manner. > the patch fix dependency : > --- libvirt-2.0.0/src/Makefile.am 2016-06-27 22:12:20.523191076 +0800 > +++ libvirt-2.0.0-ok/src/Makefile.am 2017-06-22 12:25:17.512000000 +0800 > @@ -1362,6 +1362,7 @@ > -I$(srcdir)/access \ > -I$(srcdir)/conf \ > -I$(srcdir)/secret \ > + -I$(srcdir)/util \ > $(AM_CFLAGS) > libvirt_driver_qemu_impl_la_LDFLAGS = $(AM_LDFLAGS) > libvirt_driver_qemu_impl_la_LIBADD = $(CAPNG_LIBS) \ > @@ -1369,6 +1370,7 @@ > $(LIBNL_LIBS) \ > $(LIBXML_LIBS) \ > libvirt_secret.la \ > + libvirt_util.la \ > $(NULL) > libvirt_driver_qemu_impl_la_SOURCES = $(QEMU_DRIVER_SOURCES) This is just wrong. Any symbols that QEMU uses from the libvirt_util.la library are already linked into libvirtd and exported to the QEMU driver. Linking QEMU to libvirt_util.la results in 2 copies the same code being in-process which is broken. > CCLD qemucapsprobe > /bin/ld: .libs/qemucapsprobe: hidden symbol `libvirt_event_poll_update_handle_semaphore' in ../src/libvirt_probes.o is referenced by DSO > /bin/ld: final link failed: Bad value > collect2: error: ld returned 1 exit status This looks unrelated to the patch you quote above. The patch doesn't change qemucapsprobe, nor reference that hidden symbol. So I think this is a pre-existing problem you have with your build and/or code tree. 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