[libvirt] [libvirt-sandbox][PATCH 2/4] Makefile: link SELINUX into libvirt-sandbox-1.0.so
Michal Privoznik
mprivozn at redhat.com
Tue Nov 4 14:40:49 UTC 2014
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 at redhat.com>
---
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
More information about the libvir-list
mailing list