<div><div dir="auto">Pavel,</div><div dir="auto">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?</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Bryan </div><br><div class="gmail_quote"><div>On Mon, Aug 7, 2017 at 11:15 AM Pavel Emelyanov <<a href="mailto:xemul@virtuozzo.com">xemul@virtuozzo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 08/04/2017 08:55 AM, Bryan Cattle wrote:<br>
> Hello,<br>
> 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.)<br>
><br>
> I'm getting errors like the following:<br>
><br>
> CC criu/arch/x86/crtools.o<br>
> In file included from /usr/include/asm-generic/types.h:6:0,<br>
> from /usr/include/asm/types.h:4,<br>
> from /home/ec2-user/linux-4.3.5/include/uapi/linux/types.h:4,<br>
> from /home/ec2-user/linux-4.3.5/include/linux/types.h:5,<br>
> from /home/ec2-user/linux-4.3.5/include/uapi/linux/futex.h:5,<br>
> from /home/ec2-user/linux-4.3.5/include/linux/futex.h:4,<br>
> from include/common/lock.h:5,<br>
> from criu/include/restorer.h:13,<br>
> from criu/arch/x86/crtools.c:21:<br>
> /home/ec2-user/linux-4.3.5/include/asm-generic/int-ll64.h:24:26: error: conflicting types for ‘s64’<br>
> typedef signed long long s64;<br>
> ^<br>
> In file included from criu/arch/x86/include/asm/int.h:4:0,<br>
> from criu/arch/x86/include/asm/types.h:9,<br>
> from criu/include/types.h:4,<br>
> from criu/arch/x86/crtools.c:11:<br>
> criu/include/asm-generic/int.h:7:18: note: previous declaration of ‘s64’ was here<br>
> typedef int64_t s64;<br>
><br>
> 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.<br>
><br>
> Why is this happening? Does this indicate some sort of incompatibility with kernel version 4.3.5?<br>
<br>
We've re-defined the needed integer types for criu in internal headers, and this error means, that<br>
the very same types are declared in glibc. It's not incompatibility, it's just the need to remove<br>
the homegrown files with integer types and include proper system-wide ones :) Would you be interested<br>
in submitting such a patch?<br>
<br>
> I'm compiling CRIU with the command<br>
><br>
> $ make USERCFLAGS="-I$HOME/include -I$HOME/linux-4.3.5/include/ -L$HOME/lib"<br>
><br>
> Thanks,<br>
> Bryan<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> CRIU mailing list<br>
> <a href="mailto:CRIU@openvz.org" target="_blank">CRIU@openvz.org</a><br>
> <a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
><br>
<br>
</blockquote></div></div>