All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] criu: fix build failure with newer glibc and kernel
@ 2018-04-13  2:50 Yi Zhao
  2018-04-13  2:50 ` [PATCH 2/2] criu: refresh patches to fix QA warning Yi Zhao
  2018-04-13 19:54 ` [PATCH 1/2] criu: fix build failure with newer glibc and kernel Bruce Ashfield
  0 siblings, 2 replies; 3+ messages in thread
From: Yi Zhao @ 2018-04-13  2:50 UTC (permalink / raw)
  To: meta-virtualization, mark.asselstine, bruce.ashfield

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>
---
 recipes-containers/criu/criu_git.bb                |  1 +
 .../fix-building-on-newest-glibc-and-kernel.patch  | 47 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch

diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
index 083609f..7d62f35 100644
--- a/recipes-containers/criu/criu_git.bb
+++ b/recipes-containers/criu/criu_git.bb
@@ -21,6 +21,7 @@ SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
            file://0002-criu-Skip-documentation-install.patch \
            file://0001-criu-Change-libraries-install-directory.patch \
            file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
+           file://fix-building-on-newest-glibc-and-kernel.patch \
           "
 
 COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
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 0000000..d6341da
--- /dev/null
+++ b/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch
@@ -0,0 +1,47 @@
+From f41e386d4d40e3e26b0cfdc85a812b7edb337f1d Mon Sep 17 00:00:00 2001
+From: Adrian Reber <areber@redhat.com>
+Date: Thu, 28 Sep 2017 09:13:33 +0000
+Subject: [PATCH] fix building on newest glibc and kernel
+
+On Fedora rawhide with kernel-headers-4.14.0-0.rc2.git0.1.fc28.x86_64
+glibc-devel-2.26.90-15.fc28.x86_64 criu does not build any more:
+
+In file included from /usr/include/linux/aio_abi.h:31:0,
+                 from criu/cr-check.c:24:
+/usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant
+   MS_RDONLY = 1,  /* Mount read-only.  */
+   ^
+make[2]: *** [/builddir/build/BUILD/criu-3.5/scripts/nmk/scripts/build.mk:111: criu/cr-check.o] Error 1
+make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2
+make: *** [Makefile:233: criu] Error 2
+
+This simple re-ordering of includes fixes it for me.
+
+Signed-off-by: Adrian Reber <areber@redhat.com>
+Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
+
+Upstream-Status: Backport
+[https://github.com/checkpoint-restore/criu/commit/f41e386d4d40e3e26b0cfdc85a812b7edb337f1d#diff-cc847b1cc975358c6582595be92d48db]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ criu/cr-check.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/criu/cr-check.c b/criu/cr-check.c
+index 5dd448b..8986ec4 100644
+--- a/criu/cr-check.c
++++ b/criu/cr-check.c
+@@ -21,8 +21,8 @@
+ #include <netinet/in.h>
+ #include <sys/prctl.h>
+ #include <sched.h>
+-#include <linux/aio_abi.h>
+ #include <sys/mount.h>
++#include <linux/aio_abi.h>
+ 
+ #include "../soccr/soccr.h"
+ 
+-- 
+2.7.4
+
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] criu: refresh patches to fix QA warning
  2018-04-13  2:50 [PATCH 1/2] criu: fix build failure with newer glibc and kernel Yi Zhao
@ 2018-04-13  2:50 ` Yi Zhao
  2018-04-13 19:54 ` [PATCH 1/2] criu: fix build failure with newer glibc and kernel Bruce Ashfield
  1 sibling, 0 replies; 3+ messages in thread
From: Yi Zhao @ 2018-04-13  2:50 UTC (permalink / raw)
  To: meta-virtualization, mark.asselstine, bruce.ashfield

Refresh patches with devtool command to fix do_patch warning.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 .../0001-criu-Change-libraries-install-directory.patch     |  8 +++-----
 .../criu/files/0001-criu-Fix-toolchain-hardcode.patch      |  6 ++----
 .../criu/files/0002-criu-Skip-documentation-install.patch  | 14 ++++++--------
 .../files/fix-building-on-newest-glibc-and-kernel.patch    |  8 +++-----
 ...-Makefile-overwrite-install-lib-to-allow-multiarc.patch |  6 ++----
 5 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch b/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
index 4908e47..afb1332 100644
--- a/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
+++ b/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
@@ -1,4 +1,4 @@
-From 78390305829316633acee2ca5607331b0e37a104 Mon Sep 17 00:00:00 2001
+From f64fbca70e6049dad3c404d871f2383d97725d2d Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Fri, 8 Sep 2017 15:11:31 -0400
 Subject: [PATCH] criu: Change libraries install directory
@@ -7,12 +7,13 @@ Install the libraries into /usr/lib(or /usr/lib64)
 
 Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
 ---
  Makefile.install | 13 -------------
  1 file changed, 13 deletions(-)
 
 diff --git a/Makefile.install b/Makefile.install
-index 3987bcc..73d98a4 100644
+index 1def3cf..d020eef 100644
 --- a/Makefile.install
 +++ b/Makefile.install
 @@ -9,19 +9,6 @@ LIBEXECDIR	?= $(PREFIX)/libexec
@@ -35,6 +36,3 @@ index 3987bcc..73d98a4 100644
  # LIBDIR falls back to the standard path.
  LIBDIR ?= $(PREFIX)/lib
  
--- 
-2.7.4
-
diff --git a/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch b/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
index dc5b897..d1f136c 100644
--- a/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
+++ b/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
@@ -1,4 +1,4 @@
-From af679853a45fe63f680c99e70416c8ac620d23b8 Mon Sep 17 00:00:00 2001
+From c005b7a4874f55df687ff22bc425551775581421 Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Fri, 8 Sep 2017 15:02:14 -0400
 Subject: [PATCH] criu: Fix toolchain hardcode
@@ -9,6 +9,7 @@ be taken.
 Signed-off-by: Yang Shi <yang.shi@windriver.com>
 Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
 ---
  Makefile                       |  2 +-
  scripts/nmk/scripts/include.mk |  2 +-
@@ -96,6 +97,3 @@ index 56dba84..1698821 100644
  
  export RM HOSTLD LD HOSTCC CC CPP AS AR STRIP OBJCOPY OBJDUMP
  export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE
--- 
-2.7.4
-
diff --git a/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch b/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch
index ba414d9..af45db7 100644
--- a/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch
+++ b/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch
@@ -1,21 +1,22 @@
-From 07d9b3d0c372e45127dd51781d9564e8bee90dbe Mon Sep 17 00:00:00 2001
+From 45d74ae8a314c481398ba91a3697ffbd074cd98b Mon Sep 17 00:00:00 2001
 From: Jianchuan Wang <jianchuan.wang@windriver.com>
 Date: Tue, 16 Aug 2016 09:42:24 +0800
-Subject: [PATCH 2/2] criu: Skip documentation install
+Subject: [PATCH] criu: Skip documentation install
 
 asciidoc is needed to generate CRIU documentation, so skip it in install.
 
 Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+
 ---
  Makefile.install | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile.install b/Makefile.install
-index a30dc96..33143fb 100644
+index 3987bcc..1def3cf 100644
 --- a/Makefile.install
 +++ b/Makefile.install
-@@ -22,7 +22,7 @@ install-tree:
- .PHONY: install-tree
+@@ -29,7 +29,7 @@ export PREFIX BINDIR SBINDIR MANDIR RUNDIR
+ export LIBDIR INCLUDEDIR LIBEXECDIR
  
  install-man:
 -	$(Q) $(MAKE) -C Documentation install
@@ -23,6 +24,3 @@ index a30dc96..33143fb 100644
  .PHONY: install-man
  
  install-lib: lib
--- 
-2.7.4
-
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
index d6341da..9361adc 100644
--- 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
@@ -1,4 +1,4 @@
-From f41e386d4d40e3e26b0cfdc85a812b7edb337f1d Mon Sep 17 00:00:00 2001
+From b59947007362b53e9f41f1e5a33071dedf1c59ac Mon Sep 17 00:00:00 2001
 From: Adrian Reber <areber@redhat.com>
 Date: Thu, 28 Sep 2017 09:13:33 +0000
 Subject: [PATCH] fix building on newest glibc and kernel
@@ -24,12 +24,13 @@ Upstream-Status: Backport
 [https://github.com/checkpoint-restore/criu/commit/f41e386d4d40e3e26b0cfdc85a812b7edb337f1d#diff-cc847b1cc975358c6582595be92d48db]
 
 Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
 ---
  criu/cr-check.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/criu/cr-check.c b/criu/cr-check.c
-index 5dd448b..8986ec4 100644
+index 1dd887a..93df2ab 100644
 --- a/criu/cr-check.c
 +++ b/criu/cr-check.c
 @@ -21,8 +21,8 @@
@@ -42,6 +43,3 @@ index 5dd448b..8986ec4 100644
  
  #include "../soccr/soccr.h"
  
--- 
-2.7.4
-
diff --git a/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch b/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
index c2512a0..59e7bcb 100644
--- a/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
+++ b/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
@@ -1,4 +1,4 @@
-From 89f9b87904bd312b817ffaa7d83abfd5e84d723d Mon Sep 17 00:00:00 2001
+From 6caf90592d61c8c45b32cb7ff76709f9326030e2 Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Fri, 8 Sep 2017 15:40:49 -0400
 Subject: [PATCH] lib/Makefile: overwrite install-lib, to allow multiarch
@@ -8,6 +8,7 @@ I am not sure why Yocto installs python modules in arch specific
 INSTALL_LIB.
 
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
 ---
  lib/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -25,6 +26,3 @@ index b1bb057..06f5c5d 100644
  .PHONY: install
  
  uninstall:
--- 
-2.7.4
-
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] criu: fix build failure with newer glibc and kernel
  2018-04-13  2:50 [PATCH 1/2] criu: fix build failure with newer glibc and kernel Yi Zhao
  2018-04-13  2:50 ` [PATCH 2/2] criu: refresh patches to fix QA warning Yi Zhao
@ 2018-04-13 19:54 ` Bruce Ashfield
  1 sibling, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2018-04-13 19:54 UTC (permalink / raw)
  To: Yi Zhao, meta-virtualization, mark.asselstine

merged

Bruce

On 2018-04-12 10:50 PM, Yi Zhao wrote:
> 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>
> ---
>   recipes-containers/criu/criu_git.bb                |  1 +
>   .../fix-building-on-newest-glibc-and-kernel.patch  | 47 ++++++++++++++++++++++
>   2 files changed, 48 insertions(+)
>   create mode 100644 recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch
> 
> diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
> index 083609f..7d62f35 100644
> --- a/recipes-containers/criu/criu_git.bb
> +++ b/recipes-containers/criu/criu_git.bb
> @@ -21,6 +21,7 @@ SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
>              file://0002-criu-Skip-documentation-install.patch \
>              file://0001-criu-Change-libraries-install-directory.patch \
>              file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
> +           file://fix-building-on-newest-glibc-and-kernel.patch \
>             "
>   
>   COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
> 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 0000000..d6341da
> --- /dev/null
> +++ b/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch
> @@ -0,0 +1,47 @@
> +From f41e386d4d40e3e26b0cfdc85a812b7edb337f1d Mon Sep 17 00:00:00 2001
> +From: Adrian Reber <areber@redhat.com>
> +Date: Thu, 28 Sep 2017 09:13:33 +0000
> +Subject: [PATCH] fix building on newest glibc and kernel
> +
> +On Fedora rawhide with kernel-headers-4.14.0-0.rc2.git0.1.fc28.x86_64
> +glibc-devel-2.26.90-15.fc28.x86_64 criu does not build any more:
> +
> +In file included from /usr/include/linux/aio_abi.h:31:0,
> +                 from criu/cr-check.c:24:
> +/usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant
> +   MS_RDONLY = 1,  /* Mount read-only.  */
> +   ^
> +make[2]: *** [/builddir/build/BUILD/criu-3.5/scripts/nmk/scripts/build.mk:111: criu/cr-check.o] Error 1
> +make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2
> +make: *** [Makefile:233: criu] Error 2
> +
> +This simple re-ordering of includes fixes it for me.
> +
> +Signed-off-by: Adrian Reber <areber@redhat.com>
> +Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
> +
> +Upstream-Status: Backport
> +[https://github.com/checkpoint-restore/criu/commit/f41e386d4d40e3e26b0cfdc85a812b7edb337f1d#diff-cc847b1cc975358c6582595be92d48db]
> +
> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
> +---
> + criu/cr-check.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/criu/cr-check.c b/criu/cr-check.c
> +index 5dd448b..8986ec4 100644
> +--- a/criu/cr-check.c
> ++++ b/criu/cr-check.c
> +@@ -21,8 +21,8 @@
> + #include <netinet/in.h>
> + #include <sys/prctl.h>
> + #include <sched.h>
> +-#include <linux/aio_abi.h>
> + #include <sys/mount.h>
> ++#include <linux/aio_abi.h>
> +
> + #include "../soccr/soccr.h"
> +
> +--
> +2.7.4
> +
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-13 19:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-13  2:50 [PATCH 1/2] criu: fix build failure with newer glibc and kernel Yi Zhao
2018-04-13  2:50 ` [PATCH 2/2] criu: refresh patches to fix QA warning Yi Zhao
2018-04-13 19:54 ` [PATCH 1/2] criu: fix build failure with newer glibc and kernel Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.