OpenJDK6 build oddity

Kelly O'Hair Kelly.Ohair at Sun.COM
Tue Sep 8 12:41:08 PDT 2009



Andrew John Hughes wrote:
> 2009/9/8 Kelly O'Hair <Kelly.Ohair at sun.com>:
>> Andrew John Hughes wrote:
>>> It seems whenever you do a build of OpenJDK6 you get an empty
>>> 'fastdebug' directory, due to the following under setup in the
>>> top-level Makefile:
>>>
>>>        $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
>>>        $(MKDIR) -p $(ABS_OUTPUTDIR)/j2sdk-image
>>>        $(MKDIR) -p $(OUTPUTDIR)-fastdebug/j2sdk-image
>>>        $(MKDIR) -p $(ABS_OUTPUTDIR)-fastdebug/j2sdk-image
>>>
>>> Shouldn't there be a conditional here so that only the appropriate
>>> mkdir invocations are used?
>>>
>>> The logic in OpenJDK7's Makefile is completely different, and doesn't
>>> produce this empty directory.
>> This strange stuff came about while dealing with Windows and
>> the so called "8.3 short paths", or paths without spaces.
>> The makefiles generally need paths without spaces, but these
>> dang 8.3 paths are kind of a dynamic appendage on the long path,
>> and strange things happen when one or the other gets deleted and
>> recreated. I never got to the very bottom of this, but the top level
>> makefile somehow manages to delete and recreate, and sometimes you
>> would end up with several 8.3 paths (different directories) in these
>> two variables, but only one was actually used. Ugly stuff. :^(
>>
>> The fastdebug ones had something to do with the way the top level
>> Makefile works when it created both the product images and the
>> fastdebug images. I forget the details, but some of the initialization
>> logic only got run once, so it had to create both.
>>
>> I am sure this could be cleaned up, a complete build on Windows would
>> need to verify it is ok.
>>
>> -kto
>>
> 
> Thanks for the feedback on this, Kelly.  I should have guessed this
> would be down to Windows yet again...
> 
> My presumption is that there is some option which turns on fastdebug
> mode, which will mean that the build ends up in the -fastdebug
> directories and the directories without a suffix are empty.  So
> presumably this statement needs to be conditional on which mode is
> enabled.  But I may be completely wrong.
> 
> As I say, this is obviously fixed on 7 as I don't get these
> superfluous directories. That's why they stood out so much with
> OpenJDK6.  If you set ALT_OUTPUTDIR, as I do as standard to build on a
> different disk, the extra directory is more noticeable.  I'm guessing
> most people haven't noticed this on OpenJDK6 because it's otherwise
> buried inside build instead of being at toplevel:
> 
> $ ls /mnt/builder/icedtea6/openjdk/build
> linux-amd64/  linux-amd64-fastdebug/
> 

I will poke around in the jdk7 sources and see where this changed, I'm
sure it has my DNA on it somehow. :^(

Not easy to find out who 'deleted' lines in a file... :^(

Look at changeset d6b08bdb9a54, this link might work:
    http://hg.openjdk.java.net/jdk7/jdk7/rev/d6b08bdb9a54

My network connection is messed up right now, so I cannot verify.

-kto




More information about the jdk6-dev mailing list