<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 &lt;<a href="mailto:xemul@virtuozzo.com">xemul@virtuozzo.com</a>&gt; 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>
&gt; Hello,<br>
&gt; I&#39;m trying to build CRIU and getting tons of &quot;conflicting type&quot; errors. I&#39;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>
&gt;<br>
&gt; I&#39;m getting errors like the following:<br>
&gt;<br>
&gt;   CC       criu/arch/x86/crtools.o<br>
&gt; In file included from /usr/include/asm-generic/types.h:6:0,<br>
&gt;                  from /usr/include/asm/types.h:4,<br>
&gt;                  from /home/ec2-user/linux-4.3.5/include/uapi/linux/types.h:4,<br>
&gt;                  from /home/ec2-user/linux-4.3.5/include/linux/types.h:5,<br>
&gt;                  from /home/ec2-user/linux-4.3.5/include/uapi/linux/futex.h:5,<br>
&gt;                  from /home/ec2-user/linux-4.3.5/include/linux/futex.h:4,<br>
&gt;                  from include/common/lock.h:5,<br>
&gt;                  from criu/include/restorer.h:13,<br>
&gt;                  from criu/arch/x86/crtools.c:21:<br>
&gt; /home/ec2-user/linux-4.3.5/include/asm-generic/int-ll64.h:24:26: error: conflicting types for ‘s64’<br>
&gt;  typedef signed long long s64;<br>
&gt;                           ^<br>
&gt; In file included from criu/arch/x86/include/asm/int.h:4:0,<br>
&gt;                  from criu/arch/x86/include/asm/types.h:9,<br>
&gt;                  from criu/include/types.h:4,<br>
&gt;                  from criu/arch/x86/crtools.c:11:<br>
&gt; criu/include/asm-generic/int.h:7:18: note: previous declaration of ‘s64’ was here<br>
&gt;  typedef int64_t  s64;<br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; Why is this happening? Does this indicate some sort of incompatibility with kernel version 4.3.5?<br>
<br>
We&#39;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&#39;s not incompatibility, it&#39;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>
&gt; I&#39;m compiling CRIU with the command<br>
&gt;<br>
&gt; $ make USERCFLAGS=&quot;-I$HOME/include -I$HOME/linux-4.3.5/include/ -L$HOME/lib&quot;<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Bryan<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; CRIU mailing list<br>
&gt; <a href="mailto:CRIU@openvz.org" target="_blank">CRIU@openvz.org</a><br>
&gt; <a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
&gt;<br>
<br>
</blockquote></div></div>