[PATCH] Fix several undefined symbol errors in loadable driver modules

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

 



Link all loadable driver modules to libvirt.la and libgnu.la.

Add several missing symbols to libvirt_private.syms in order to
have them properly exported.
---
 src/Makefile.am          |   25 ++++++++++++++++++++++---
 src/libvirt_private.syms |   25 +++++++++++++++++++++++++
 tests/Makefile.am        |    6 +++++-
 3 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index ece18a6..588adf5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -456,6 +456,7 @@ libvirt_driver_test_la_CFLAGS = \
 		-I@top_srcdir@/src/conf
 if WITH_DRIVER_MODULES
 libvirt_driver_test_la_LDFLAGS = -module -avoid-version
+libvirt_driver_test_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_test_la_SOURCES = $(TEST_DRIVER_SOURCES)
 endif
@@ -475,6 +476,7 @@ libvirt_driver_remote_la_LDFLAGS =
 libvirt_driver_remote_la_LIBADD = $(GNUTLS_LIBS) $(SASL_LIBS)
 if WITH_DRIVER_MODULES
 libvirt_driver_remote_la_LDFLAGS += -module -avoid-version
+libvirt_driver_remote_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES)
 
@@ -525,6 +527,7 @@ libvirt_driver_xen_la_LDFLAGS =
 libvirt_driver_xen_la_LIBADD = $(XEN_LIBS)
 if WITH_DRIVER_MODULES
 libvirt_driver_xen_la_LDFLAGS += -module -avoid-version
+libvirt_driver_xen_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_xen_la_SOURCES = $(XEN_DRIVER_SOURCES)
 endif
@@ -539,6 +542,10 @@ endif
 libvirt_driver_phyp_la_LIBADD = $(LIBSSH2_LIBS)
 libvirt_driver_phyp_la_CFLAGS = $(LIBSSH2_CFLAGS) \
 		-I@top_srcdir@/src/conf
+if WITH_DRIVER_MODULES
+libvirt_driver_phyp_la_LDFLAGS = -module -avoid-version
+libvirt_driver_phyp_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
+endif
 libvirt_driver_phyp_la_SOURCES = $(PHYP_DRIVER_SOURCES)
 endif
 
@@ -553,6 +560,7 @@ libvirt_driver_openvz_la_CFLAGS = \
 		-I@top_srcdir@/src/conf
 if WITH_DRIVER_MODULES
 libvirt_driver_openvz_la_LDFLAGS = -module -avoid-version
+libvirt_driver_openvz_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_openvz_la_SOURCES = $(OPENVZ_DRIVER_SOURCES)
 endif
@@ -566,10 +574,11 @@ libvirt_la_BUILT_LIBADD += libvirt_driver_vbox.la
 endif
 libvirt_driver_vbox_la_CFLAGS = \
 		-I@top_srcdir@/src/conf
+libvirt_driver_vbox_la_LIBADD = $(DLOPEN_LIBS)
 if WITH_DRIVER_MODULES
 libvirt_driver_vbox_la_LDFLAGS = -module -avoid-version
+libvirt_driver_vbox_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
-libvirt_driver_vbox_la_LIBADD = $(DLOPEN_LIBS)
 libvirt_driver_vbox_la_SOURCES = $(VBOX_DRIVER_SOURCES)
 endif
 
@@ -586,6 +595,7 @@ libvirt_driver_xenapi_la_LDFLAGS =
 libvirt_driver_xenapi_la_LIBADD = $(LIBXENSERVER_LIBS) $(LIBCURL_LIBS)
 if WITH_DRIVER_MODULES
 libvirt_driver_xenapi_la_LDFLAGS += -module -avoid-version
+libvirt_driver_xenapi_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_xenapi_la_SOURCES = $(XENAPI_DRIVER_SOURCES)
 endif
@@ -604,6 +614,7 @@ libvirt_driver_qemu_la_LDFLAGS =
 libvirt_driver_qemu_la_LIBADD = $(NUMACTL_LIBS)
 if WITH_DRIVER_MODULES
 libvirt_driver_qemu_la_LDFLAGS += -module -avoid-version
+libvirt_driver_qemu_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_qemu_la_SOURCES = $(QEMU_DRIVER_SOURCES)
 
@@ -629,6 +640,7 @@ libvirt_driver_lxc_la_CFLAGS = \
 		-I@top_srcdir@/src/conf
 if WITH_DRIVER_MODULES
 libvirt_driver_lxc_la_LDFLAGS = -module -avoid-version
+libvirt_driver_lxc_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_lxc_la_SOURCES = $(LXC_DRIVER_SOURCES)
 
@@ -654,6 +666,7 @@ libvirt_driver_uml_la_LDFLAGS =
 libvirt_driver_uml_la_LIBADD = $(NUMACTL_LIBS)
 if WITH_DRIVER_MODULES
 libvirt_driver_uml_la_LDFLAGS += -module -avoid-version
+libvirt_driver_uml_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_uml_la_SOURCES = $(UML_DRIVER_SOURCES)
 endif
@@ -673,6 +686,7 @@ libvirt_driver_one_la_LIBADD = $(XMLRPC_LIBS)
 #libvirt_driver_one_la_CFLAGS  = "-DWITH_ONE"
 if WITH_DRIVER_MODULES
 libvirt_driver_one_la_LDFLAGS += -module -avoid-version
+libvirt_driver_one_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_one_la_SOURCES = $(ONE_DRIVER_SOURCES)
 endif
@@ -696,6 +710,7 @@ libvirt_driver_esx_la_LDFLAGS =
 libvirt_driver_esx_la_LIBADD = $(LIBCURL_LIBS)
 if WITH_DRIVER_MODULES
 libvirt_driver_esx_la_LDFLAGS += -module -avoid-version
+libvirt_driver_esx_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_esx_la_SOURCES = $(ESX_DRIVER_SOURCES)
 libvirt_driver_esx_la_DEPENDENCIES = $(ESX_DRIVER_GENERATED)
@@ -713,6 +728,7 @@ libvirt_driver_network_la_CFLAGS = \
 		-I@top_srcdir@/src/conf
 if WITH_DRIVER_MODULES
 libvirt_driver_network_la_LDFLAGS = -module -avoid-version
+libvirt_driver_network_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_network_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
 endif
@@ -734,6 +750,7 @@ libvirt_driver_interface_la_LDFLAGS =
 libvirt_driver_interface_la_LIBADD = $(NETCF_LIBS)
 if WITH_DRIVER_MODULES
 libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
+libvirt_driver_interface_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES)
 endif
@@ -750,7 +767,7 @@ libvirt_driver_secret_la_CFLAGS = \
 		-I@top_srcdir@/src/conf
 if WITH_DRIVER_MODULES
 libvirt_driver_secret_la_LDFLAGS = -module -avoid-version
-libvirt_driver_secret_la_LIBADD = ../gnulib/lib/libgnu.la
+libvirt_driver_secret_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)
 endif
@@ -771,6 +788,7 @@ noinst_LTLIBRARIES += libvirt_driver_storage.la
 endif
 if WITH_DRIVER_MODULES
 libvirt_driver_storage_la_LDFLAGS += -module -avoid-version
+libvirt_driver_storage_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_SOURCES)
 libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_FS_SOURCES)
@@ -826,6 +844,7 @@ endif
 
 if WITH_DRIVER_MODULES
 libvirt_driver_nodedev_la_LDFLAGS += -module -avoid-version
+libvirt_driver_nodedev_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 endif
 
@@ -843,7 +862,7 @@ libvirt_driver_nwfilter_la_LDFLAGS =
 libvirt_driver_nwfilter_la_LIBADD = $(LIBPCAP_LIBS)
 if WITH_DRIVER_MODULES
 libvirt_driver_nwfilter_la_LDFLAGS += -module -avoid-version
-libvirt_driver_nwfilter_la_LIBADD += ../gnulib/lib/libgnu.la
+libvirt_driver_nwfilter_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
 endif
 libvirt_driver_nwfilter_la_SOURCES = $(NWFILTER_DRIVER_SOURCES)
 endif
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 4e61e55..b6d36a2 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -4,6 +4,11 @@
 #
 
 
+# authhelper.h
+virRequestUsername;
+virRequestPassword;
+
+
 # bitmap.h
 virBitmapAlloc;
 virBitmapFree;
@@ -17,6 +22,8 @@ virBufferVSprintf;
 virBufferEscapeString;
 virBufferAdd;
 virBufferAddChar;
+virBufferStrcat;
+virBufferUse;
 virBufferContentAndReset;
 virBufferError;
 virBufferURIEncodeString;
@@ -139,7 +146,9 @@ virDomainDeleteConfig;
 virDomainDeviceDefFree;
 virDomainDeviceDefParse;
 virDomainDeviceTypeToString;
+virDomainDiskTypeToString;
 virDomainDiskBusTypeToString;
+virDomainDiskCacheTypeToString;
 virDomainDiskDefFree;
 virDomainDiskDeviceTypeToString;
 virDomainDiskInsert;
@@ -222,6 +231,7 @@ virDomainSnapshotHasChildren;
 virDomainSnapshotObjUnref;
 virDomainSnapshotDefParseString;
 virDomainSnapshotDefFormat;
+virDomainSnapshotDefFree;
 virDomainSnapshotAssignDef;
 virDomainObjAssignDef;
 
@@ -494,6 +504,8 @@ virNodeDeviceObjListFree;
 virNodeDeviceDefFree;
 virNodeDevCapsDefFree;
 virNodeDeviceDefFormat;
+virNodeDeviceDefParseFile;
+virNodeDeviceDefParseNode;
 virNodeDeviceDefParseString;
 virNodeDeviceObjLock;
 virNodeDeviceObjUnlock;
@@ -633,6 +645,7 @@ virStorageFileIsSharedFS;
 
 # threads.h
 virMutexInit;
+virMutexInitRecursive;
 virMutexDestroy;
 virMutexLock;
 virMutexUnlock;
@@ -645,13 +658,20 @@ virCondSignal;
 virCondBroadcast;
 
 # util.h
+virBuildPathInternal;
+virDirCreate;
+virFileOperation;
 virFileReadAll;
 virFileWriteStr;
+virFileStripSuffix;
+virFork;
 virStrToLong_i;
 virStrToLong_ll;
 virStrToLong_ull;
 virStrToLong_ui;
 virStrToDouble;
+virStrcpy;
+virStrncpy;
 virFileLinkPointsTo;
 virFileResolveLink;
 saferead;
@@ -687,6 +707,7 @@ virParseVersionString;
 virPipeReadUntilEOF;
 virAsprintf;
 virRun;
+virRunWithHook;
 virSkipSpaces;
 virKillProcess;
 virGetUserDirectory;
@@ -697,6 +718,10 @@ virFileFindMountPoint;
 virFileWaitForDevices;
 virFileMatchesNameSuffix;
 virArgvToString;
+virRandom;
+virRandomInitialize;
+virIndexToDiskName;
+
 
 # interface.h
 ifaceCtrl;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a3661f6..a6a8fea 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -39,6 +39,10 @@ LDADDS = \
 	$(LIBSOCKET) \
         $(COVERAGE_LDFLAGS)
 
+if WITH_DRIVER_MODULES
+LDADDS += ../src/libvirt.la
+endif
+
 EXTRA_DIST =		\
         oomtrace.pl     \
 	test-lib.sh	\
@@ -329,7 +333,7 @@ nodeinfotest_LDADD = $(LDADDS)
 
 statstest_SOURCES = \
 	statstest.c testutils.h testutils.c
-statstest_LDADD = $(LDADDS)
+statstest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)
 
 if WITH_SECDRIVER_SELINUX
 seclabeltest_SOURCES = \
-- 
1.7.0.4

--
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]