: troubles during compiling

Hello everyone!

After I’ve checked out Clang and Compiler-RT repositories, I receive this error during compilation:

llvm[5]: Compiling PathDiagnostic.cpp for Debug+Asserts build
/media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp: In member function ‘bool {anonymous}::CompareDiagnostics::operator()(const clang::ento::PathDiagnostic*, const clang::ento::PathDiagnostic*) const’:
/media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp:224:23: error: no match for ‘operator<’ in ‘XProfile < YProfile’
/media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp:224:23: note: candidates are:
In file included from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/DeclBase.h:18:0,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/Decl.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Analysis/AnalysisContext.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Analysis/ProgramPoint.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp:14:
/media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/DeclarationName.h:303:13: note: bool clang::operator<(clang::DeclarationName, clang::DeclarationName)
/media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/DeclarationName.h:303:13: note: no known conversion for argument 1 from ‘llvm::FoldingSetNodeID’ to ‘clang::DeclarationName’
In file included from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h:17:0,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp:14:
/media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Basic/SourceLocation.h:185:13: note: bool clang::operator<(const clang::SourceLocation&, const clang::SourceLocation&)
/media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Basic/SourceLocation.h:185:13: note: no known conversion for argument 1 from ‘llvm::FoldingSetNodeID’ to ‘const clang::SourceLocation&’
In file included from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/Type.h:29:0,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/Attr.h:19,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/DeclBase.h:17,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/Decl.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Analysis/AnalysisContext.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Analysis/ProgramPoint.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp:14:
/media/data/dev/llvm/llvm/include/llvm/ADT/Optional.h:89:6: note: template<class T, class U> void llvm::operator<(const llvm::Optional&, const llvm::Optional&)
/media/data/dev/llvm/llvm/include/llvm/ADT/Optional.h:89:6: note: template argument deduction/substitution failed:
/media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp:224:23: note: ‘llvm::FoldingSetNodeID’ is not derived from ‘const llvm::Optional’
In file included from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Basic/DiagnosticIDs.h:19:0,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Basic/Diagnostic.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/Type.h:17,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/Attr.h:19,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/DeclBase.h:17,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/AST/Decl.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Analysis/AnalysisContext.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/Analysis/ProgramPoint.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/…/…/…/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h:18,
from /media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp:14:
/media/data/dev/llvm/llvm/include/llvm/ADT/StringRef.h:526:15: note: bool llvm::operator<(llvm::StringRef, llvm::StringRef)
/media/data/dev/llvm/llvm/include/llvm/ADT/StringRef.h:526:15: note: no known conversion for argument 1 from ‘llvm::FoldingSetNodeID’ to ‘llvm::StringRef’
/media/data/dev/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp:225:3: warning: control reaches end of non-void function [-Wreturn-type]
/bin/rm: cannot remove ‘/media/data/dev/llvm/bin/tools/clang/lib/StaticAnalyzer/Core/Debug+Asserts/PathDiagnostic.d.tmp’: No such file or directory
make[5]: *** [/media/data/dev/llvm/bin/tools/clang/lib/StaticAnalyzer/Core/Debug+Asserts/PathDiagnostic.o] Error 1
make[5]: Leaving directory /media/data/dev/llvm/bin/tools/clang/lib/StaticAnalyzer/Core' make[4]: *** [Core/.makeall] Error 2 make[4]: Leaving directory /media/data/dev/llvm/bin/tools/clang/lib/StaticAnalyzer’
make[3]: *** [StaticAnalyzer/.makeall] Error 2
make[3]: Leaving directory /media/data/dev/llvm/bin/tools/clang/lib' make[2]: *** [all] Error 1 make[2]: Leaving directory /media/data/dev/llvm/bin/tools/clang’
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/media/data/dev/llvm/bin/tools’
make: *** [all] Error 1

Could, please, somebody help me?

Hi Vadim, which compiler are you using to to the build, what platform are you
on, how did you configure LLVM, clang etc ?

Ciao, duncan.

Hi, Duncan,

I’m sorry, I forgot to run ‘svn up’ in LLVM repository after adding the Clang repository. Now it works.
Thank you for response!

2012/9/9 Duncan Sands <baldrick@free.fr>