[libvirt] libvirt-2.0.0 build error (hidden symbol libvirt_event_poll_update_handle_semaphore)

Hi, all: i back port a patch which make qemu depends on util directory. so i correct its dependency by applying a patch. but another error occur. the patch is : --- 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) --------- BUILD ERROR: 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 make[1]: *** [qemucapsprobe] Error 1 make[1]: Leaving directory `/root/libvirt-2.0/BUILD/libvirt-2.0.0/tests' make: *** [check-am] Error 2 + cat test-suite.log cat: test-suite.log: No such file or directory + true + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.ZVbGSv (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.ZVbGSv (%check) -------------

On 06/23/2017 04:33 AM, longguang.yue wrote:
Hi, all: i back port a patch which make qemu depends on util directory. so i correct its dependency by applying a patch. but another error occur. the patch is : --- 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)
When linking with libvirt_util, you also want to link with libvirt_probes.o. However, conditionally: if WITH_DTRACE_PROBES libvirt_driver_qemu_impl_la_LDADD += libvirt_probes.lo endif WITH_DTRACE_PROBES However, libvirt-driver-qemu-impl.la is going to be libvirt-driver-qemu.so which is eventually loaded by the daemon which already has libvirt_util (via libvirt.so). So what I'm saying is that you should not need to link with libvirt_util in the first place. Michal
participants (2)
-
longguang.yue
-
Michal Privoznik