Can't build jdk9-dev due to conflicting includes
Dmitry Samersoff
dmitry.samersoff at oracle.com
Fri Jun 20 13:39:16 UTC 2014
Peter,
Please file a CR, I'll take a look.
-Dmitry
On 2014-06-20 15:59, Peter Levart wrote:
> 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
>
--
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the hotspot-runtime-dev
mailing list