RFR: 7151898: Check for LANG in Mac OS X jdk build sanity check [macosx]
kelly.ohair at oracle.com
Thu Mar 15 12:22:59 PDT 2012
On Mar 15, 2012, at 11:57 AM, Stuart Marks wrote:
> I agree, there's a larger question about LANG that needs to be asked here.
> From a pragmatic point of view, I ran into a build issue that boiled down to the absence of LANG in my environment in certain cases (ssh vs VNC). README-builds.html recommends setting LANG=C for OpenSolaris and all the Linux-flavored build environments. So, it makes sense for LANG=C to go into the Mac build instructions as well. (README-builds.html should get updated too.) Unlike on Linux, the consequences of LANG being unset on Mac are that the build breaks, so Michael has added this check in the Makefile to prevent this obvious error. I believe he was also going to file a bug on the Mac build breaking when LANG is unset.
> Now, the larger questions are, what are the valid values of LANG, and if all the Unix-flavored build instructions recommend setting LANG=C, why not just have the makefiles or build scripts set this value and be done with it?
Not sure why this was ever done, seems ok with me.
Granted, LANG isn't the only variable that might cause locale issues, the other LC_* variables could create issues.
My I18n/L10n knowledge is quite rusty. :^(
But in general, I agree that it must be set, we should just "export LANG=C" in the Makefiles, if that works.
> I don't know, and I don't have the expertise in the build system to know how other LANG settings would affect the build. Perhaps somebody else on build-dev knows. Meanwhile, we're patching things up this way, even though it makes things a bit messier.
> On 3/15/12 10:59 AM, Mike Swingler wrote:
>> What other values are valid? UTF8? Why would a builder ever want to change the lang?
>> I think the build script should define it and use it for it's own private purposes (allowing it to be overridden) if there is no compelling reason for an ordinary user to know/care what lang is. I'd prefer not to clutter up the build instructions unless you _really_ have to pass some value that is machine-specific (like the location of the bootstrap JDK). Even then, on the Mac, I think the build scripts should call /usr/libexec/java_home -v 1.7+ on their own, and only balk if there is not sufficient OpenJDK installed.
>> Mike Swingler
>> Apple Inc.
>> On Mar 15, 2012, at 9:43 AM, Stuart Marks wrote:
>>> Looks good to me too. I've updated the Mac build instructions on the wiki to state that LANG should be set.
>>> On 3/15/12 9:30 AM, Kelly O'Hair wrote:
>>>> Looks fine to me.
>>>> On Mar 15, 2012, at 9:18 AM, Michael McMahon wrote:
>>>>> Can I get the following jdk8 change reviewed please?
>>>>> It is a simple sanity check on Mac OS X to ensure that
>>>>> LANG is set in the environment. Currently, the build fails
>>>>> if it's not set, but the failure is quite obscure.
More information about the build-dev