-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
6
-
x86
-
windows_2000
FULL PRODUCT VERSION :
mustang beta source release
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
CYGWIN_NT-5.0 whiterab-c2znlh 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
A DESCRIPTION OF THE PROBLEM :
First, I found some compiler related problems. VC6 is old compiler, so we need this patch.
- `for` variable scope is different from standard
- static const member cannot be initialized in header
Index: hotspot/src/share/vm/opto/idealKit.hpp
===================================================================
--- hotspot/src/share/vm/opto/idealKit.hpp (revision 1)
+++ hotspot/src/share/vm/opto/idealKit.hpp (revision 4)
@@ -94,7 +94,7 @@
return (n->is_Phi() && n->in(0) == reg);
}
void declare(IdealVariable* v) { v->set_id(_var_ct++); }
- static const uint first_var = 1;
+ static const uint first_var;
#ifdef ASSERT
enum State { NullS=0, BlockS=1, LoopS=2, IfThenS=4, ElseS=8, EndifS= 16 };
Index: hotspot/src/share/vm/opto/idealKit.cpp
===================================================================
--- hotspot/src/share/vm/opto/idealKit.cpp (revision 1)
+++ hotspot/src/share/vm/opto/idealKit.cpp (revision 4)
@@ -9,6 +9,8 @@
#include "incls/_precompiled.incl"
#include "incls/_idealKit.cpp.incl"
+const uint IdealKit::first_var = 1;
+
//----------------------------IdealKit-----------------------------------------
IdealKit::IdealKit(PhaseGVN &gvn, Node* control, bool delay_all_transforms) :
_gvn(gvn), C(gvn.C) {
Index: hotspot/src/share/vm/utilities/macros.hpp
===================================================================
--- hotspot/src/share/vm/utilities/macros.hpp (revision 1)
+++ hotspot/src/share/vm/utilities/macros.hpp (revision 4)
@@ -152,3 +152,6 @@
#define define_pd_global(type, name, value) const type pd_##name = value;
+#if defined(_MSC_VER) && (_MSC_VER == 1200)
+#define for if(0);else for
+#endif
Index: hotspot/src/cpu/i486/vm/interpreter_i486.hpp
===================================================================
--- hotspot/src/cpu/i486/vm/interpreter_i486.hpp (revision 1)
+++ hotspot/src/cpu/i486/vm/interpreter_i486.hpp (revision 4)
@@ -33,7 +33,7 @@
// if too small.
// Run with +PrintInterpreterSize to get the VM to print out the size.
// Max size with JVMTI and TaggedStackInterpreter
- const static int InterpreterCodeSize = 168 * 1024;
+ static const int InterpreterCodeSize;
};
Index: hotspot/src/cpu/i486/vm/interpreter_i486.cpp
===================================================================
--- hotspot/src/cpu/i486/vm/interpreter_i486.cpp (revision 1)
+++ hotspot/src/cpu/i486/vm/interpreter_i486.cpp (revision 4)
@@ -13,6 +13,7 @@
// Initialize the sentinel used to distinguish an interpreter return address.
const int Interpreter::return_sentinel = 0xfeedbeed;
+const int Interpreter::InterpreterCodeSize = 168 * 1024;
const int method_offset = frame::interpreter_frame_method_offset * wordSize;
const int bci_offset = frame::interpreter_frame_bcx_offset * wordSize;
And rc.exe cannot be found because makefile is not looking at MSDevDir environment variable. (This patch is not needed if we use PSDK because rc.exe is in psdk/bin directory which will be included in PATH environment variable if run psdk/SetEnv.bat)
Index: j2se/make/common/shared/Defs-windows.gmk
===================================================================
--- j2se/make/common/shared/Defs-windows.gmk (revision 4)
+++ j2se/make/common/shared/Defs-windows.gmk (revision 5)
@@ -210,6 +210,16 @@
ifneq ($(subst MSDev98,OLDOLDOLD,$(_msvc_dir)),$(_msvc_dir))
_msvc_dir :=
endif
+ # Try looking in MSDEVDIR or MSDevDir area first (set by vcvars32.bat Vc6)
+ ifdef MSDEVDIR
+ xMSDEVDIR :="$(subst \,/,$(MSDEVDIR))"
+ _ms_tools :=$(call FullPath,$(xMSDEVDIR))
+ else
+ ifdef MSDevDir
+ xMSDEVDIR :="$(subst \,/,$(MSDevDir))"
+ _ms_tools :=$(call FullPath,$(xMSDEVDIR))
+ endif
+ endif
# If we still don't have it, look for VS71COMNTOOLS, setup by installer?
ifeq ($(_msvc_dir),)
ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
@@ -225,7 +235,11 @@
_redist71_bin :=$(_msvc_dir)/../SDK/v1.1/Bin
_ms_sdk :=$(_msvc_dir)/PlatformSDK
endif
- _ms_tools_bin :=$(_compiler_bin)
+ ifneq ($(_ms_tools),)
+ _ms_tools_bin :=$(_ms_tools)/Bin
+ else
+ _ms_tools_bin :=$(_compiler_bin)
+ endif
endif
# If no SDK found yet, look in other places
This is OK. But I got more problem.... VC6SP3 includes old SDK, so INVALID_FILE_ATTRIBUTES is not defined. And later failed with the error "ALGO_ID is not found or something"
Index: j2se/src/windows/native/java/io/Win32FileSystem_md.c
===================================================================
--- j2se/src/windows/native/java/io/Win32FileSystem_md.c (revision 5)
+++ j2se/src/windows/native/java/io/Win32FileSystem_md.c (revision 7)
@@ -21,6 +21,10 @@
#include "dirent_md.h"
#include "java_io_FileSystem.h"
+#ifndef INVALID_FILE_ATTRIBUTES
+#define INVALID_FILE_ATTRIBUTES 0xFFFFFFFF
+#endif
+
/* This macro relies upon the fact that JNU_GetStringPlatformChars always makes
a copy of the string */
Index: j2se/src/windows/resource/version.rc
===================================================================
--- j2se/src/windows/resource/version.rc (revision 5)
+++ j2se/src/windows/resource/version.rc (revision 7)
@@ -6,7 +6,7 @@
// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
//
-#include "afxres.h"
+#include "winres.h"
// Need 2 defines so macro argument to XSTR will get expanded before quoting.
#define XSTR(x) STR(x)
This means pure VisualC++SP3 cannot compile mustang now. So I tried Platform SDK Aug 2002 Edition (I couldn't find Nov 2001), but I got another kind of error. For example, /hotspot/src/os/win32/vm/os_win32.c 's
// VC6 lacks DWORD_PTR
#if _MSC_VER < 1300
typedef UINT_PTR DWORD_PTR;
#endif
causes error because DWORD_PTR is defined in this PSDK.
I don't know which way is to go.
1. change Platform SDK requirement to newer one, and removes workaround like above
2. stays Nov 2001 and add more workaround like INVALID_FILE_ATTRIBUTES
# My own problem was solved thanks to this forum http://forums.java.net/jive/thread.jspa?threadID=13223&tstart=0 this is just interest. So I'll set "Severity" to "No Impact"
Thank you.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This is my last cygwin.bat (boot file)
@echo off
set ALT_BOOTDIR=c:/progra~1/java/jdk
set ALT_DEPLOY_MSSDK=k:/psdk
set ALT_DXSDK_PATH=k:/dxsdk
set ALT_MSVCRT_DLL_PATH=c:/winnt/system32
set ALT_UNICOWS_DLL_PATH=k:/unicows
set ALT_UNICOWS_LIB_PATH=k:/unicows
set ALT_OUTPUTDIR=k:/java-out
set CLASSPATH=
set _JAVA_OPTIONS=
:call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT"
set ALT_COMPILER_PATH=C:\PROGRA~1\MICROS~2\VC98\bin
set ALT_MSDEVTOOLS_PATH=C:\PROGRA~1\MICROS~2\Common\msdev98\bin
call "K:\PSDK\SetEnv.bat" /2000 /RETAIL
K:
chdir K:\cygwin\bin
bash --login -i
-------------------
Installed PSDK Aug 2002 in k:/psdk
Installed cygwin in k:/cygwin
Installed unicows dll and lib into k:/unicows
Installed mustang souce into k:/java
Entered k:/java/control/make and run make
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compile mustang successfully.
ACTUAL -
still stops in j2se build.
REPRODUCIBILITY :
This bug can be reproduced always.
mustang beta source release
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
CYGWIN_NT-5.0 whiterab-c2znlh 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
A DESCRIPTION OF THE PROBLEM :
First, I found some compiler related problems. VC6 is old compiler, so we need this patch.
- `for` variable scope is different from standard
- static const member cannot be initialized in header
Index: hotspot/src/share/vm/opto/idealKit.hpp
===================================================================
--- hotspot/src/share/vm/opto/idealKit.hpp (revision 1)
+++ hotspot/src/share/vm/opto/idealKit.hpp (revision 4)
@@ -94,7 +94,7 @@
return (n->is_Phi() && n->in(0) == reg);
}
void declare(IdealVariable* v) { v->set_id(_var_ct++); }
- static const uint first_var = 1;
+ static const uint first_var;
#ifdef ASSERT
enum State { NullS=0, BlockS=1, LoopS=2, IfThenS=4, ElseS=8, EndifS= 16 };
Index: hotspot/src/share/vm/opto/idealKit.cpp
===================================================================
--- hotspot/src/share/vm/opto/idealKit.cpp (revision 1)
+++ hotspot/src/share/vm/opto/idealKit.cpp (revision 4)
@@ -9,6 +9,8 @@
#include "incls/_precompiled.incl"
#include "incls/_idealKit.cpp.incl"
+const uint IdealKit::first_var = 1;
+
//----------------------------IdealKit-----------------------------------------
IdealKit::IdealKit(PhaseGVN &gvn, Node* control, bool delay_all_transforms) :
_gvn(gvn), C(gvn.C) {
Index: hotspot/src/share/vm/utilities/macros.hpp
===================================================================
--- hotspot/src/share/vm/utilities/macros.hpp (revision 1)
+++ hotspot/src/share/vm/utilities/macros.hpp (revision 4)
@@ -152,3 +152,6 @@
#define define_pd_global(type, name, value) const type pd_##name = value;
+#if defined(_MSC_VER) && (_MSC_VER == 1200)
+#define for if(0);else for
+#endif
Index: hotspot/src/cpu/i486/vm/interpreter_i486.hpp
===================================================================
--- hotspot/src/cpu/i486/vm/interpreter_i486.hpp (revision 1)
+++ hotspot/src/cpu/i486/vm/interpreter_i486.hpp (revision 4)
@@ -33,7 +33,7 @@
// if too small.
// Run with +PrintInterpreterSize to get the VM to print out the size.
// Max size with JVMTI and TaggedStackInterpreter
- const static int InterpreterCodeSize = 168 * 1024;
+ static const int InterpreterCodeSize;
};
Index: hotspot/src/cpu/i486/vm/interpreter_i486.cpp
===================================================================
--- hotspot/src/cpu/i486/vm/interpreter_i486.cpp (revision 1)
+++ hotspot/src/cpu/i486/vm/interpreter_i486.cpp (revision 4)
@@ -13,6 +13,7 @@
// Initialize the sentinel used to distinguish an interpreter return address.
const int Interpreter::return_sentinel = 0xfeedbeed;
+const int Interpreter::InterpreterCodeSize = 168 * 1024;
const int method_offset = frame::interpreter_frame_method_offset * wordSize;
const int bci_offset = frame::interpreter_frame_bcx_offset * wordSize;
And rc.exe cannot be found because makefile is not looking at MSDevDir environment variable. (This patch is not needed if we use PSDK because rc.exe is in psdk/bin directory which will be included in PATH environment variable if run psdk/SetEnv.bat)
Index: j2se/make/common/shared/Defs-windows.gmk
===================================================================
--- j2se/make/common/shared/Defs-windows.gmk (revision 4)
+++ j2se/make/common/shared/Defs-windows.gmk (revision 5)
@@ -210,6 +210,16 @@
ifneq ($(subst MSDev98,OLDOLDOLD,$(_msvc_dir)),$(_msvc_dir))
_msvc_dir :=
endif
+ # Try looking in MSDEVDIR or MSDevDir area first (set by vcvars32.bat Vc6)
+ ifdef MSDEVDIR
+ xMSDEVDIR :="$(subst \,/,$(MSDEVDIR))"
+ _ms_tools :=$(call FullPath,$(xMSDEVDIR))
+ else
+ ifdef MSDevDir
+ xMSDEVDIR :="$(subst \,/,$(MSDevDir))"
+ _ms_tools :=$(call FullPath,$(xMSDEVDIR))
+ endif
+ endif
# If we still don't have it, look for VS71COMNTOOLS, setup by installer?
ifeq ($(_msvc_dir),)
ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
@@ -225,7 +235,11 @@
_redist71_bin :=$(_msvc_dir)/../SDK/v1.1/Bin
_ms_sdk :=$(_msvc_dir)/PlatformSDK
endif
- _ms_tools_bin :=$(_compiler_bin)
+ ifneq ($(_ms_tools),)
+ _ms_tools_bin :=$(_ms_tools)/Bin
+ else
+ _ms_tools_bin :=$(_compiler_bin)
+ endif
endif
# If no SDK found yet, look in other places
This is OK. But I got more problem.... VC6SP3 includes old SDK, so INVALID_FILE_ATTRIBUTES is not defined. And later failed with the error "ALGO_ID is not found or something"
Index: j2se/src/windows/native/java/io/Win32FileSystem_md.c
===================================================================
--- j2se/src/windows/native/java/io/Win32FileSystem_md.c (revision 5)
+++ j2se/src/windows/native/java/io/Win32FileSystem_md.c (revision 7)
@@ -21,6 +21,10 @@
#include "dirent_md.h"
#include "java_io_FileSystem.h"
+#ifndef INVALID_FILE_ATTRIBUTES
+#define INVALID_FILE_ATTRIBUTES 0xFFFFFFFF
+#endif
+
/* This macro relies upon the fact that JNU_GetStringPlatformChars always makes
a copy of the string */
Index: j2se/src/windows/resource/version.rc
===================================================================
--- j2se/src/windows/resource/version.rc (revision 5)
+++ j2se/src/windows/resource/version.rc (revision 7)
@@ -6,7 +6,7 @@
// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
//
-#include "afxres.h"
+#include "winres.h"
// Need 2 defines so macro argument to XSTR will get expanded before quoting.
#define XSTR(x) STR(x)
This means pure VisualC++SP3 cannot compile mustang now. So I tried Platform SDK Aug 2002 Edition (I couldn't find Nov 2001), but I got another kind of error. For example, /hotspot/src/os/win32/vm/os_win32.c 's
// VC6 lacks DWORD_PTR
#if _MSC_VER < 1300
typedef UINT_PTR DWORD_PTR;
#endif
causes error because DWORD_PTR is defined in this PSDK.
I don't know which way is to go.
1. change Platform SDK requirement to newer one, and removes workaround like above
2. stays Nov 2001 and add more workaround like INVALID_FILE_ATTRIBUTES
# My own problem was solved thanks to this forum http://forums.java.net/jive/thread.jspa?threadID=13223&tstart=0 this is just interest. So I'll set "Severity" to "No Impact"
Thank you.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This is my last cygwin.bat (boot file)
@echo off
set ALT_BOOTDIR=c:/progra~1/java/jdk
set ALT_DEPLOY_MSSDK=k:/psdk
set ALT_DXSDK_PATH=k:/dxsdk
set ALT_MSVCRT_DLL_PATH=c:/winnt/system32
set ALT_UNICOWS_DLL_PATH=k:/unicows
set ALT_UNICOWS_LIB_PATH=k:/unicows
set ALT_OUTPUTDIR=k:/java-out
set CLASSPATH=
set _JAVA_OPTIONS=
:call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT"
set ALT_COMPILER_PATH=C:\PROGRA~1\MICROS~2\VC98\bin
set ALT_MSDEVTOOLS_PATH=C:\PROGRA~1\MICROS~2\Common\msdev98\bin
call "K:\PSDK\SetEnv.bat" /2000 /RETAIL
K:
chdir K:\cygwin\bin
bash --login -i
-------------------
Installed PSDK Aug 2002 in k:/psdk
Installed cygwin in k:/cygwin
Installed unicows dll and lib into k:/unicows
Installed mustang souce into k:/java
Entered k:/java/control/make and run make
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compile mustang successfully.
ACTUAL -
still stops in j2se build.
REPRODUCIBILITY :
This bug can be reproduced always.