Hi,
The build failed later on. I've added a little more to the patch (new
version is attached) to fix this new error and then I was able to
complete a successful build on kfreebsd-amd64:
> gcc-4.8 -Damd64 -D_GNU_SOURCE \
> -D_FILE_OFFSET_BITS=64 \
> -m64 -shared -fpic \
>
> -I/home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux
> \
> -I../generated \
>
> -I/home/steven/b/openjdk-7-7u51-2.4.4/build/bootstrap/jdk1.6.0/include
> \
>
> -I/home/steven/b/openjdk-7-7u51-2.4.4/build/bootstrap/jdk1.6.0/include/linux
> \
>
> \
>
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/salibelf.c
>
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/symtab.c
>
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/libproc_impl.c
>
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/ps_proc.c
>
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/ps_core.c
>
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
> \
> -Xlinker
> --version-script=/home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/mapfile
> -Wl,--hash-style=both \
> -g \
> \
> -o libsaproc.so
> \
> -lthread_db
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/ps_proc.c:
> In function 'process_get_lwp_regs':
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/ps_proc.c:177:2:
> warning: passing argument 4 of 'ptrace' makes integer from pointer without a
> cast [enabled by default]
> if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, (caddr_t) user, 0) < 0) {
> ^
> In file included from
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/ps_proc.c:30:0:
> /usr/include/x86_64-kfreebsd-gnu/sys/ptrace.h:117:12: note: expected 'int'
> but argument is of type 'char *'
> extern int ptrace(int _request, pid_t _pid, caddr_t _addr, int _data)
> __THROW;
> ^
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/ps_proc.c:
> In function 'ptrace_continue':
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/ps_proc.c:194:14:
> error: 'PTRACE_CONT' undeclared (first use in this function)
> if (ptrace(PTRACE_CONT, pid, NULL, signal) < 0) {
> ^
> /home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk-boot/hotspot/agent/src/os/linux/ps_proc.c:194:14:
> note: each undeclared identifier is reported only once for each function it
> appears in
> make[8]: *** [libsaproc.so] Error 1
> make[8]: Leaving directory
> `/home/steven/b/openjdk-7-7u51-2.4.4/build/openjdk.build-boot/hotspot/outputdir/linux_amd64_compiler2/product'
Thanks,
Regards,
--
Steven Chamberlain
[email protected]
--- a/openjdk-7-7u51-2.4.4/debian/patches/kfreebsd-support-hotspot.diff 2014-01-21 22:09:45.487113966 +0000
+++ b/openjdk-7-7u51-2.4.4/debian/patches/kfreebsd-support-hotspot.diff 2014-01-23 00:53:48.025052925 +0000
@@ -22,7 +22,8 @@
earlier.
Author: Damien Raude-Morvan <[email protected]>
Author: Guido Günther <[email protected]>
-Last-Update: 2013-08-13
+Author: Steven Chamberlain <[email protected]>
+Last-Update: 2014-01-23
Forwarded: no
--- openjdk/hotspot/src/os/posix/launcher/java_md.c.orig 2014-01-14 22:26:34.000000000 +0100
@@ -350,7 +351,7 @@
+#endif
address os::current_stack_pointer() {
- #if defined(SPARC) && !defined(ZERO)_WORKS
+ #ifdef SPARC_WORKS
@@ -113,15 +163,27 @@
}
@@ -685,7 +686,7 @@
--- openjdk/hotspot/agent/src/os/linux/ps_proc.c.orig 2014-01-14 22:26:34.000000000 +0100
+++ openjdk/hotspot/agent/src/os/linux/ps_proc.c 2014-01-15 13:22:54.737644310 +0100
-@@ -38,6 +38,18 @@
+@@ -38,6 +38,22 @@
#define __WALL 0x40000000 // Copied from /usr/include/linux/wait.h
#endif
@@ -701,6 +702,10 @@
+#define PTRACE_DETACH PT_DETACH
+#endif
+
++#ifndef PTRACE_CONT
++#define PTRACE_CONT PT_CONTINUE
++#endif
++
// This file has the libproc implementation specific to live process
// For core files, refer to ps_core.c