[CRIU] Lots of "conflicting type" errors when trying to build
Pavel Emelyanov
xemul at virtuozzo.com
Mon Aug 7 19:30:45 MSK 2017
On 08/07/2017 06:28 PM, Bryan Cattle wrote:
> Pavel,
> Sure. Do I need to detect a certain glibc version that includes these types, and disable your definitions if glibc is greater than that version?
In the simplest case yes -- we have a feature-test in the build system. Ideal fix would
be to use native types always, but I don't know whether every glibc has them.
> Thanks,
> Bryan
>
> On Mon, Aug 7, 2017 at 11:15 AM Pavel Emelyanov <xemul at virtuozzo.com <mailto:xemul at virtuozzo.com>> wrote:
>
> On 08/04/2017 08:55 AM, Bryan Cattle wrote:
> > Hello,
> > I'm trying to build CRIU and getting tons of "conflicting type" errors. I'm trying to build using headers from an older kernel than the one running on my system. (The reason for this is because I want to run CRIU under a user mode kernel.)
> >
> > I'm getting errors like the following:
> >
> > CC criu/arch/x86/crtools.o
> > In file included from /usr/include/asm-generic/types.h:6:0,
> > from /usr/include/asm/types.h:4,
> > from /home/ec2-user/linux-4.3.5/include/uapi/linux/types.h:4,
> > from /home/ec2-user/linux-4.3.5/include/linux/types.h:5,
> > from /home/ec2-user/linux-4.3.5/include/uapi/linux/futex.h:5,
> > from /home/ec2-user/linux-4.3.5/include/linux/futex.h:4,
> > from include/common/lock.h:5,
> > from criu/include/restorer.h:13,
> > from criu/arch/x86/crtools.c:21:
> > /home/ec2-user/linux-4.3.5/include/asm-generic/int-ll64.h:24:26: error: conflicting types for ‘s64’
> > typedef signed long long s64;
> > ^
> > In file included from criu/arch/x86/include/asm/int.h:4:0,
> > from criu/arch/x86/include/asm/types.h:9,
> > from criu/include/types.h:4,
> > from criu/arch/x86/crtools.c:11:
> > criu/include/asm-generic/int.h:7:18: note: previous declaration of ‘s64’ was here
> > typedef int64_t s64;
> >
> > TLDR: the definition of s64 in criu/include/asm-generic/int.h is conflicting with the definition in linux-4.3.5/include/asm-generic/int-ll64.h.
> >
> > Why is this happening? Does this indicate some sort of incompatibility with kernel version 4.3.5?
>
> We've re-defined the needed integer types for criu in internal headers, and this error means, that
> the very same types are declared in glibc. It's not incompatibility, it's just the need to remove
> the homegrown files with integer types and include proper system-wide ones :) Would you be interested
> in submitting such a patch?
>
> > I'm compiling CRIU with the command
> >
> > $ make USERCFLAGS="-I$HOME/include -I$HOME/linux-4.3.5/include/ -L$HOME/lib"
> >
> > Thanks,
> > Bryan
> >
> >
> >
> >
> > _______________________________________________
> > CRIU mailing list
> > CRIU at openvz.org <mailto:CRIU at openvz.org>
> > https://lists.openvz.org/mailman/listinfo/criu
> >
>
More information about the CRIU
mailing list