AIX build not generating a jre image

Erik Joelsson erik.joelsson at oracle.com
Wed Oct 25 13:21:32 UTC 2017


Ah, good find. I would argue that the correct fix is:

jdk: $(TOOL_JDK_TARGETS) $(JDK_TARGETS)
jre: $(TOOL_JRE_TARGETS) $(JRE_TARGETS)

/Erik

On 2017-10-25 14:57, Baesken, Matthias wrote:
> 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
>
> jre: $(JRE_TARGETS)
>
> 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))
> +
> +
> JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
>       $(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
> JDK_MODULES += $(ALL_MODULES)
> @@ -295,7 +299,7 @@
>           $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES))
>     endif
> -  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)) \
>           $(JRE_IMAGE_DIR)/man/ja
> @@ -436,6 +440,8 @@
>   jdk: $(JDK_TARGETS)
> jre: $(JRE_TARGETS)
> +       echo JRE_TARGETS are: $(JRE_TARGETS) ,  TOOL_JRE_TARGETS are: $(TOOL_JRE_TARGETS)
> +
> symbols: $(SYMBOLS_TARGETS)
>
>
> Best regards, Matthias
>
> From: Magnus Ihse Bursie [mailto:magnus.ihse.bursie at oracle.com]
> Sent: Mittwoch, 25. Oktober 2017 10:24
> To: Baesken, Matthias <matthias.baesken at sap.com>; Thomas Stüfe <thomas.stuefe at gmail.com>
> Cc: build-dev (build-dev at openjdk.java.net) <build-dev at openjdk.java.net>; ppc-aix-port-dev at openjdk.java.net
> 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.
>
> /Magnus
>
>
>
>
> (  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 openjdk.java.net] On Behalf Of Magnus Ihse Bursie
> Sent: Dienstag, 24. Oktober 2017 15:47
> To: Thomas Stüfe <thomas.stuefe at gmail.com><mailto:thomas.stuefe at gmail.com>
> Cc: build-dev (build-dev at openjdk.java.net<mailto:build-dev at openjdk.java.net>) <build-dev at openjdk.java.net><mailto:build-dev at openjdk.java.net>; ppc-aix-port-dev at openjdk.java.net<mailto:ppc-aix-port-dev at openjdk.java.net>
> 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 oracle.com<mailto:magnus.ihse.bursie at oracle.com>> 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 gmail.com<mailto:volker.simonis at gmail.com>>
> wrote:
> Hi Goetz,
>
> How do our nightly builds look like? Do they create the JRE image?
>
> Regards,
> Volker
>
>
> 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:
>
> $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
>      $(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
> $(ECHO) Creating jre jimage
> $(RM) -r $(JRE_IMAGE_DIR)
>     $(JLINK_JRE_EXTRA_OPTS) \
> $(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
>
> Dependencies:
>   - $(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.
>
> /Magnus
>
>
>
> ..Thomas
>
>
>
> /Magnus
>
>
>
>
> I created https://bugs.openjdk.java.net/browse/JDK-8189618 to track this.
>
> ..Thomas
>
>
>
>
> Lindenmaier, Goetz <goetz.lindenmaier at sap.com<mailto:goetz.lindenmaier at sap.com>> schrieb am Mi. 18. Okt.
> 2017
> 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,
>     Goetz.
> -----Original Message-----
> From: ppc-aix-port-dev [mailto:ppc-aix-port-dev-<mailto:ppc-aix-port-dev->
> bounces at openjdk.java.net<mailto:bounces at openjdk.java.net>] On Behalf Of Steve Groeger
> Sent: Mittwoch, 18. Oktober 2017 14:34
> To: ppc-aix-port-dev at openjdk.java.net<mailto:ppc-aix-port-dev at openjdk.java.net>
> 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
> image
> 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?
>
>
> Thanks
> 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 uk.ibm.com<mailto:groeges at uk.ibm.com> <mailto:groeges at uk.ibm.com<mailto:groeges at uk.ibm.com>>
>
> 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
> 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
>
>
>
>
>




More information about the build-dev mailing list