United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6951582 Build problems on win64
JDK-6951582 : Build problems on win64

Details
Type:
Bug
Submit Date:
2010-05-11
Status:
Closed
Updated Date:
2011-04-19
Project Name:
JDK
Resolved Date:
2011-04-19
Component:
hotspot
OS:
windows_7
Sub-Component:
runtime
CPU:
generic
Priority:
P5
Resolution:
Fixed
Affected Versions:
hs18
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
Problems compiling Hotspot on windows64 using Windows 7, Visual Studio 2008
and cygwin 1.7.5.

1. make/windows/makefiles/defs.make does not identify the system as 64-bit. It looks
at the environment variable PROCESSOR_IDENTIFIER and expects it to contain "AMD64"
and the system says "Intel64".

2. src/share/vm/gc_implementation/g1/heapRegion.cpp gets a warning for implicitly
converting a 32-bit value to 64-bit.

                                    

Comments
SUGGESTED FIX

--- a/make/windows/makefiles/defs.make  Fri May 07 15:13:00 2010 -0700
+++ b/make/windows/makefiles/defs.make  Mon May 10 16:26:50 2010 +0200
@@ -55,7 +55,7 @@
   MAKE_ARGS += Platform_arch_model=ia64
 endif
 
-ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) AMD64),)
+ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) "AMD64\|Intel64"),)
   ARCH_DATA_MODEL=64
   PLATFORM=windows-amd64
   VM_PLATFORM=windows_amd64

--- a/src/share/vm/gc_implementation/g1/heapRegion.cpp  Fri May 07 15:13:00 2010 -0700
+++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp  Mon May 10 16:26:50 2010 +0200
@@ -290,7 +290,7 @@
   // Recalculate the region size to make sure it's a power of
   // 2. This means that region_size is the largest power of 2 that's
   // <= what we've calculated so far.
-  region_size = 1 << region_size_log;
+  region_size = (uintx)1 << region_size_log;
                                     
2010-05-11
PUBLIC COMMENTS

Fix provided by Staffan Larsen.
                                     
2010-05-11
EVALUATION

Suggested fix is ok.
                                     
2010-05-11
SUGGESTED FIX

The change to heapRegion.cpp is also being made in a slightly different
way by Phil Race as part of the VS2010 work.
                                     
2010-05-11
EVALUATION

Please note, later versions of Cygwin do not set PROCESSOR_IDENTIFIER at all!

http://www.gossamer-threads.com/lists/openssh/dev/48152 

We may want to consider removing the dependency now.
                                     
2010-05-11
EVALUATION

The suggested fix string "Intel64" matches what I see on Window 7.
Maybe the same on Vista/2008 but it won;t work for JDK's supported
build platform : Windows 2003 x64, where I see
"EM64T Family 6 Model 26 Stepping 5, GenuineIntel"
So lets look for both.

Regarding cygwin, the most recent shipping cygwin still leaves
that var alone. I know because that's what I am using right now.
[Let me qualify that. I'm not using ssh .. so maybe I'm
just not hitting it].
However due to the slow performance of 64 bit cygwin we'll
continue to use MKS for official builds.
And it looks to me as if the patch is ssh specific.

So I don't intend to hold up the VS2010 work that will include
this fix in order to find a new way to do this.
However I *do* agree that this should be made less fragile, but
not in a cygwin specific way.
                                     
2010-05-11
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/fb57d4cf76c2
                                     
2010-05-14



Hardware and Software, Engineered to Work Together