Linux PPC JDK8 build failure
Steve Poole
spoole at linux.vnet.ibm.com
Tue Apr 30 06:38:03 PDT 2013
hi all - been looking at the linux build failure :
/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/jdk/src/solaris/bin/java_md_solinux.c: In function ‘ContinueInNewThread0’:
/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/jdk/src/solaris/bin/java_md_solinux.c:1031: error: ‘thread_t’ undeclared (first use in this function)
/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/jdk/src/solaris/bin/java_md_solinux.c:1031: error: (Each undeclared identifier is reported only once
/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/jdk/src/solaris/bin/java_md_solinux.c:1031: error: for each function it appears in.)
/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/jdk/src/solaris/bin/java_md_solinux.c:1031: error: expected ‘;’ before ‘tid’
/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/jdk/src/solaris/bin/java_md_solinux.c:1033: warning: implicit declaration of function ‘thr_create’
/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/jdk/src/solaris/bin/java_md_solinux.c:1033: error: ‘tid’ undeclared (first use in this function)
/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/jdk/src/solaris/bin/java_md_solinux.c:1035: warning: implicit declaration of function ‘thr_join’
/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/jdk/src/solaris/bin/java_md_solinux.c:1036: warning: cast from pointer to integer of different size
gmake[2]: *** [/home/spoole/jenkins/workspace/openjdk.ppcaix.jdk8.linux.ppc_64/build/linux-ppc64-normal-server-slowdebug/jdk/objs/libjli/java_md_solinux.o] Error 1
It seems to be due to a difference between our change in java_md_solinux.c (where we have made using pthreads conditional on USE_PTHREADS) and the autoconf process.
It seems that our additions of -DUSE_PTHREADS on the linux and aix CFLAGS var (and others) is not being honoured anymore.
In theory I'd suggest we push the "use pthreads or not" decision up to the top level platform config files. However it seems that the only place where using pthreads is a problem is right here within the java_md_solinux.c file. So I think the more pragmatic answer is to just revert the change in java_md_solinux.c back to make using pthreads conditional on __linux__ and then add an additional __aix__ check.
the proposed diff looks like this below.
Comments please on whether we should go this way or look for a more comprehensive change..
--- a/src/solaris/bin/java_md_solinux.c Mon Apr 29 17:54:18 2013 +0200
+++ b/src/solaris/bin/java_md_solinux.c Tue Apr 30 14:36:04 2013 +0100
@@ -1002,7 +1002,7 @@
int
ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {
int rslt;
-#ifdef USE_PTHREADS
+#if defined(__linux__) || defined(__aix__)
pthread_t tid;
pthread_attr_t attr;
pthread_attr_init(&attr);
More information about the ppc-aix-port-dev
mailing list