[CRIU] error: "PTRACE_LISTEN" redefined when building criu 1-0 on Feodra 20

Christopher Covington cov at codeaurora.org
Mon Dec 30 08:32:56 PST 2013


Hi,

On 12/29/2013 06:18 AM, Andrew Vagin wrote:
> On Sat, Dec 28, 2013 at 02:57:54PM +0200, Kevin Wilson wrote:
>> Hello,
>>
>> When building criu 1-0 on Feodra 20 I get this error:
>> make[1]: Leaving directory `/work/src/criu-1.0'
>>   GEN      arch/x86/sys-exec-tbl.c
>>   CC       arch/x86/syscalls.o
>>   LINK     arch/x86/syscalls.built-in.o
>>   CC       arch/x86/crtools.o
>> In file included from arch/x86/crtools.c:11:0:
>> include/ptrace.h:16:0: error: "PTRACE_LISTEN" redefined [-Werror]
>>  #define PTRACE_LISTEN  0x4208
>>  ^
>> In file included from include/ptrace.h:5:0,
>>                  from arch/x86/crtools.c:11:
>> /usr/include/sys/ptrace.h:150:0: note: this is the location of the
>> previous definition
>>  #define PTRACE_LISTEN PTRACE_LISTEN
>>  ^
>> cc1: all warnings being treated as errors
>> make[1]: *** [arch/x86/crtools.o] Error 1
>> make: *** [arch/x86] Error 2
>>
>>
>> Any ideas? on Fedora 18 I did not get any errors and could build it
>> successfully.
> 
> This issue was fixed by
> http://git.criu.org/?p=criu.git;a=commit;h=c8e9701f21323cc26c335cd2afd7512db0611c39
> 
> You can remove this definition from include/ptrace.h, it isn't used in
> criu.

To build on both Ubuntu 10.04 and 12.04 machines, I made the PTRACE_LISTEN and
tpacket_req3 definitions conditional (keying off TPACKET3_HDRLEN for the
latter). I also had to re-order the makefile includes for everything to be
defined properly by the configure tests (or maybe that one was a workaround to
get the build working with BusyBox make). I may be authorized to share my
patches in the future, but I would also be glad to see someone else beat me to it.

Christopher

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.


More information about the CRIU mailing list