<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    It works on my Fedora19 box, <br>
    but there are similar issues on my Fedora14 box:<br>
    <i><small><br>
        gcc -I../../src -DLXCROOTFSMOUNT=\"/usr/lib64/lxc/rootfs\"
        -DLXCPATH=\"/usr/var/lib/lxc\"
        -DLXC_GLOBAL_CONF=\"/usr/etc/lxc/lxc.conf\"
        -DLXCINITDIR=\"/usr/libexec\" -DLIBEXECDIR=\"/usr/libexec\"
        -DLXCTEMPLATEDIR=\"/usr/share/lxc/templates\"
        -DLOGPATH=\"/usr/var/log/lxc\"
        -DLXC_DEFAULT_CONFIG=\"/usr/etc/lxc/default.conf\"
        -DLXC_USERNIC_DB=\"/run/lxc/nics\"
        -DLXC_USERNIC_CONF=\"/usr/etc/lxc/lxc-usernet\"
        -DDEFAULT_CGROUP_PATTERN=\"/lxc/%n\" -DRUNTIME_PATH=\"/run\"
        -DSBINDIR=\"/usr/sbin\"   -DHAVE_SELINUX   -g -O2 -Wall -Werror
        -static  -o init.lxc.static lxc_init.o error.o log.o utils.o
        caps.o   -lrt -lutil -lpthread -lselinux <br>
        /usr/bin/ld: cannot find -lrt<br>
        /usr/bin/ld: cannot find -lutil<br>
        /usr/bin/ld: cannot find -lpthread<br>
        /usr/bin/ld: cannot find -lselinux<br>
        /usr/bin/ld: cannot find -lc<br>
      </small></i><br>
    -Simon<br>
    <br>
    On 06/20/2014 02:53 AM, Dwight Engen wrote:
    <blockquote cite="mid:20140619145301.020e209f@oracle.com"
      type="cite">
      <pre wrap="">Signed-off-by: Dwight Engen <a class="moz-txt-link-rfc2396E" href="mailto:dwight.engen@oracle.com"><dwight.engen@oracle.com></a>
---
 configure.ac        | 6 +++---
 src/lxc/Makefile.am | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8f5d21c..37eb9d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -218,8 +218,8 @@ fi
 AM_CONDITIONAL([ENABLE_SELINUX], [test "x$enable_selinux" = "xyes"])
 AM_COND_IF([ENABLE_SELINUX],
        [AC_CHECK_HEADER([selinux/selinux.h],[],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])])
-       AC_CHECK_LIB([selinux], [setexeccon_raw],[],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])])
-       AC_SUBST([SELINUX_LIBS])])
+       AC_CHECK_LIB([selinux], [setexeccon_raw],[true],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])])
+       AC_SUBST([SELINUX_LIBS], [-lselinux])])
 
 # Seccomp syscall filter
 AC_ARG_ENABLE([seccomp],
@@ -277,7 +277,7 @@ fi
 AM_CONDITIONAL([ENABLE_CAP], [test "x$enable_capabilities" = "xyes"])
 
 AM_COND_IF([ENABLE_CAP],
-       [AC_CHECK_LIB(cap,cap_set_proc,[],[AC_MSG_ERROR([You are missing libcap support.])])
+       [AC_CHECK_LIB(cap,cap_set_proc,[true],[AC_MSG_ERROR([You are missing libcap support.])])
        AC_SUBST([CAP_LIBS], [-lcap])])
 
 # HAVE_SCMP_FILTER_CTX=1 will tell us we have libseccomp api >= 1.0.0
diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
index 2403bd7..009b446 100644
--- a/src/lxc/Makefile.am
+++ b/src/lxc/Makefile.am
@@ -152,7 +152,7 @@ liblxc_so_LDFLAGS = \
        -shared \
        -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
 
-liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SECCOMP_LIBS)
+liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
 
 if ENABLE_CGMANAGER
 liblxc_so_LDADD += $(CGMANAGER_LIBS) $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS)
@@ -208,7 +208,7 @@ AM_LDFLAGS = -Wl,-E
 if ENABLE_RPATH
 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
 endif
-LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SECCOMP_LIBS@
+LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
 
 lxc_attach_SOURCES = lxc_attach.c
 lxc_autostart_SOURCES = lxc_autostart.c
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Yun Tong Jin, Simon
Linux Technology Center, Open Virtualization project
IBM Systems & Technology Group
<a class="moz-txt-link-abbreviated" href="mailto:jinyt@cn.ibm.com">jinyt@cn.ibm.com</a>, Phone: 824549654 </pre>
  </body>
</html>