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

[libvirt] [PATCH v2] Link libxml2 and libdbus in tests which need it.



Some tests fail to build without libxml2 or libdbus specified, add
them where needed.

Without this, I get errors like

/usr/bin/ld: virnettlscontexttest.o: undefined reference to symbol 'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4'
/usr/bin/ld: note: 'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4' is defined in DSO /usr/lib/x86_64-linux-gnu/libgnutls.so.26 so try adding it to the linker command line
/usr/lib/x86_64-linux-gnu/libgnutls.so.26: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status

Signed-off-by: Serge Hallyn <serge hallyn ubuntu com>
---
 tests/Makefile.am | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3abd698..51782a1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -351,40 +351,40 @@ qemu_LDADDS += $(LDADDS)
 qemuxml2argvtest_SOURCES = \
 	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
 	testutils.c testutils.h
-qemuxml2argvtest_LDADD = $(qemu_LDADDS)
+qemuxml2argvtest_LDADD = $(qemu_LDADDS) $(LIBXML_LIBS) $(DBUS_LIBS)
 
 qemuxml2xmltest_SOURCES = \
 	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
 	testutils.c testutils.h
-qemuxml2xmltest_LDADD = $(qemu_LDADDS)
+qemuxml2xmltest_LDADD = $(qemu_LDADDS) $(LIBXML_LIBS) $(DBUS_LIBS)
 
 qemuxmlnstest_SOURCES = \
 	qemuxmlnstest.c testutilsqemu.c testutilsqemu.h \
 	testutils.c testutils.h
-qemuxmlnstest_LDADD = $(qemu_LDADDS)
+qemuxmlnstest_LDADD = $(qemu_LDADDS) $(LIBXML_LIBS) $(DBUS_LIBS)
 
 qemuargv2xmltest_SOURCES = \
 	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
 	testutils.c testutils.h
-qemuargv2xmltest_LDADD = $(qemu_LDADDS)
+qemuargv2xmltest_LDADD = $(qemu_LDADDS) $(LIBXML_LIBS) $(DBUS_LIBS)
 
 qemuhelptest_SOURCES = qemuhelptest.c testutils.c testutils.h
-qemuhelptest_LDADD = $(qemu_LDADDS)
+qemuhelptest_LDADD = $(qemu_LDADDS) $(LIBXML_LIBS) $(DBUS_LIBS)
 
 qemumonitortest_SOURCES = qemumonitortest.c testutils.c testutils.h
-qemumonitortest_LDADD = $(qemu_LDADDS)
+qemumonitortest_LDADD = $(qemu_LDADDS) $(LIBXML_LIBS) $(DBUS_LIBS)
 
 qemumonitorjsontest_SOURCES = \
 	qemumonitorjsontest.c \
 	testutils.c testutils.h \
 	testutilsqemu.c testutilsqemu.h \
 	$(NULL)
-qemumonitorjsontest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la
+qemumonitorjsontest_LDADD = $(qemu_LDADDS) $(LIBXML_LIBS) $(DBUS_LIBS) libqemumonitortestutils.la
 
 domainsnapshotxml2xmltest_SOURCES = \
 	domainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
 	testutils.c testutils.h
-domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS)
+domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS) $(LIBXML_LIBS) $(DBUS_LIBS)
 else
 EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \
 	qemuxmlnstest.c qemuhelptest.c domainsnapshotxml2xmltest.c \
@@ -451,7 +451,7 @@ if WITH_NETWORK
 networkxml2conftest_SOURCES = \
 	networkxml2conftest.c \
 	testutils.c testutils.h
-networkxml2conftest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
+networkxml2conftest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS) $(XML_LIBS) $(DBUS_LIBS)
 else
 EXTRA_DIST += networkxml2conftest.c
 endif
@@ -500,7 +500,7 @@ interfacexml2xmltest_LDADD = $(LDADDS)
 cputest_SOURCES = \
 	cputest.c \
 	testutils.c testutils.h
-cputest_LDADD = $(LDADDS)
+cputest_LDADD = $(LDADDS) $(LIBXML_LIBS)
 
 virshtest_SOURCES = \
 	virshtest.c \
@@ -548,7 +548,7 @@ virnettlscontexttest_SOURCES = \
 virnettlscontexttest_LDADD = $(LDADDS)
 if HAVE_LIBTASN1
 virnettlscontexttest_SOURCES += pkix_asn1_tab.c
-virnettlscontexttest_LDADD += -ltasn1
+virnettlscontexttest_LDADD += -ltasn1 $(GNUTLS_LIBS)
 else
 EXTRA_DIST += pkix_asn1_tab.c
 endif
-- 
1.8.1.2


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