Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8050395 | 8u40 | Jesper Wilhelmsson | P3 | Resolved | Fixed | team |
JDK-8048371 | 8u25 | Jesper Wilhelmsson | P3 | Resolved | Fixed | b05 |
JDK-8047080 | 8u20 | Jesper Wilhelmsson | P3 | Resolved | Fixed | b20 |
JDK-8053281 | emb-8u26 | Jesper Wilhelmsson | P3 | Resolved | Fixed | b17 |
"I" in the following is kim.barrett@oracle.com. I don't have a JIRA account yet.
Attempting to build jdk9/dev on SuSE 13.1, I encountered the following build error:
In file included from /home/kab/sandboxes/kab-test/hotspot/agent/src/os/linux/libproc.h:37:0,
from /home/kab/sandboxes/kab-test/hotspot/agent/src/os/linux/libproc_impl.h:30,
from /home/kab/sandboxes/kab-test/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/kab/sandboxes/kab-test/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
^
The problem is that ps_proc.c is directly including <sys/ptrace.h> and indirect including <linux/ptrace.h> (via "libproc.h"), and they appear to be incompatible on the system in question. A bit of web searches would seem to indicate that including both is generally not a good idea. For example, linux/ptrace.h defines as macros some names that sys/ptrace.h defines as enum constants. An include order of linux/ptrace.h first then sys/ptrace.h likely results in lots of syntax errors.
The include of <linux/ptrace.h> was added here:
mikael c884ec3ea87f Tue Apr 29 22:05:10 2014 -0700: #include <linux/ptrace.h>
I'm not sure why I'm getting a compiler error here but presumably most other folks are not. It may have something to do with the combination of compiler version (g++4.8.1).
Changing hotspot/agent/src/os/linux/libproc.h to include <sys/ptrace.h> rather than <linux/ptrace.h> eliminated the error for me, and allowed my build to run.
Attempting to build jdk9/dev on SuSE 13.1, I encountered the following build error:
In file included from /home/kab/sandboxes/kab-test/hotspot/agent/src/os/linux/libproc.h:37:0,
from /home/kab/sandboxes/kab-test/hotspot/agent/src/os/linux/libproc_impl.h:30,
from /home/kab/sandboxes/kab-test/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/kab/sandboxes/kab-test/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
^
The problem is that ps_proc.c is directly including <sys/ptrace.h> and indirect including <linux/ptrace.h> (via "libproc.h"), and they appear to be incompatible on the system in question. A bit of web searches would seem to indicate that including both is generally not a good idea. For example, linux/ptrace.h defines as macros some names that sys/ptrace.h defines as enum constants. An include order of linux/ptrace.h first then sys/ptrace.h likely results in lots of syntax errors.
The include of <linux/ptrace.h> was added here:
mikael c884ec3ea87f Tue Apr 29 22:05:10 2014 -0700: #include <linux/ptrace.h>
I'm not sure why I'm getting a compiler error here but presumably most other folks are not. It may have something to do with the combination of compiler version (g++4.8.1).
Changing hotspot/agent/src/os/linux/libproc.h to include <sys/ptrace.h> rather than <linux/ptrace.h> eliminated the error for me, and allowed my build to run.
- backported by
-
JDK-8047080 Build failure from multiple ptrace.h
-
- Resolved
-
-
JDK-8048371 Build failure from multiple ptrace.h
-
- Resolved
-
-
JDK-8050395 Build failure from multiple ptrace.h
-
- Resolved
-
-
JDK-8053281 Build failure from multiple ptrace.h
-
- Resolved
-
- relates to
-
JDK-8144885 agent/src/os/linux/libproc.h needs to support Linux/SPARC builds
-
- Resolved
-