[libvirt-sandbox][PATCH 2/4] Makefile: link SELINUX into libvirt-sandbox-1.0.so

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

 



The code that uses SELinux is compiled into libvirt-sandbox-1.0.so so
it must be linked against -lselinux. Otherwise an error occurs:

make[4]: Entering directory '/home/zippy/work/libvirt/libvirt-sanbox.git/libvirt-sandbox'
  CCLD     libvirt-sandbox-init-lxc
./.libs/libvirt-sandbox-1.0.so: undefined reference to `getcon'
./.libs/libvirt-sandbox-1.0.so: undefined reference to `freecon'
collect2: error: ld returned 1 exit status

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 libvirt-sandbox/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libvirt-sandbox/Makefile.am b/libvirt-sandbox/Makefile.am
index ea485b7..96302cb 100644
--- a/libvirt-sandbox/Makefile.am
+++ b/libvirt-sandbox/Makefile.am
@@ -142,12 +142,14 @@ libvirt_sandbox_1_0_la_CFLAGS = \
 			$(GIO_UNIX_CFLAGS) \
 			$(LIBVIRT_GLIB_CFLAGS) \
 			$(LIBVIRT_GOBJECT_CFLAGS) \
+			$(SELINUX_CFLAGS) \
 			$(WARN_CFLAGS) \
 			$(NULL)
 libvirt_sandbox_1_0_la_LIBADD = \
 			$(GIO_UNIX_LIBS) \
 			$(LIBVIRT_GLIB_LIBS) \
 			$(LIBVIRT_GOBJECT_LIBS) \
+			$(SELINUX_LIBS) \
 			$(CYGWIN_EXTRA_LIBADD) \
 			$(NULL)
 libvirt_sandbox_1_0_la_DEPENDENCIES = \
@@ -174,7 +176,6 @@ libvirt_sandbox_init_common_CFLAGS = \
 			$(LIBVIRT_GLIB_CFLAGS) \
 			$(LIBVIRT_GOBJECT_CFLAGS) \
 			$(CAPNG_CFLAGS) \
-			$(SELINUX_CFLAGS) \
 			$(WARN_CFLAGS) \
 			$(NULL)
 libvirt_sandbox_init_common_LDFLAGS = \
@@ -184,7 +185,6 @@ libvirt_sandbox_init_common_LDFLAGS = \
 			$(LIBVIRT_GLIB_LIBS) \
 			$(LIBVIRT_GOBJECT_LIBS) \
 			$(CAPNG_LIBS) \
-			$(SELINUX_LIBS) \
 			$(WARN_CFLAGS) \
 			$(NULL)
 libvirt_sandbox_init_common_LDADD = \
-- 
2.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]