[lxc-devel] [PATCH] Fix build with --enable-tests on Fedora

Dwight Engen dwight.engen at oracle.com
Wed Nov 28 21:51:37 UTC 2012


When using --enable-tests on Fedora, the linker complains with:
"undefined reference to symbol sem_getvalue", which nm shows to be in
libpthread not librt. Build tested on Fedora, Oracle Linux, and Ubuntu.

Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
---
 src/tests/Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index f4e4a5a..fa61f70 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -1,6 +1,6 @@
 if ENABLE_TESTS
 
-LDADD = ../lxc/liblxc.so -lrt
+LDADD = ../lxc/liblxc.so -lpthread
 lxc_test_containertests_SOURCES = containertests.c
 lxc_test_locktests_SOURCES = locktests.c
 lxc_test_startone_SOURCES = startone.c
-- 
1.7.1





More information about the lxc-devel mailing list