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?

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.

s'marks


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.

Regards,
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.

s'marks

On 3/15/12 9:30 AM, Kelly O'Hair wrote:
Looks fine to me.

-kto

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.

http://cr.openjdk.java.net/~michaelm/7151898/webrev.1/

Thanks
Michael.


Reply via email to