Building jdk-8u on AIX 7.2 problems: sizeof

Adam Roberts AROBERTS at uk.ibm.com
Mon Jun 12 14:57:53 UTC 2017


Hi, I'm looking to get OpenJDK 8 built on Power big-endian using AIX 7.2. 

I have xlc 12.1 and a small configuration script that currently does the 
following to overcome initial hurdles when configuring. I'm working off 
the latest 8 head.

bash-4.3# cat AdamConfig.sh 
export CC="xlc"
export CXX="xlc"
export JDK_BOOT_DIR=/usr/java7_64
export 
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java7_64/jre/bin:/usr/java7_64/bin:/usr/local/bin:/usr/vac/bin

I source this first and then go on to ./configure.

bash-4.3# cat openjdk/config.log | grep "The tested"
configure:29034: The tested number of bits in the target (0) differs from 
the number of bits expected to be found in the target (64).
configure:29100: error: The tested number of bits in the target (0) 
differs from the number of bits expected to be found in the target (64)

As above, when configuring I can't get past the checking size of int* 
step.

Two observations
1) I can compile and run a regular C application with xlc using 64 bit 
pointers with either OBJECT_MODE=64 set as an environment variable or -q64 
set as a build option
2) If I look in config.log I see this - notice the lack of -q64 being used

configure:28993: checking size of int *
configure:28998: /usr/vac/bin/xlc -o conftest  -m64   -m64 conftest.cpp 
>&5
/usr/vac/bin/xlc: 1501-216 (W) command option -64 is not recognized - 
passed to ld
/usr/vac/bin/xlc: 1501-216 (W) command option -64 is not recognized - 
passed to ld
ld: 0706-012 The -6 flag is not recognized.
ld: 0706-012 The -4 flag is not recognized.
ld: 0706-012 The -6 flag is not recognized.
configure:28965: /usr/vac/bin/xlc -E  conftest.cpp
configure:28965: $? = 0
configure:28965: result: yes
configure:28965: checking for stdio.h
configure:28965: result: yes
configure:28993: checking size of int *
configure:28998: /usr/vac/bin/xlc -o conftest  -m64   -m64 conftest.cpp 
>&5
/usr/vac/bin/xlc: 1501-216 (W) command option -64 is not recognized - 
passed to ld
/usr/vac/bin/xlc: 1501-216 (W) command option -64 is not recognized - 
passed to ld
ld: 0706-012 The -6 flag is not recognized.

Is there some option I'm not aware of that'll enable me to build trivially 
with xlc? Perhaps some extra work to be done to enable this?

The sizeof check is defined as

AC_CHECK_SIZEOF([int *], [1111])

in openjdk/common/autoconf/platform.m4

Full configure log available on request, it does mention 
COMPILER_NAME=gcc. But surely I can't use gcc because I see we do a 
-qversion call with xlc to determine the compiler version (and that is an 
xlc specific option AFAIK). 

Feels like I'm missing something here!

Cheers in advance


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20170612/518c1a2e/attachment.html>


More information about the ppc-aix-port-dev mailing list