[Announce] CRIU 3.5 "Clay Jay" is out

Submitted by Andrey Vagin on Oct. 1, 2017, 6:17 a.m.

Details

Message ID 20171001061755.GA14208@outlook.office365.com
State Not Applicable
Series "CRIU 3.5 "Clay Jay" is out"
Headers show

Commit Message

Andrey Vagin Oct. 1, 2017, 6:17 a.m.
On Thu, Sep 28, 2017 at 11:19:20AM +0200, Adrian Reber wrote:
> On Wed, Sep 27, 2017 at 03:35:02PM +0300, Pavel Emelyanov wrote:
> > Please, join me in honoring Mike and Adrian for lazy restore and Dima for VDSO rework!
> > Both features are finally released and ... are ready to get fixed :)
> > 
> > Full changelog is https://criu.org/Download/criu/3.5
> > Sources http://download.openvz.org/criu/criu-3.5.tar.bz2
> > 
> > Have fun!
> 
> I already had fun with this release ;-) It does not build on any
> architecture on Fedora's development branch rawhide:
> 
> 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
> 
> See the attached patch for a simple fix.

A new aio_abi.h includes linux/fs.h.
man 2 mounts says that we need to include sys/mount.h
man 2 io_getevents says that we need to include linux/aio_abi.h

There is not information, that linux/aio_abi.h has to be included before sys/mount.h

https://bugzilla.redhat.com/show_bug.cgi?id=1497501


> 
> 		Adrian

> From cb21b73e859de77804dde8579c6d1d1f84eec3a6 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>
> ---
>  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"
>  
> -- 
> 1.8.3.1
> 

> _______________________________________________
> CRIU mailing list
> CRIU@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu

Patch hide | download patch | download mbox

--- /usr/include/linux/aio_abi.h	2017-10-01 09:10:29.265000000 +0300
+++ aio_abi.h	2017-09-30 10:11:03.499000000 +0300
@@ -28,6 +28,7 @@ 
 #define __LINUX__AIO_ABI_H
 
 #include <linux/types.h>
+#include <linux/fs.h>
 #include <asm/byteorder.h>

Actually it looks like a bug.