Hi,

I've just found that OpenJDK 6 may stop builds on CP936 Mac & Linux.
Checked the latest repo and confirmed that the bug still exists.
http://hg.openjdk.java.net/jdk6/jdk6/jdk/file/3a8a8b5f1612/make/common/shared/Defs.gmk
Line #275

Currently, FULL_VERSION uses a format with local abbreviated month name (%b).
On these platforms, date will produce a string in local language with space
(i.e. [_1月] which indicates January),
which breaks the builds.

This is fixed in OpenJDK 7 already so I brought the patch into JDK 6.
Hope someone can merge this.

Thanks,
Johnson Lau
# HG changeset patch
# Parent 8d8e64f4dbb2a41c910e3e191924dead1b9619dc
Local month in FULL_VERSION variable breaks builds on system with CP936 
encoding.

diff --git a/make/common/shared/Defs.gmk b/make/common/shared/Defs.gmk
--- a/make/common/shared/Defs.gmk
+++ b/make/common/shared/Defs.gmk
@@ -272,7 +272,9 @@
   FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
 else
   BUILD_NUMBER = b00
-  USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr 
"A-Z" "a-z"`)
+  BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M')
+  CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c '[:alnum:]')
+  USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | 
$(TR) '[:upper:]' '[:lower:]' )
   FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
 endif
 

Reply via email to