United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6482134 JDK 6 build error on Windows, Visual Studio .NET on Japanese locale
JDK-6482134 : JDK 6 build error on Windows, Visual Studio .NET on Japanese locale

Details
Type:
Bug
Submit Date:
2006-10-14
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
infrastructure
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description
See http://forums.java.net/jive/thread.jspa?messageID=162959&tstart=0#162959

momotaro

Posts: 1
	
JDK 6 build error on Windows, Visual Studio .NET on Japanese locale
Posted: Oct 13, 2006 9:46 PM

JDK 6 source snapshot for Windows, using Visual Studio .NET 2003 Compiler(32bit) Japanese edition, causes build error.
../../j2se/make/common/shared/Compiler-msvc.gmk:117: *** COMPILER_VERSION cannot be empty here. Stop.

This error has been long time and is in b102.

COMPILER_VERSION is decided from the compiler message in makefile. There are the logic of identifying the compiler version and type in j2se/make/common/shared/Compiler-msvc.gmk line:34-
CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$8}')
CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$5}')

This logic may expect the Compiler message as following.
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86

Unfortunately, Visual Studio .NET 2003 Compiler Japanese edition outputs the Compiler message as following.
Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86

Note) there is a difference at 1st and 2nd word, Japanese edition lacks a space between 'Microsoft' and '(R)'.

So, CC_VER and CC_TYPE variable has wrong value.

A workaround is, to modify the makefile to change the awk print position $$8 -> $$7 and $$5 -> $$4.
But it's a pain to modify every download and build time.

So, It would be better to treat these differences in the makefile. I have a modification idea to fix this problem.

CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/Microsoft(R)\(.*\)/Microsoft (R)\1/' | $(NAWK) '{print $$8}')
CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/Microsoft(R)\(.*\)/Microsoft (R)\1/' | $(NAWK) '{print $$5}')

                                    

Comments
WORK AROUND

gnumake COMPILER_VERSION=13.10.3077

*** (#1 of 1): [ UNSAVED ] ###@###.###
                                     
2007-08-28
EVALUATION

Could be a dup of 6547593. Will try and investigate.
                                     
2008-03-19
EVALUATION

Not a dup of 6547593.

Not sure
                                     
2008-04-01
EVALUATION

Will change to
  CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
which works for both 32 and 64 bit and both locales, I hope. Hard to test this in all cases. And getting rid of CC_TYPE, which isn't needed.
                                     
2008-04-01
EVALUATION

http://hg.openjdk.java.net/jdk7/build/jdk/rev/a977a69d9cf2
                                     
2008-04-01



Hardware and Software, Engineered to Work Together