JDK-6947187 : JDK 7 fails to build with VC 9
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2010-04-26
  • Updated: 2011-01-24
  • Resolved: 2010-05-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Duplicate :  
Description
JDK 7 fails to build for the following configuraion:
Cygwin, Windows 7, Visual Studio 9

> C:/PROGRA~2/MICROS~1.0/VC/bin/cl -O1 -Zi -nologo -MD /D _STATIC_CPPLIB -Fdd:/Workspace/Build/JDK7/tmp/sun/sun.awt/awt/obj/awt_DnDDS.pdb -Fmd:/Workspace/Build/JDK7/tmp/sun/sun.awt/awt/obj/awt_DnDDS.map -wd4800 -W3 -D _CRT_SECURE_NO_DEPRECATE -EHsc -DUNICODE -D_UNICODE -DNDEBUG -DWIN32 -DIAL -D_LITTLE_ENDIAN -D_X86_ -Dx86 -DWIN32_LEAN_AND_MEAN -I. -Id:/Workspace/Build/JDK7/tmp/sun/sun.awt/awt/CClassHeaders -I../../../src/windows/javavm/export -I../../../src/share/javavm/export -I../../../src/share/native/common -I../../../src/windows/native/common -I../../../src/share/native/sun/awt -I../../../src/windows/native/sun/awt -Id:/Workspace/Build/JDK7/tmp/sun/sun.awt/awt/CClassHeaders/../../java/jvm -Id:/Workspace/Build/JDK7/tmp/sun/sun.awt/awt/obj -I../../../src/share/native/common -I../../../src/windows/native/sun/windows -ID:/tools/win32/dxsdk/Include -I../../../src/share/native/sun/awt/image/cvutils -I../../../src/share/native/sun/awt/image -I../../../src/share/native/sun/java2d/loops -I../../../src/share/native/sun/java2d -I../../../src/windows/native/sun/java2d -I../../../src/share/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/d3d -I../../../src/windows/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/windows -I../../../src/share/native/sun/font -I../../../src/share/native/sun/java2d/pipe -I../../../src/share/native/sun/dc/path -I../../../src/share/native/sun/dc/doe -I../../../src/share/native/sun/awt/debug -I../../../src/windows/native/sun/awt -I../../../src/share/native/sun/awt/medialib -DINTERNAL_BUILD -c -Fod:/Workspace/Build/JDK7/tmp/sun/sun.awt/awt/obj/awt_DnDDS.obj ../../../src/windows/native/sun/windows/awt_DnDDS.cpp
> awt_DnDDS.cpp
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xmemory(40) : error C2440: '<function-style-cast>' : cannot convert from 'int' to 'std::bad_alloc'
> No constructor could take the source type, or constructor overload resolution was ambiguous
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xmemory(145) : see reference to function template instantiation '_Ty *std::_Allocate<char>(size_t,_Ty *)' being compiled
> with
> [
> _Ty=char
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xmemory(144) : while compiling class template member function 'char *std::allocator<_Ty>::allocate(std::allocator<_Ty>::size_type)'
> with
> [
> _Ty=char
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xstring(468) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled
> with
> [
> _Ty=char
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xstring(497) : see reference to class template instantiation 'std::_String_val<_Ty,_Alloc>' being compiled
> with
> [
> _Ty=char,
> _Alloc=std::allocator<char>
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\functional(1285) : see reference to class template instantiation 'std::basic_string<_Elem,_Traits,_Ax>' being compiled
> with
> [
> _Elem=char,
> _Traits=std::char_traits<char>,
> _Ax=std::allocator<char>
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xmemory(40) : error C2440: '<function-style-cast>' : cannot convert from 'int' to 'std::bad_alloc'
> No constructor could take the source type, or constructor overload resolution was ambiguous
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xmemory(145) : see reference to function template instantiation '_Ty *std::_Allocate<std::_Tree_nod<_Traits>::_Node>(size_t,_Ty *)' being compiled
> with
> [
>
> _Ty=std::_Tree_nod<std::_Tmap_traits<FORMATETC,STGMEDIUM,std::less<FORMATETC>,std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,false>>::_Node,
>
> _Traits=std::_Tmap_traits<FORMATETC,STGMEDIUM,std::less<FORMATETC>,std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,false>
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xmemory(144) : while compiling class template member function 'std::_Tree_nod<_Traits>::_Node *std::allocator<_Ty>::allocate(std::allocator<_Ty>::size_type)'
> with
> [
>
> _Traits=std::_Tmap_traits<FORMATETC,STGMEDIUM,std::less<FORMATETC>,std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,false>,
>
> _Ty=std::_Tree_nod<std::_Tmap_traits<FORMATETC,STGMEDIUM,std::less<FORMATETC>,std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,false>>::_Node
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xtree(56) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled
> with
> [
>
> _Ty=std::_Tree_nod<std::_Tmap_traits<FORMATETC,STGMEDIUM,std::less<FORMATETC>,std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,false>>::_Node
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xtree(63) : see reference to class template instantiation 'std::_Tree_nod<_Traits>' being compiled
> with
> [
>
> _Traits=std::_Tmap_traits<FORMATETC,STGMEDIUM,std::less<FORMATETC>,std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,false>
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xtree(89) : see reference to class template instantiation 'std::_Tree_ptr<_Traits>' being compiled
> with
> [
>
> _Traits=std::_Tmap_traits<FORMATETC,STGMEDIUM,std::less<FORMATETC>,std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,false>
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xtree(107) : see reference to class template instantiation 'std::_Tree_val<_Traits>' being compiled
> with
> [
>
> _Traits=std::_Tmap_traits<FORMATETC,STGMEDIUM,std::less<FORMATETC>,std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,false>
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\map(78) : see reference to class template instantiation 'std::_Tree<_Traits>' being compiled
> with
> [
>
> _Traits=std::_Tmap_traits<FORMATETC,STGMEDIUM,std::less<FORMATETC>,std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,false>
> ]
> ../../../src/windows/native/sun/windows/awt_DnDDS.cpp(85) : see reference to class template instantiation 'std::map<_Kty,_Ty>' being compiled
> with
> [
> _Kty=FORMATETC,
> _Ty=STGMEDIUM
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xmemory(40) : error C2440: '<function-style-cast>' : cannot convert from 'int' to 'std::bad_alloc'
> No constructor could take the source type, or constructor overload resolution was ambiguous
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xmemory(145) : see reference to function template instantiation '_Ty *std::_Allocate<std::_Aux_cont>(size_t,_Ty *)' being compiled
> with
> [
> _Ty=std::_Aux_cont
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xmemory(144) : while compiling class template member function 'std::_Aux_cont *std::allocator<_Ty>::allocate(std::allocator<_Ty>::size_type)'
> with
> [
> _Ty=std::_Aux_cont
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xutility(442) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled
> with
> [
> _Ty=std::_Aux_cont
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\map(22) : see reference to class template instantiation 'std::_Container_base_aux_alloc_real<_Alloc>' being compiled
> with
> [
> _Alloc=std::allocator<std::pair<const FORMATETC,STGMEDIUM>>
> ]
> C:\PROGRA~2\MICROS~1.0\VC\INCLUDE\xtree(22) : see reference to class template instantiation 'std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,_Mfl>' being compiled
> with
> [
> _Kty=FORMATETC,
> _Ty=STGMEDIUM,
> _Pr=std::less<FORMATETC>,
> _Alloc=std::allocator<std::pair<const FORMATETC,STGMEDIUM>>,
> _Mfl=false
> ]
> make[2]: *** [d:/Workspace/Build/JDK7/tmp/sun/sun.awt/awt/obj/awt_DnDDS.obj] Error 2
> make[2]: Leaving directory `/cygdrive/d/Workspace/JDK7/make/sun/awt'
> make[1]: *** [all] Error 1
> make[1]: Leaving directory `/cygdrive/d/Workspace/JDK7/make/sun'
> make: *** [all] Error 1