AIX build not generating a jre image

Baesken, Matthias matthias.baesken at
Wed Oct 25 12:57:23 UTC 2017

Hi Magnus, thanks for your advice.
Adding a bit of tracing  to  Images.gmk  indeed helps to clarify the issue  .
Output of      $(info this is the jre location: $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE))    looks nice and as expected on AIX .
However it turns out the   $(JRE_TARGETS)   was empty  on AIX ,   this leads to an empty dependency


on AIX in  Images.gmk ,  and this leads to “Nothing to be done for …. “.
Background is that  aix was not considered   in the platform  dependent  parts of  make/Images.gmk  where  JRE_TARGETS is filled for linux, macosx, solaris.
I added  aix there and  the jre  shows up in the images.
Here is my diff  (openjdk9) ,  still with tracing output AND  with the  added aix .
Now  JRE_TARGETS  is not empty anymore which leads to successful  generation of the JRE.

Tracing output seen in the makefile
+ echo JRE_TARGETS are: /mygenerationdir/images/jre/man/man1/java.1   ….

Diff with tracing :

diff -r a08cbfc0e4ec make/Images.gmk
--- a/make/Images.gmk   Thu Aug 03 18:56:56 2017 +0000
+++ b/make/Images.gmk   Wed Oct 25 14:41:06 2017 +0200
@@ -43,6 +43,10 @@
 $(eval $(call ReadImportMetaData))
+# helpful tracing
+$(info this is the jre location: $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE))
@@ -295,7 +299,7 @@
         $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES))
-  ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), )
+  ifneq ($(findstring $(OPENJDK_TARGET_OS), aix linux macosx), )
     JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
         $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
@@ -436,6 +440,8 @@
 jdk: $(JDK_TARGETS)

Best regards, Matthias

From: Magnus Ihse Bursie [mailto:magnus.ihse.bursie at]
Sent: Mittwoch, 25. Oktober 2017 10:24
To: Baesken, Matthias <matthias.baesken at>; Thomas Stüfe <thomas.stuefe at>
Cc: build-dev (build-dev at <build-dev at>; ppc-aix-port-dev at
Subject: Re: AIX build not generating a jre image

On 2017-10-24 16:44, Baesken, Matthias wrote:

  *   Do you get to this stage at all? I.e, can you see "Createing jre jimage" in the output?

Hi Magnus, when comparing the linux and aix logs  of our openjdk9 builds  ,   I see for Linux at some point :

gmake[3]: Entering directory ` . . . /nightly/jdk9/make'

/bin/echo Creating jre jimage

While on AIX it says :

make[3]: Entering directory ` . . . /nightly/jdk9/make'

make[3]: Nothing to be done for `jre'.

make[3]: Leaving directory ` . . . /nightly/jdk9/make'

this Looks wrong to me !
That means that $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) is considered up to date by make. This is wrong if that file does not exist. Are you *sure* you do not have a jre built?
Verify the contents of these variables. Perhaps add a
$(info this is the jre location: $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE))
at the top of Images.gmk,
and check the location that is printed.


(  the   . . .   in the output has been removed by me it points to the build dir).

Best regards, Matthias

From: ppc-aix-port-dev [mailto:ppc-aix-port-dev-bounces at] On Behalf Of Magnus Ihse Bursie
Sent: Dienstag, 24. Oktober 2017 15:47
To: Thomas Stüfe <thomas.stuefe at><mailto:thomas.stuefe at>
Cc: build-dev (build-dev at<mailto:build-dev at>) <build-dev at><mailto:build-dev at>; ppc-aix-port-dev at<mailto:ppc-aix-port-dev at>
Subject: Re: AIX build not generating a jre image

On 2017-10-23 10:16, Thomas Stüfe wrote:
Hi Magnus,

On Mon, Oct 23, 2017 at 9:12 AM, Magnus Ihse Bursie <magnus.ihse.bursie at<mailto:magnus.ihse.bursie at>> wrote:

On 2017-10-18 16:14, Thomas Stüfe wrote:
On Wed, Oct 18, 2017 at 3:25 PM, Volker Simonis <volker.simonis at<mailto:volker.simonis at>>
Hi Goetz,

How do our nightly builds look like? Do they create the JRE image?


Goetz is in a meeting.

None of our AIX builds creates a JRE image. Works on other platforms. Looks
like a bug.

I tried to build jre explicitly (make jre-image); build finishes
sucessfully but still no jre.
Since I don't have access to any AIX machines, it's difficult to for me to do much about this. Let me know if you need assistance in tracking this down.

Some suggestions:
run "make LOG=info,cmdlines" to track the progress of the build.

If you get lost in the log files, try running "make jre-image" and then "rm build/$BUILD/images/jre", and then "make LOG=info,cmdlines jre-image" to see only the output for the jre-image target.

Thanks for the hints! I'll try that. I played around last week with make -d --print-data-base but got lost in the information.

Last week I burned some time on this problem without much success. I got stuck understanding the rule in Images.gmk:

    $(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
$(ECHO) Creating jre jimage
$(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
   --output $(JRE_IMAGE_DIR)
$(TOUCH) $@

and its brethren.

It seems this rule just does not get executed for jre-image. So, trying to understand this (I am no makefile expert):

$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) is one file from the target dir, in this case jre/java, whose non-existence or out-of-dateness triggers the rule

 - $(JMODS) is <outputdir>/jmods, which gets built and does exist
 - $(call DependOnVariable, JRE_MODULES_LIST)
This is just a macro that creates a dependency on the contents of the variable JRE_MODULES_LIST.

$(BASE_RELEASE_FILE) is a text file which, if it exists and it contains the value of $JRE_MODULES_LIST, will result false (not out of date), otherwise it will update the file with the value of $JRE_MODULES_LIST and return true, triggering the target, yes? If I got this right, why do we use the same output file for all targets (jre, jdk) etc?
No, this is a separate dependency. It's the file named "release" in the image that is to be included. If it has changed we need to trigger a new image.

Do you get to this stage at all? I.e, can you see "Createing jre jimage" in the output? If not, there's a problem before we even get to this rule. Otherwise, the jlink command is likely broken. Try copy-pasting the full jlink command and running it from the shell directly to see what happens.




I created to track this.


Lindenmaier, Goetz <goetz.lindenmaier at<mailto:goetz.lindenmaier at>> schrieb am Mi. 18. Okt.
um 14:56:
Hi Steve,

I think this is an error.
We never decided not to generate a jre image as far as I know.

Best regards,
-----Original Message-----
From: ppc-aix-port-dev [mailto:ppc-aix-port-dev-<mailto:ppc-aix-port-dev->
bounces at<mailto:bounces at>] On Behalf Of Steve Groeger
Sent: Mittwoch, 18. Oktober 2017 14:34
To: ppc-aix-port-dev at<mailto:ppc-aix-port-dev at>
Subject: AIX build not generating a jre image

Hi all,

When building OpenJDK9 on AIX should the build generate a JRE image ie
build/aix-ppc64-normal-server-release/images/jre/bin as well as a JDK
ie build/aix-ppc64-normal-server-release/images/jdk/bin?  When I try
building on my AIX system it is only generating a JDK image. Is this a
issue or is
it working correctly?

Steve Groeger
Java Runtimes Development
IBM Hursley
IBM United Kingdom Ltd
Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129
Fax (44) 1962 816800
Lotus Notes: Steve Groeger/UK/IBM
Internet: groeges at<mailto:groeges at> <mailto:groeges at<mailto:groeges at>>

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6

More information about the build-dev mailing list