[PATCH] tests: Fix qemucapsprobemock linking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add libvirt.la into qemucapsprobemock_la_LIBADD because that mock uses bunch of
libvirt internal functions.  Without this patch the following error occurs:

  $ ./qemucapsprobe /usr/bin/qemu-system-x86_64
  ...
  warning : virQEMUCapsLogProbeFailure:4204 : Failed to probe capabilities for
  /usr/bin/qemu-system-x86_64: internal error: Failed to probe QEMU binary with
  QMP: /usr/bin/qemu-system-x86_64: symbol lookup error:
  .../qemucapsprobemock.so: undefined symbol: virJSONValueObjectHasKey

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---

TBH I didn't go into details why this is needed.  It still seems fishy to me.
Not only that I get that error above as a libvirt error, but if i add just
libvirt_util.la in there, I get:

  .../qemucapsprobe: symbol lookup error: .../qemucapsprobemock.so:
  undefined symbol: libvirt_event_poll_update_handle_semaphore

If anyone has a better idea how this should be fixed, please suggest that.

 tests/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 05db6b1192a4..24ea41f5176c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -619,7 +619,7 @@ qemucapsprobe_LDADD = \
 qemucapsprobemock_la_SOURCES = \
 	qemucapsprobemock.c
 qemucapsprobemock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
-qemucapsprobemock_la_LIBADD = $(MOCKLIBS_LIBS)
+qemucapsprobemock_la_LIBADD = $(MOCKLIBS_LIBS) ../src/libvirt.la
 
 qemucommandutiltest_SOURCES = \
 	qemucommandutiltest.c \
-- 
2.17.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux