Implicit assumptions in Images.gmk: find errors
Erik Joelsson
erik.joelsson at oracle.com
Mon Nov 26 00:25:17 PST 2012
The demos are built using the bootstrap javac, running on the boot jdk
and linked against the newly built classes. The next step would be
executing on the newly built jdk, but I don't think we need to go that
far. The end result is logically the same (as in the same compiler is
used and the same classes are linked against) and I would rather avoid
the complications for cross compilation.
/Erik
On 2012-11-25 19:05, Kelly O'Hair wrote:
> That sounds right.
>
> The demos really need to be built from the built jdk image.
> So in my opinion, the demos should follow the jdk image creation.
>
> I think in the old build it was a bit mixed up as to when the demos were built.
>
> -kto
>
> On Nov 23, 2012, at 12:20 AM, Erik Joelsson wrote:
>
>> We could condition these finds on the existence of these directories. I think that would be the cleanest implementation as it would logically act the same as now, just with less noise and execs.
>>
>> /Erik
>>
>> On 2012-11-23 01:19, David Holmes wrote:
>>> Some of the constructs in Images.gmk implicitly assume that you are always building a JDK image and a JRE image. Ie.:
>>>
>>> JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%,$(JDK_IMAGE_DIR)/demo/%,\
>>> $(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) ))
>>>
>>> and:
>>>
>>> # /sample dir
>>> $(foreach f,$(shell $(FIND) $(JDK_OUTPUTDIR)/sample -type f),\
>>> $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS)))
>>>
>>>
>>> will both attempt to issue "find" in a directory that may not exist (jdk/demo and jdk/sample respectively) if you are not building a jdk image.
>>>
>>> Fortunately (or perhaps erroneously?) these find failures do not cause make to fail, they just generate noisy output (which of course is how I noticed it).
>>>
>>> Not sure what the solution is or if it is just something we have to live with. There is an awful lot of setup needed to build images, but some of it is dependent on what image has been requested.
>>>
>>> Cheers,
>>> David
More information about the build-infra-dev
mailing list