<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Has anyone been able to compile opencv with clang-cl ? We are trying to switch over to using clang-cl instead of MSVC since MSVC in VS2017 dies trying to compile/optimize some of our internal code but clang-cl works well. However clang-cl fails building upstream opencv which we use for quick prototyping. </div><div><br></div><div>Traceback attached and also filed a bug here: <a href="https://bugs.llvm.org/show_bug.cgi?id=39007">https://bugs.llvm.org/show_bug.cgi?id=39007</a></div><div><br></div><div>Thanks</div><div>Anush</div><div><br></div><div>\opencv\modules\core\include\opencv2/core/types.hpp(648,48):  warning: noexcept specifications are incompatible with C++98 [-Wc++98-compat]</div><div>    Scalar_& operator=(Scalar_&& s) CV_NOEXCEPT;</div><div>                                               ^</div><div>Assertion failed: Content.size() != 0, file ..\tools\clang\lib\AST\CommentParser.cpp, line 561</div><div>LLVMSymbolizer: error reading file: 'ucrtbased.pdb': no such file or directory</div><div>LLVMSymbolizer: error reading file: 'kernel32.pdb': no such file or directory</div><div>LLVMSymbolizer: error reading file: 'ntdll.pdb': no such file or directory</div><div>#0 0x00007ff7881bb56c HandleAbort d:\llvm\lib\support\windows\signals.inc:409:0</div><div>#1 0x00007ffa16d5a381 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6a381)</div><div>#2 0x00007ffa16d5bf59 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6bf59)</div><div>#3 0x00007ffa16d6167f (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x7167f)</div><div>#4 0x00007ffa16d5f671 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6f671)</div><div>#5 0x00007ffa16d61d8f (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x71d8f)</div><div>#6 0x00007ff78d59fec9 clang::comments::Parser::parseParagraphOrBlockCommand(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:561:0</div><div>#7 0x00007ff78d59ed8d clang::comments::Parser::parseBlockCommand(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:385:0</div><div>#8 0x00007ff78d59fff0 clang::comments::Parser::parseParagraphOrBlockCommand(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:576:0</div><div>#9 0x00007ff78d5a0ddc clang::comments::Parser::parseBlockContent(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:736:0</div><div>#10 0x00007ff78d5a0f1a clang::comments::Parser::parseFullComment(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:766:0</div><div>#11 0x00007ff78d4c8ec1 clang::RawComment::parse(class clang::ASTContext const &,class clang::Preprocessor const *,class clang::Decl const *)const  d:\llvm\tools\clang\lib\ast\rawcommentlist.cpp:222:0</div><div>#12 0x00007ff78d044d64 clang::ASTContext::getCommentForDecl(class clang::Decl const *,class clang::Preprocessor const *)const  d:\llvm\tools\clang\lib\ast\astcontext.cpp:592:0</div><div>#13 0x00007ff78bd7ee7c clang::Sema::ActOnDocumentableDecls(class llvm::ArrayRef<class clang::Decl *>) d:\llvm\tools\clang\lib\sema\semadecl.cpp:12287:0</div><div>#14 0x00007ff78bd7ec7e clang::Sema::ActOnDocumentableDecl(class clang::Decl *) d:\llvm\tools\clang\lib\sema\semadecl.cpp:12248:0</div><div>#15 0x00007ff78bd8ffea clang::Sema::ActOnTagStartDefinition(class clang::Scope *,class clang::Decl *) d:\llvm\tools\clang\lib\sema\semadecl.cpp:14836:0</div><div>#16 0x00007ff78b850c10 clang::Parser::ParseCXXMemberSpecification(class clang::SourceLocation,class clang::SourceLocation,struct clang::Parser::ParsedAttributesWithRange &,unsigned int,class clang::Decl *) d:\llvm\tools\clang\lib\parse\parsedeclcxx.cpp:3138:0</div><div>#17 0x00007ff78b84ffd1 clang::Parser::ParseClassSpecifier(enum clang::tok::TokenKind,class clang::SourceLocation,class clang::DeclSpec &,struct clang::Parser::ParsedTemplateInfo const &,enum clang::AccessSpecifier,bool,enum clang::Parser::DeclSpecContext,struct clang::Parser::ParsedAttributesWithRange &) d:\llvm\tools\clang\lib\parse\parsedeclcxx.cpp:1900:0</div><div>#18 0x00007ff78b79a2c2 clang::Parser::ParseDeclarationSpecifiers(class clang::DeclSpec &,struct clang::Parser::ParsedTemplateInfo const &,enum clang::AccessSpecifier,enum clang::Parser::DeclSpecContext,class clang::Parser::LateParsedAttrList *) d:\llvm\tools\clang\lib\parse\parsedecl.cpp:3700:0</div><div>#19 0x00007ff78b759a62 clang::Parser::ParseDeclOrFunctionDefInternal(struct clang::Parser::ParsedAttributesWithRange &,class clang::ParsingDeclSpec &,enum clang::AccessSpecifier) d:\llvm\tools\clang\lib\parse\parser.cpp:930:0</div><div>#20 0x00007ff78b759970 clang::Parser::ParseDeclarationOrFunctionDefinition(struct clang::Parser::ParsedAttributesWithRange &,class clang::ParsingDeclSpec *,enum clang::AccessSpecifier) d:\llvm\tools\clang\lib\parse\parser.cpp:1031:0</div><div>#21 0x00007ff78b759392 clang::Parser::ParseExternalDeclaration(struct clang::Parser::ParsedAttributesWithRange &,class clang::ParsingDeclSpec *) d:\llvm\tools\clang\lib\parse\parser.cpp:856:0</div><div>#22 0x00007ff78b84a566 clang::Parser::ParseInnerNamespace(class std::vector<class clang::SourceLocation,class std::allocator<class clang::SourceLocation> > &,class std::vector<class clang::IdentifierInfo *,class std::allocator<class clang::IdentifierInfo *> > &,class std::vector<class clang::SourceLocation,class std::allocator<class clang::SourceLocation> > &,unsigned int,class clang::SourceLocation &,class clang::ParsedAttributes &,class clang::BalancedDelimiterTracker &) d:\llvm\tools\clang\lib\parse\parsedeclcxx.cpp:221:0</div><div>#23 0x00007ff78b84a33d clang::Parser::ParseNamespace(enum clang::DeclaratorContext,class clang::SourceLocation &,class clang::SourceLocation) d:\llvm\tools\clang\lib\parse\parsedeclcxx.cpp:199:0</div><div>#24 0x00007ff78b79375b clang::Parser::ParseDeclaration(enum clang::DeclaratorContext,class clang::SourceLocation &,struct clang::Parser::ParsedAttributesWithRange &) d:\llvm\tools\clang\lib\parse\parsedecl.cpp:1682:0</div><div>#25 0x00007ff78b758e45 clang::Parser::ParseExternalDeclaration(struct clang::Parser::ParsedAttributesWithRange &,class clang::ParsingDeclSpec *) d:\llvm\tools\clang\lib\parse\parser.cpp:789:0</div><div>#26 0x00007ff78b754332 clang::Parser::ParseTopLevelDecl(class clang::OpaquePtr<class clang::DeclGroupRef> &) d:\llvm\tools\clang\lib\parse\parser.cpp:610:0</div><div>#27 0x00007ff78b750474 clang::ParseAST(class clang::Sema &,bool,bool) d:\llvm\tools\clang\lib\parse\parseast.cpp:157:0</div><div>#28 0x00007ff789295b8b clang::ASTFrontendAction::ExecuteAction(void) d:\llvm\tools\clang\lib\frontend\frontendaction.cpp:1018:0</div><div>#29 0x00007ff78da6cf46 clang::CodeGenAction::ExecuteAction(void) d:\llvm\tools\clang\lib\codegen\codegenaction.cpp:1045:0</div><div>#30 0x00007ff7892955d7 clang::FrontendAction::Execute(void) d:\llvm\tools\clang\lib\frontend\frontendaction.cpp:919:0</div><div>#31 0x00007ff789200e10 clang::CompilerInstance::ExecuteAction(class clang::FrontendAction &) d:\llvm\tools\clang\lib\frontend\compilerinstance.cpp:965:0</div><div>#32 0x00007ff78946509b clang::ExecuteCompilerInvocation(class clang::CompilerInstance *) d:\llvm\tools\clang\lib\frontendtool\executecompilerinvocation.cpp:259:0</div><div>#33 0x00007ff78486c7c4 cc1_main(class llvm::ArrayRef<char const *>,char const *,void *) d:\llvm\tools\clang\tools\driver\cc1_main.cpp:218:0</div><div>#34 0x00007ff78485562d ExecuteCC1Tool d:\llvm\tools\clang\tools\driver\driver.cpp:310:0</div><div>#35 0x00007ff784855eaf main d:\llvm\tools\clang\tools\driver\driver.cpp:382:0</div><div>#36 0x00007ff78d749454 invoke_main f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0</div><div>#37 0x00007ff78d7492fe __scrt_common_main_seh f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0</div><div>#38 0x00007ff78d7491be __scrt_common_main f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0</div><div>#39 0x00007ff78d7494e9 mainCRTStartup f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0</div><div>#40 0x00007ffa62113034 (C:\WINDOWS\System32\KERNEL32.DLL+0x13034)</div><div>#41 0x00007ffa64161461 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x71461)</div><div>clang-cl: error: clang frontend command failed due to signal (use -v to see invocation)</div><div>clang version 8.0.0 (<a href="https://github.com/llvm-mirror/clang">https://github.com/llvm-mirror/clang</a> 30d3f201efd974e92af39ab7522ca30ddb2a379a) (<a href="https://github.com/llvm-mirror/llvm">https://github.com/llvm-mirror/llvm</a> 50dce07c8dd6ea205f7ed0c5689237cde40c5796)</div><div>Target: x86_64-pc-windows-msvc</div><div>Thread model: posix</div><div>InstalledDir: D:\llvm\build\bin</div><div>clang-cl: note: diagnostic msg: PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source, and associated run script.</div><div>clang-cl: note: diagnostic msg:</div><div>********************</div><div><br></div><div>PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:</div><div>Preprocessed source(s) and associated run script(s) are located at:</div><div>clang-cl: note: diagnostic msg: C:\Users\Anush\AppData\Local\Temp\convert_scale-dc9bd0.sh</div><div>clang-cl: note: diagnostic msg:</div><div><br></div></div></div></div>