United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6961079 RFE: Build JDK7 for 64 bit Windows using free Windows 7.1 SDK 64 bit compilers
JDK-6961079 : RFE: Build JDK7 for 64 bit Windows using free Windows 7.1 SDK 64 bit compilers

Details
Type:
Enhancement
Submit Date:
2010-06-14
Status:
Closed
Updated Date:
2014-03-03
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
infrastructure
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
JDK7 has been updated to build with VS2010 Professional compiler for both
32 and 64 bit Windows. Some of the non-open portions require functionality
available only in those compilers.
However all the open sources with native code in the hotspot and jdk repositories
do build with the free VS2010 Express. That is however 32 bit only.

It is desirable to also enable building these open portions with free 64 bit
compilers. Those were not available at the same time, but are now freely (as
in no cost, not open source) available in the Windows 7.1 SDK.

                                    

Comments
EVALUATION

Some minor tweaking is needed to jdk/make/common/shared/Defs-windows.gmk to
properly set paths to the compiler, tools and the C runtime dll.

Note on creating a build setup: 
It appears that the vcvars32.bat included in the 7.1 SDK, which is generally
useful in the case of the compilers, is useless in setting up access to the
compilers when used with the SDK. It tries to reference registry settings that
simply don't exist, so it fails.
Whilst I'm sure there's a better way, I found that I need to explicitly add
the right directories to my INCLUDE, LIB, and PATH variables as thus :

set VSINSTALLDIR=c:\PROGRA~2\MICROS~1.0
set WindowsSdkDir=c:\PROGRA~1\MICROS~1\Windows\v7.1
set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%PATH%
set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64

Note that the compiler 64 bit directories are called "amd64", but the
SDK uses "x64". If these are left off the path tail, then that should equate to
a 32 bit set up. I haven't tried that, since VS2010 express is what I used for
32 bit. 

The two install location variable definitions will vary depending on the
short dos version on any given system of the long path name.
By default on a 64 bit operating the 7.1 SDK installs compilers into
C:\Program Files (x86)\Microsoft Visual Studio 10.0
and installs the SDK headers, libraries and tools into :
C:\Program Files\Microsoft SDKs\Windows\v7.1

I don't recommend using those long names with spaces in your PATH etc, hence
the short names.
The installer lets you change the SDK location, but NOT the compiler location,
which is the exact opposite of what the compiler installs let you do (!)
I recommend leaving these along and setting vars as above.

In case its useful here's a fuller listing of variables I used :
set ARCH_DATA_MODEL=64
set ALT_OUTPUTDIR=c:/jdk7bld
set ALT_BOOTDIR=c:/jdk1.7
set PATH=%ALT_BOOTDIR%\bin;%PATH%
set ALT_DEVTOOLS_PATH=c:/jdkutils/bin
set ALT_UNIXCOMMAND_PATH=c:/cygwin/bin
set ALT_DXSDK_INCLUDE_PATH=c:/DX9_SDK/include
set VSINSTALLDIR=c:\PROGRA~2\MICROS~1.0
set WindowsSdkDir=c:\PROGRA~1\MICROS~1\Windows\v7.1
set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%PATH%
set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64
set ALT_MSDEVTOOLS_PATH=C:/PROGRA~1/MICROS~1/Windows/v7.1
set PATH=%ALT_DEVTOOLS_PATH%;%PATH%

Its important to have the MS_DEVTOOLS earlier on the path than cygwin
or you'll pick up the wrong "mt.exe"
                                     
2010-06-14
EVALUATION

In fact the supported way to set up your SDK paths for 64 bit is to run
C:\Program Files\Microsoft SDKs\Windows\7.1\bin\setenv.cmd /x64
                                     
2010-06-14
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/70191885f707
                                     
2010-07-21
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/70191885f707
                                     
2010-07-25



Hardware and Software, Engineered to Work Together