RFR: 7151898: Check for LANG in Mac OS X jdk build sanity check [macosx] (original) (raw)
Michael McMahon michael.x.mcmahon at oracle.com
Thu Mar 15 19:43:32 UTC 2012
- Previous message (by thread): RFR: 7151898: Check for LANG in Mac OS X jdk build sanity check [macosx]
- Next message (by thread): RFR: 7151898: Check for LANG in Mac OS X jdk build sanity check [macosx]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
It definitely works with LANG=en_US.UTF-8 (and other en country variants). It definitely doesn't**work in the zh_CN locale, as was reported recently. The reason evidently is a dependency in the build on the output format of the date command.
Which other locales it works in, I don't know. So, I guess it makes sense to standardize on a particular setting. The idea of setting it internally within the build to "C" sounds attractive because forcing people to use such an outdated compatibility mode locale seems wrong. I'm not sure how easy it is to set environment variables in make is (as opposed to reading/using them ). I wonder why this wasn't done before... In any case, this is a general build issue rather than being Mac specific.
By the way, I did file a bug on the LANG breakage (7151897)
Thanks Michael.
On 15/03/12 18:57, 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? 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/javahome -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.
-------------- next part -------------- An HTML attachment was scrubbed... URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20120315/9c35b132/attachment.htm>
- Previous message (by thread): RFR: 7151898: Check for LANG in Mac OS X jdk build sanity check [macosx]
- Next message (by thread): RFR: 7151898: Check for LANG in Mac OS X jdk build sanity check [macosx]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]