Re: [BUG] EPOLL_CLOEXEC undeclared

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

 



On 01/18/2012 01:01 AM, Philipp Hahn wrote:
> Hello Eric,
> 
> Eric Blake <eblake@xxxxxxxxxx> wrote:
>> On 01/17/2012 04:42 AM, Philipp Hahn wrote:
>> And what kernel is that system running?
> 
> 2.6.32

That's an unusual mix, where the syscall exists (since 2.6.27) but libc
is too old to use the syscall.

> 
>> We already refuse to compile
>> lxc for RHEL 5 (kernel 2.6.18), as that particular kernel is too old to
>> usefully support namespace and other operations required by lxc.
> 
> I haven't used lxc on that particular system, but only tried to comile
> that newer version. configure did detect lxc itself and then failed
> building it, so that was the only thing to get me started looking at
> that issue. Since I don't need lxc on that system, I'm fine with just
> disabling lxc.

Then how about this patch:

From 330f666036943a0fc423a4b5db2ca294fb2a4298 Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@xxxxxxxxxx>
Date: Thu, 19 Jan 2012 13:35:39 -0700
Subject: [PATCH] build: skip lxc with too-old glibc

Since we already require the kernel to be new enough to support
LO_FLAGS_AUTOCLEAR, we might as well also require glibc to be
new enough to support epoll_create1().

* configure.ac (with_lxc): We require glibc 2.9 for LXC.
Reported by Philipp Hahn.
---
 configure.ac |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 729ba9b..02d60d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -734,16 +734,17 @@ if test "$with_lxc" = "yes" || test "$with_lxc" =
"check"; then
     AC_TRY_LINK([
         #include <sched.h>
         #include <linux/loop.h>
+	#include <sys/epoll.h>
     ], [
-        unshare (!LO_FLAGS_AUTOCLEAR);
+        unshare (!(LO_FLAGS_AUTOCLEAR + EPOLL_CLOEXEC));
     ], [
         with_lxc=yes
     ], [
         if test "$with_lxc" = "check"; then
             with_lxc=no
-            AC_MSG_NOTICE([Function unshare() not present in <sched.h>
header but required for LXC driver, disabling it])
+            AC_MSG_NOTICE([Required kernel features were not found,
disabling LXC])
         else
-            AC_MSG_ERROR([Function unshare() not present in <sched.h>
header, but required for LXC driver])
+            AC_MSG_ERROR([Required kernel features for LXC were not found])
         fi
     ])
 fi
-- 
1.7.7.5



-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]