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

[libvirt] [PATCH] Directly link against needed libraries



otherwise having a strict --no-copy-dt-needed-entries fails in several
places like:

otherwise we fail like:

    CCLD     virdbustest
    /usr/bin/ld: virdbustest-virdbustest.o: undefined reference to symbol 'dbus_message_unref'
    /lib/x86_64-linux-gnu/libdbus-1.so.3: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
---
 src/Makefile.am   |  5 ++++-
 tests/Makefile.am | 10 +++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 7e24c1f..074ab18 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1119,7 +1120,8 @@ libvirt_driver_qemu_impl_la_CFLAGS = \
 libvirt_driver_qemu_impl_la_LDFLAGS = $(AM_LDFLAGS)
 libvirt_driver_qemu_impl_la_LIBADD = $(CAPNG_LIBS) \
                                 $(GNUTLS_LIBS) \
-				$(LIBNL_LIBS)
+				$(LIBNL_LIBS) \
+				$(LIBXML_LIBS)
 libvirt_driver_qemu_impl_la_SOURCES = $(QEMU_DRIVER_SOURCES)
 
 conf_DATA += qemu/qemu.conf
@@ -1280,6 +1282,7 @@ libvirt_driver_network_impl_la_CFLAGS = \
 		-I$(top_srcdir)/src/conf \
 		$(AM_CFLAGS)
 libvirt_driver_network_impl_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
+libvirt_driver_network_impl_la_LIBADD  = $(DBUS_LIBS)
 endif
 EXTRA_DIST += network/default.xml
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6f43b09..a9bcf4c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -391,7 +391,7 @@ 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)
 
 qemuxml2xmltest_SOURCES = \
 	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
@@ -559,7 +559,7 @@ interfacexml2xmltest_LDADD = $(LDADDS)
 cputest_SOURCES = \
 	cputest.c \
 	testutils.c testutils.h
-cputest_LDADD = $(LDADDS)
+cputest_LDADD = $(LDADDS) $(LIBXML_LIBS)
 
 virshtest_SOURCES = \
 	virshtest.c \
@@ -606,12 +606,12 @@ virnettlscontexttest_SOURCES = \
 	virnettlscontexttest.c \
 	virnettlshelpers.h virnettlshelpers.c \
 	testutils.h testutils.c
-virnettlscontexttest_LDADD = $(LDADDS)
+virnettlscontexttest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
 virnettlssessiontest_SOURCES = \
 	virnettlssessiontest.c \
 	virnettlshelpers.h virnettlshelpers.c \
 	testutils.h testutils.c
-virnettlssessiontest_LDADD = $(LDADDS)
+virnettlssessiontest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
 if HAVE_LIBTASN1
 virnettlscontexttest_SOURCES += pkix_asn1_tab.c
 virnettlscontexttest_LDADD += -ltasn1
@@ -675,7 +675,7 @@ if WITH_DBUS
 virdbustest_SOURCES = \
 	virdbustest.c testutils.h testutils.c
 virdbustest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
-virdbustest_LDADD = $(LDADDS)
+virdbustest_LDADD = $(LDADDS) $(DBUS_LIBS)
 
 virsystemdtest_SOURCES = \
 	virsystemdtest.c testutils.h testutils.c
-- 
1.8.4.rc1


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