From 0940208b526b9657289513c0f642fa6b7f3df15f Mon Sep 17 00:00:00 2001 From: Julio Faracco Date: Fri, 24 Oct 2014 10:33:52 -0200 Subject: [PATCH] tests: Add SELINUX_LIBS to fix viridentitytest linker bug In a clean build system (Ubuntu 14.04), the viridentitytest failed to compile. Even if all the SELINUX libraries and depedencies are installed. See the error message below: [...] CC viridentitytest.o CCLD viridentitytest /usr/bin/ld: viridentitytest.o: undefined reference to symbol 'security_disable' //lib/x86_64-linux-gnu/libselinux.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [viridentitytest] Error 1 Simply adding the variable SELINUX_LIBS in viridentitytest rules of Makefile.am to include SELINUX libraries into viridentitytest solved that compilation issue. Signed-off-by: Julio Faracco Signed-off-by: Eric Blake (cherry picked from commit f2a2d0e9ab89a50d9552d2c70de0301ad2b83224) --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index 293611b1cb..1bea49b983 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -927,6 +927,7 @@ viridentitytest_SOURCES = \ viridentitytest.c testutils.h testutils.c viridentitytest_LDADD = $(LDADDS) if WITH_SELINUX +viridentitytest_LDADD += $(SELINUX_LIBS) viridentitytest_DEPENDENCIES = libsecurityselinuxhelper.la \ ../src/libvirt.la endif WITH_SELINUX -- GitLab