Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build phobos with VS2012 #570

Closed
2PMEnterprises opened this issue Jan 5, 2014 · 7 comments
Closed

Failed to build phobos with VS2012 #570

2PMEnterprises opened this issue Jan 5, 2014 · 7 comments

Comments

@2PMEnterprises
Copy link

Followed instructions on
http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC
Used "Visual Studio 11 Win64" for both calls to cmake.
Fails when generating concurrency.obj or concurrency-debug.obj.

Console output when you choose "Retry" is in the next comment github wouldn't allow a text attachment, below is the text of the dialog produced by the assertion failure.
Debug Assertion Failed!
Program: C:\Windows\system32\MSVCP110D.dll
File: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector
Line: 72
Expression: vector iterator not dereferencable

If you choose Ignore, another dialog pops up
Debug Assertion Failed!
Program: C:\ldcenv\build-ldc2-x64\bin\Debug\ldc2.exe
File: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector
Line: 73
Expression: "Standard C++ Libraries Out of Range" && 0

@2PMEnterprises
Copy link
Author

When you choose to "Retry" upon receiving the assertion error, this is output

1>  Generating std/concurrency.obj
1>  0x000007FEED8D3F56 (0x0000000141A87470 0x0000000141A82DA0 0xCCCCCCCC00000048 0xCCCCCCCCCCCCCCCC), ?_Debug_message@std@@YAXPEB_W0I@Z() + 0x46 bytes(s)
1>  0x000000013FFE6E59 (0x00000000001EC760 0x00000000001EC740 0x0000000100000175 0xCCCCCCCC00000174), std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<IrFuncTyArg * __ptr64> > >::operator*() + 0x89 bytes(s), c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector, line 73
1>  0x000000013FFE62EF (0x00000000001EC760 0x00000000001EC740 0x00000000257266D0 0x00000000001EC7D4), std::_Uninit_copy<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<IrFuncTyArg * __ptr64> > >,IrFuncTyArg * __ptr64 * __ptr64,std::allocator<IrFuncTyArg * __ptr64> >() + 0x12F bytes(s), c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory, line 378 + 0xD byte(s)
1>  0x000000013FFE642E (0x00000000001EC810 0x00000000001EC7F0 0x00000000257266D0 0x00000000001EC7D4), std::_Uninitialized_copy<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<IrFuncTyArg * __ptr64> > >,IrFuncTyArg * __ptr64 * __ptr64,std::_Wrap_alloc<std::allocator<IrFuncTyArg * __ptr64> > >() + 0xDE bytes(s), c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory, line 416 + 0x9F byte(s)
1>  0x000000013FFE617B (0x00000000001ECB30 0x00000000001EC8A8 0x00000000001EC888 0x00000000257266D0), std::vector<IrFuncTyArg * __ptr64,std::allocator<IrFuncTyArg * __ptr64> >::_Ucopy<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<IrFuncTyArg * __ptr64> > > >() + 0xCB bytes(s), c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector, line 1553 + 0x7A byte(s)
1>  0x000000013FFE682F (0x00000000001ECB30 0x000000001EC65EC0 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), std::vector<IrFuncTyArg * __ptr64,std::allocator<IrFuncTyArg * __ptr64> >::vector<IrFuncTyArg * __ptr64,std::allocator<IrFuncTyArg * __ptr64> >() + 0xEF bytes(s), c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector, line 724 + 0x65 byte(s)
1>  0x000000013FFE6919 (0x00000000001ECAF8 0x000000001EC65E88 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), IrFuncTy::IrFuncTy() + 0xB9 bytes(s)
1>  0x000000013FFE6C2E (0x00000000001ECA50 0x000000001EC65DE0 0x0000000000000003 0x000007FEDF570000), TypeFunction::TypeFunction() + 0x15E bytes(s)
1>  0x000000013FFE5B90 (0x000000001EB4DB40 0xCCCCCCCCCCCCCC01 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), mangle() + 0x240 bytes(s), c:\ldcenv\ldc\dmd2\mangle.c, line 82 + 0x1C byte(s)
1>  0x000000013FFE528E (0x000000001EB4DB40 0xCCCCCCCCCCCCCC01 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), Declaration::mangle() + 0x1BE bytes(s), c:\ldcenv\ldc\dmd2\mangle.c, line 160 + 0x15 byte(s)
1>  0x000000013FFE54B4 (0x000000001EB4DB40 0xCCCCCCCCCCCCCC01 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), FuncDeclaration::mangle() + 0xD4 bytes(s), c:\ldcenv\ldc\dmd2\mangle.c, line 190
1>  0x000000013FFE4FF9 (0x0000000016CA3410 0xCCCCCCCCCCCCCC01 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), Dsymbol::mangle() + 0xD9 bytes(s), c:\ldcenv\ldc\dmd2\mangle.c, line 317 + 0x29 byte(s)
1>  0x000000013FFE5551 (0x0000000016CA3410 0xCCCCCCCCCCCCCC00 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), AggregateDeclaration::mangle() + 0x91 bytes(s), c:\ldcenv\ldc\dmd2\mangle.c, line 221 + 0x38 byte(s)
1>  0x000000013FFE55B1 (0x0000000016CA3410 0xCCCCCCCCCCCCCC00 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), StructDeclaration::mangle() + 0x31 bytes(s), c:\ldcenv\ldc\dmd2\mangle.c, line 234
1>  0x000000013FFA8BF5 (0x000000001ED18D20 0x00000000001ECE68 0xCCCCCCCC00000000 0xCCCCCCCCCCCCCCCC), TypeStruct::toDecoBuffer() + 0x45 bytes(s), c:\ldcenv\ldc\dmd2\mtype.c, line 7948 + 0x1D byte(s)
1>  0x000000013FF9642E (0x00000000255CB2D0 0x00000000001ECE68 0xCCCCCCCC00000000 0xCCCCCCCCCCCCCCCC), TypeNext::toDecoBuffer() + 0xAE bytes(s), c:\ldcenv\ldc\dmd2\mtype.c, line 2368
1>  0x000000013FF90BF6 (0x00000000255CB2D0 0x000000001ED18D20 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), Type::merge() + 0x196 bytes(s), c:\ldcenv\ldc\dmd2\mtype.c, line 1637
1>  0x000000013FF9353C (0x000000001ED18D20 0x0000000000000000 0x0000000000000000 0x00000000001ED360), Type::pointerTo() + 0x9C bytes(s), c:\ldcenv\ldc\dmd2\mtype.c, line 1198 + 0xA byte(s)
1>  0x000000014013E14B (0x000000001EC65600 0x000000001EC656A8 0x0000000000000000 0x0000000000000000), DtoFunctionType() + 0xC2B bytes(s), c:\ldcenv\ldc\gen\functions.cpp, line 227 + 0x19 byte(s)
1>  0x0000000140197B22 (0x000000001EC65600 0x0000000000000000 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), IrTypeFunction::get() + 0xB2 bytes(s), c:\ldcenv\ldc\ir\irtypefunction.cpp, line 34 + 0x2A byte(s)
1>  0x000000014000C5D2 (0x000000001EC65600 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), DtoType() + 0x512 bytes(s), c:\ldcenv\ldc\gen\tollvm.cpp, line 181 + 0xF byte(s)
1>  0x000000014013EF14 (0x000000001EB52DC0 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), DtoResolveFunction() + 0x3B4 bytes(s), c:\ldcenv\ldc\gen\functions.cpp, line 536
1>  0x000000014013F020 (0x000000001EB52DC0 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), DtoDeclareFunction() + 0x50 bytes(s), c:\ldcenv\ldc\gen\functions.cpp, line 696
1>  0x000000014013FD70 (0x000000001EB52DC0 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), DtoDefineFunction() + 0x50 bytes(s), c:\ldcenv\ldc\gen\functions.cpp, line 883
1>  0x000000013FFE7E05 (0x000000001EB52DC0 0x00000000001EEDF0 0x0000000000000000 0xCCCCCCCCCCCCCCCC), FuncDeclaration::codegen() + 0x45 bytes(s), c:\ldcenv\ldc\gen\declarations.cpp, line 299
1>  0x000000013FFE7F91 (0x0000000016CA3410 0x00000000001EEDF0 0x0000000000000000 0x000007FEDF570000), StructDeclaration::codegen() + 0x171 bytes(s), c:\ldcenv\ldc\gen\declarations.cpp, line 93
1>  0x000000014001962F (0x0000000016CA3410 0x0000000000000000 0x0000000000000000 0x000007FEDF570000), DtoDeclarationExp() + 0x1FF bytes(s), c:\ldcenv\ldc\gen\llvmhelpers.cpp, line 1224 + 0x1A byte(s)
1>  0x00000001400197AF (0x000000001EBBD880 0x0000000023A3ED90 0x0000000025721810 0x000007FEDF570000), DtoDeclarationExp() + 0x37F bytes(s), c:\ldcenv\ldc\gen\llvmhelpers.cpp, line 1254
1>  0x0000000140117973 (0x000000001EBF90E0 0x00000000001EEDF0 0x00000000001EE568 0x000007FEDF570000), DeclarationExp::toElem() + 0x93 bytes(s), c:\ldcenv\ldc\gen\toir.cpp, line 162 + 0xE byte(s)
1>  0x0000000140110F1C (0x000000001EBF90E0 0x00000000001EEDF0 0x0000000000000000 0x000007FEDF570000), Expression::toElemDtor() + 0x3DC bytes(s), c:\ldcenv\ldc\gen\toir.cpp, line 151 + 0x21 byte(s)
1>  0x00000001401A0C12 (0x000000001EC7E5A0 0x00000000001EEDF0 0x0000000000000000 0x000007FEDF570000), ExpStatement::toIR() + 0x102 bytes(s), c:\ldcenv\ldc\gen\statements.cpp, line 198 + 0x19 byte(s)
1>  0x00000001401A0E07 (0x000000001EC7E840 0x00000000001EEDF0 0x0000000000000000 0x0000000024F506E0), CompoundStatement::toIR() + 0xB7 bytes(s), c:\ldcenv\ldc\gen\statements.cpp, line 54
1>  0x00000001401A0E07 (0x000000001EE23B20 0x00000000001EEDF0 0x0000000000000000 0x00000000001EE978), CompoundStatement::toIR() + 0xB7 bytes(s), c:\ldcenv\ldc\gen\statements.cpp, line 54
1>  0x0000000140140C40 (0x000000001EB4DB40 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), DtoDefineFunction() + 0xF20 bytes(s), c:\ldcenv\ldc\gen\functions.cpp, line 1094
1>  0x000000013FFE7E05 (0x000000001EB4DB40 0x00000000001EEDF0 0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC), FuncDeclaration::codegen() + 0x45 bytes(s), c:\ldcenv\ldc\gen\declarations.cpp, line 299
1>  0x000000013FFE8653 (0x000000001EB7CA70 0x00000000001EEDF0 0x000000000034C050 0x000007FEDF570000), TemplateInstance::codegen() + 0x103 bytes(s), c:\ldcenv\ldc\gen\declarations.cpp, line 316
1>  0x000000013FF16B82 (0x0000000000390F20 0x000000000034C050 0x0000000000000000 0x0000000010943F00), Module::genLLVMModule() + 0x4C2 bytes(s), c:\ldcenv\ldc\gen\module.cpp, line 397
1>  0x000000013FED2A3F (0x000000010000000C 0x0000000000342F20 0x0000000000000000 0x000000014143B9D6), main() + 0x163F bytes(s), c:\ldcenv\ldc\driver\main.cpp, line 1084 + 0x15 byte(s)
1>  0x000000014143A4DD (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), __tmainCRTStartup() + 0x19D bytes(s), f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c, line 536 + 0x19 byte(s)

@dnadlinger
Copy link
Member

(added a three-backtick code block to the report to make the backtrace easier to read)

@redstar
Copy link
Member

redstar commented Jan 6, 2014

This is unfortunately a known problem since I started to work on the MSVC version. My workaround does not work with newer versions anymore.
I have to admit that I do not understand the complain from MSVC here. The code looks sane and even valgrind or AdressSanitizer show no problems.

@2PMEnterprises
Copy link
Author

Thanks! Didn't know I could do that. Oh, and would you look at that, right above this text box it says 'comments are parsed with GitHub Flavored Markdown'.

Other variations on the instructions: libconfig++ was built with vs2012, I didn't include the SEH patch, and my VS2012 is the Express edition.

@redstar
Copy link
Member

redstar commented Jan 6, 2014

The variations are no problem. (They may affect how often the crash but that's it.)

redstar added a commit that referenced this issue Jan 10, 2014
The use of std::vector<> is replaced by Array<> for MSVC only. This fixes
the error. But it is still unclear why std::vector<> fails.
@redstar
Copy link
Member

redstar commented Jan 10, 2014

@2PMEnterprises I fixed the issue but only in merge-2.064 branch. Please check.

@redstar
Copy link
Member

redstar commented Feb 4, 2014

Available in release 0.13.0-alpha1.

@redstar redstar closed this as completed Feb 4, 2014
redstar pushed a commit that referenced this issue Sep 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants