Can't build jdk9-dev due to conflicting includes

Peter Levart peter.levart at gmail.com
Fri Jun 20 11:59:06 UTC 2014


Hi,

I get the following compile error when building on Fedora 20, 64 Bit:

Compiling 
/home/peter/work/hg/jdk9-dev/hotspot/src/share/vm/utilities/workgroup.cpp
Compiling 
/home/peter/work/hg/jdk9-dev/hotspot/src/share/vm/utilities/xmlstream.cpp
Compiling 
/home/peter/work/hg/jdk9-dev/hotspot/src/share/vm/utilities/yieldingWorkgroup.cpp
Making signal interposition lib...
Making SA debugger back-end...
In file included from 
/home/peter/work/hg/jdk9-dev/hotspot/agent/src/os/linux/libproc.h:37:0,
                  from 
/home/peter/work/hg/jdk9-dev/hotspot/agent/src/os/linux/libproc_impl.h:30,
                  from 
/home/peter/work/hg/jdk9-dev/hotspot/agent/src/os/linux/ps_proc.c:33:
/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct 
ptrace_peeksiginfo_args'
  struct ptrace_peeksiginfo_args {
         ^
In file included from 
/home/peter/work/hg/jdk9-dev/hotspot/agent/src/os/linux/ps_proc.c:32:0:
/usr/include/sys/ptrace.h:191:8: note: originally defined here
  struct ptrace_peeksiginfo_args
         ^
gmake[6]: *** [libsaproc.so] Error 1
gmake[6]: *** Waiting for unfinished jobs....
gmake[5]: *** [the_vm] Error 2
gmake[4]: *** [product] Error 2
gmake[3]: *** [generic_build2] Error 2
gmake[2]: *** [product] Error 2
gmake[1]: *** 
[/home/peter/work/hg/jdk9-dev/build/linux-x86_64-normal-server-release/hotspot/_hotspot.timestamp] 
Error 2
make: *** [hotspot-only] Error 2


...it seems there are 2 definitions of "struct ptrace_peeksiginfo_args" 
in 2 different system include files:

/usr/include/linux/ptrace.h
/usr/include/sys/ptrace.h

...they are included by the following two hostpot files in 
jdk9-dev/hotspot/agent/src/os/linux:

libproc.h:#include <linux/ptrace.h>
ps_proc.c:#include <sys/ptrace.h>


Which one is the right one?

Regards, Peter



More information about the hotspot-runtime-dev mailing list