Problems with --with-override and gensrc targets

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Tue Nov 3 17:23:04 UTC 2015


On 2015-11-02 15:41, Mikael Gerdin wrote:
> Hi build-devs,
>
> I was trying to do a fancy setup with multiple different hotspot 
> directories in a single source tree to create some builds for 
> performance measurements.
>
> I used the configure flag --with-override-hotspot=hotspot-foo
> and when I attempted a "make images" I get the following error:
>
> $ make CONF=override-foo images
> Building configuration 'override-foo' (matching CONF=override-foo)
> Compiling 5 files for BUILD_GENMODULESLIST
> Building configuration 'override-foo' (matching CONF=override-foo)
> Building target 'images' in configuration 'override-foo'
> Compiling 8 files for BUILD_TOOLS_LANGTOOLS
> Compiling 14 files for BUILD_JVMCI_OPTIONS
> Compiling 3 files for BUILD_JVMCI_SERVICE
> Error: Could not find or load main class com.sun.tools.javac.Main
> Error: Could not find or load main class com.sun.tools.javac.Main
> Gensrc-jdk.vm.ci.gmk:39: recipe for target 
> '/home/mgerdin/work/repos/hg/jdk9/hs-rt/build/override-foo/buildtools/jvmci_options/_the.BUILD_JVMCI_OPTIONS_batch' 
> failed
> make[3]: *** 
> [/home/mgerdin/work/repos/hg/jdk9/hs-rt/build/override-foo/buildtools/jvmci_options/_the.BUILD_JVMCI_OPTIONS_batch] 
> Error 1
> make[3]: *** Waiting for unfinished jobs....
> Gensrc-jdk.vm.ci.gmk:48: recipe for target 
> '/home/mgerdin/work/repos/hg/jdk9/hs-rt/build/override-foo/buildtools/jvmci_service/_the.BUILD_JVMCI_SERVICE_batch' 
> failed
> make[3]: *** 
> [/home/mgerdin/work/repos/hg/jdk9/hs-rt/build/override-foo/buildtools/jvmci_service/_the.BUILD_JVMCI_SERVICE_batch] 
> Error 1
> make/Main.gmk:103: recipe for target 'jdk.vm.ci-gensrc-hotspot-foo' 
> failed
>
> From what I gather the problem is that the hotspot directory name is 
> encoded in the make target name: 'jdk.vm.ci-gensrc-hotspot-foo' but in 
> make/Main.gmk the dependencies are set up as follows:
>
> HOTSPOT_GENSRC_TARGETS := $(filter %-gensrc-hotspot, $(GENSRC_TARGETS))
> $(HOTSPOT_GENSRC_TARGETS): interim-langtools
>
> but since 'jdk.vm.ci-gensrc-hotspot-foo' does not match the 
> %-gensrc-hotspot filter no dependency is created on interim-langtools 
> and the build fails because it can't find the javac main class.
>
> I had a stab at fixing it by the following change:
> diff -r 1697e1f12275 make/Main.gmk
> --- a/make/Main.gmk
> +++ b/make/Main.gmk
> @@ -110,7 +110,7 @@
>  JDK_GENSRC_TARGETS := $(filter %-gensrc-jdk, $(GENSRC_TARGETS))
>  LANGTOOLS_GENSRC_TARGETS := $(filter %-gensrc-langtools, 
> $(GENSRC_TARGETS))
>  CORBA_GENSRC_TARGETS := $(filter %-gensrc-corba, $(GENSRC_TARGETS))
> -HOTSPOT_GENSRC_TARGETS := $(filter %-gensrc-hotspot, $(GENSRC_TARGETS))
> +HOTSPOT_GENSRC_TARGETS := $(filter %-gensrc-$(shell basename 
> $(HOTSPOT_TOPDIR)), $(GENSRC_TARGETS))
>
> but I suspect that a more complete change would involve the other 
> --with-override-foo flags and perhaps avoiding using the shell to get 
> the directory part of HOTSPOT_TOPDIR
>
> I guess nobody has used the --with-override flags for a while :)

I didn't think anyone used them at all. They have not been tested or 
actively supported for ages, and I've been thinking about removing them 
for quite some time. I thought everyone in Hotspot worked with complete 
forests these days.

Is this functionality you'd like to see us revive (and keep)?

/Magnus

>
> /Mikael




More information about the build-dev mailing list