diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2018-04-13 10:50:08 +0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-04-13 15:53:57 -0400 |
commit | 3e709e6665ba89f5875584de259e1689728cf83b (patch) | |
tree | 0f9d1436d8140655b8ca948d63b5b87150f064a9 /recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch | |
parent | dcaa0ca68fc5884a81f01bac8f146b649904a2ea (diff) | |
download | meta-virtualization-3e709e6665ba89f5875584de259e1689728cf83b.tar.gz |
criu: fix build failure with newer glibc and kernel
With newer glibc(>= 2.26) and kernel(>=4.14), criu would fail to build:
In file included from
/buildarea/build/tmp/work/core2-64-poky-linux/criu/3.4+gitAUTOINC+a31c1854e1-r0/recipe-sysroot/usr/include/linux/aio_abi.h:31:0,
from criu/cr-check.c:24:
/buildarea/build/tmp/work/core2-64-poky-linux/criu/3.4+gitAUTOINC+a31c1854e1-r0/recipe-sysroot/usr/include/sys/mount.h:35:3:
error: expected identifier before numeric constant
MS_RDONLY = 1, /* Mount read-only. */
^
CC criu/parasite-syscall.o
CC criu/pipes.o
CC criu/pie-util.o
CC criu/pie-util-vdso.o
CC criu/plugin.o
/buildarea/build/tmp/work/core2-64-poky-linux/criu/3.4+gitAUTOINC+a31c1854e1-r0/git/scripts/nmk/scripts/build.mk:110:
recipe for target 'criu/cr-check.o' failed
make[2]: *** [criu/cr-check.o] Error 1
Backport a patch to fix it.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch')
-rw-r--r-- | recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch b/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch new file mode 100644 index 00000000..d6341da7 --- /dev/null +++ b/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From f41e386d4d40e3e26b0cfdc85a812b7edb337f1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Adrian Reber <areber@redhat.com> | ||
3 | Date: Thu, 28 Sep 2017 09:13:33 +0000 | ||
4 | Subject: [PATCH] fix building on newest glibc and kernel | ||
5 | |||
6 | On Fedora rawhide with kernel-headers-4.14.0-0.rc2.git0.1.fc28.x86_64 | ||
7 | glibc-devel-2.26.90-15.fc28.x86_64 criu does not build any more: | ||
8 | |||
9 | In file included from /usr/include/linux/aio_abi.h:31:0, | ||
10 | from criu/cr-check.c:24: | ||
11 | /usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant | ||
12 | MS_RDONLY = 1, /* Mount read-only. */ | ||
13 | ^ | ||
14 | make[2]: *** [/builddir/build/BUILD/criu-3.5/scripts/nmk/scripts/build.mk:111: criu/cr-check.o] Error 1 | ||
15 | make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2 | ||
16 | make: *** [Makefile:233: criu] Error 2 | ||
17 | |||
18 | This simple re-ordering of includes fixes it for me. | ||
19 | |||
20 | Signed-off-by: Adrian Reber <areber@redhat.com> | ||
21 | Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> | ||
22 | |||
23 | Upstream-Status: Backport | ||
24 | [https://github.com/checkpoint-restore/criu/commit/f41e386d4d40e3e26b0cfdc85a812b7edb337f1d#diff-cc847b1cc975358c6582595be92d48db] | ||
25 | |||
26 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
27 | --- | ||
28 | criu/cr-check.c | 2 +- | ||
29 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
30 | |||
31 | diff --git a/criu/cr-check.c b/criu/cr-check.c | ||
32 | index 5dd448b..8986ec4 100644 | ||
33 | --- a/criu/cr-check.c | ||
34 | +++ b/criu/cr-check.c | ||
35 | @@ -21,8 +21,8 @@ | ||
36 | #include <netinet/in.h> | ||
37 | #include <sys/prctl.h> | ||
38 | #include <sched.h> | ||
39 | -#include <linux/aio_abi.h> | ||
40 | #include <sys/mount.h> | ||
41 | +#include <linux/aio_abi.h> | ||
42 | |||
43 | #include "../soccr/soccr.h" | ||
44 | |||
45 | -- | ||
46 | 2.7.4 | ||
47 | |||