make -j4 gives error when installing Pluto (using pet branch)

80 views
Skip to first unread message

Gayatri P K

unread,
Feb 25, 2017, 12:58:14 AM2/25/17
to Pluto development

make[4]: Entering directory `/home/gayatripk/pluto/pet'
  CXX      scan.lo
  CXX      pet.lo
pet.cc:636:46: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 static const char *ResourceDir = CLANG_PREFIX"/lib/clang/"CLANG_VERSION_STRING;
                                              ^
In file included from scan.cc:52:0:
scan.h:128:19: error: expected ';' at end of member declaration
  struct pet_scop *extract(clang::StmtRange stmt_range, bool block,
                   ^
scan.h:128:34: error: 'pet_scop* PetScan::extract' conflicts with a previous declaration
  struct pet_scop *extract(clang::StmtRange stmt_range, bool block,
                                  ^
scan.h:126:19: note: previous declaration 'pet_scop* PetScan::extract(clang::Stmt*, bool)'
  struct pet_scop *extract(clang::Stmt *stmt,
                   ^
scan.h:128:44: error: expected ')' before 'stmt_range'
  struct pet_scop *extract(clang::StmtRange stmt_range, bool block,
                                            ^
scan.h: In constructor 'PetScan::PetScan(clang::Preprocessor&, clang::ASTContext&, ScopLoc&, pet_options*, isl_union_map*)':
scan.h:45:11: warning: 'PetScan::ctx' will be initialized after [-Wreorder]
  isl_ctx *ctx;
           ^
scan.h:39:23: warning:   'clang::Preprocessor& PetScan::PP' [-Wreorder]
  clang::Preprocessor &PP;
                       ^
scan.h:82:2: warning:   when initialized here [-Wreorder]
  PetScan(clang::Preprocessor &PP,
  ^
scan.h:80:17: warning: 'PetScan::value_bounds' will be initialized after [-Wreorder]
  isl_union_map *value_bounds;
                 ^
scan.h:48:6: warning:   'int PetScan::n_stmt' [-Wreorder]
  int n_stmt;
      ^
scan.h:82:2: warning:   when initialized here [-Wreorder]
  PetScan(clang::Preprocessor &PP,
  ^
scan.cc: In function 'clang::DeclRefExpr* create_DeclRefExpr(clang::VarDecl*)':
scan.cc:73:12: error: no matching function for call to 'clang::DeclRefExpr::Create(clang::ASTContext&, clang::NestedNameSpecifierLoc, clang::SourceLocation, clang::VarDecl*&, clang::SourceLocation, clang::QualType, clang::ExprValueKind)'
   VK_LValue);
            ^
scan.cc:73:12: note: candidates are:
In file included from scan.cc:42:0:
/usr/local/include/clang/AST/Expr.h:986:3: note: static clang::DeclRefExpr* clang::DeclRefExpr::Create(const clang::ASTContext&, clang::NestedNameSpecifierLoc, clang::SourceLocation, clang::ValueDecl*, bool, clang::SourceLocation, clang::QualType, clang::ExprValueKind, clang::NamedDecl*, const clang::TemplateArgumentListInfo*)
   Create(const ASTContext &Context, NestedNameSpecifierLoc QualifierLoc,
   ^
/usr/local/include/clang/AST/Expr.h:986:3: note:   candidate expects 10 arguments, 7 provided
/usr/local/include/clang/AST/Expr.h:993:3: note: static clang::DeclRefExpr* clang::DeclRefExpr::Create(const clang::ASTContext&, clang::NestedNameSpecifierLoc, clang::SourceLocation, clang::ValueDecl*, bool, const clang::DeclarationNameInfo&, clang::QualType, clang::ExprValueKind, clang::NamedDecl*, const clang::TemplateArgumentListInfo*)
   Create(const ASTContext &Context, NestedNameSpecifierLoc QualifierLoc,
   ^
/usr/local/include/clang/AST/Expr.h:993:3: note:   candidate expects 10 arguments, 7 provided
scan.cc: In member function 'bool clear_assignments::VisitCallExpr(clang::CallExpr*)':
scan.cc:164:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < expr->getNumArgs(); ++i) {
                                        ^
scan.cc: In member function 'void PetScan::unsupported(clang::Stmt*, const char*)':
scan.cc:289:34: error: no matching function for call to 'clang::DiagnosticsEngine::getCustomDiagID(clang::DiagnosticsEngine::Level, const char*)'
         msg ? msg : "unsupported");
                                  ^
scan.cc:289:34: note: candidate is:
In file included from /usr/local/include/clang/Basic/PartialDiagnostic.h:19:0,
                 from /usr/local/include/clang/AST/DeclarationName.h:17,
                 from /usr/local/include/clang/AST/DeclBase.h:18,
                 from /usr/local/include/clang/AST/Decl.h:18,
                 from /usr/local/include/clang/AST/ASTTypeTraits.h:20,
                 from /usr/local/include/clang/AST/ASTContext.h:18,
                 from scan.cc:40:
/usr/local/include/clang/Basic/Diagnostic.h:602:12: note: template<unsigned int N> unsigned int clang::DiagnosticsEngine::getCustomDiagID(clang::DiagnosticsEngine::Level, const char (&)[N])
   unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
            ^
/usr/local/include/clang/Basic/Diagnostic.h:602:12: note:   template argument deduction/substitution failed:
scan.cc:289:34: note:   mismatched types 'const char [N]' and 'const char*'
         msg ? msg : "unsupported");
                                  ^
scan.cc: In member function 'pet_expr* PetScan::extract_expr(clang::CallExpr*)':
scan.cc:1910:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < n_arg; ++i) {
                      ^
scan.cc: In function 'pet_scop* scop_add_array(pet_scop*, isl_multi_pw_aff*, clang::ASTContext&)':
scan.cc:2507:59: error: 'struct clang::TypeInfo' has no member named 'first'
  array->element_size = ast_ctx.getTypeInfo(ast_ctx.IntTy).first / 8;
                                                           ^
scan.cc: In member function 'pet_scop* PetScan::extract(clang::CompoundStmt*, bool)':
scan.cc:3254:58: error: no matching function for call to 'PetScan::extract(clang::Stmt::child_range, bool, bool&)'
  return extract(stmt->children(), true, skip_declarations);
                                                          ^
scan.cc:3254:58: note: candidates are:
In file included from scan.cc:52:0:
scan.h:126:19: note: pet_scop* PetScan::extract(clang::Stmt*, bool)
  struct pet_scop *extract(clang::Stmt *stmt,
                   ^
scan.h:126:19: note:   candidate expects 2 arguments, 3 provided
scan.h:130:19: note: pet_scop* PetScan::extract(clang::IfStmt*)
  struct pet_scop *extract(clang::IfStmt *stmt);
                   ^
scan.h:130:19: note:   candidate expects 1 argument, 3 provided
scan.cc:2615:18: note: pet_scop* PetScan::extract(clang::WhileStmt*)
 struct pet_scop *PetScan::extract(WhileStmt *stmt)
                  ^
scan.cc:2615:18: note:   candidate expects 1 argument, 3 provided
scan.cc:3252:18: note: pet_scop* PetScan::extract(clang::CompoundStmt*, bool)
 struct pet_scop *PetScan::extract(CompoundStmt *stmt, bool skip_declarations)
                  ^
scan.cc:3252:18: note:   candidate expects 2 arguments, 3 provided
In file included from scan.cc:52:0:
scan.h:134:19: note: pet_scop* PetScan::extract(clang::LabelStmt*)
  struct pet_scop *extract(clang::LabelStmt *stmt);
                   ^
scan.h:134:19: note:   candidate expects 1 argument, 3 provided
scan.h:135:19: note: pet_scop* PetScan::extract(clang::ContinueStmt*)
  struct pet_scop *extract(clang::ContinueStmt *stmt);
                   ^
scan.h:135:19: note:   candidate expects 1 argument, 3 provided
scan.h:136:19: note: pet_scop* PetScan::extract(clang::BreakStmt*)
  struct pet_scop *extract(clang::BreakStmt *stmt);
                   ^
scan.h:136:19: note:   candidate expects 1 argument, 3 provided
scan.cc:1671:18: note: pet_scop* PetScan::extract(clang::DeclStmt*)
 struct pet_scop *PetScan::extract(DeclStmt *stmt)
                  ^
scan.cc:1671:18: note:   candidate expects 1 argument, 3 provided
In file included from scan.cc:52:0:
scan.h:139:19: note: pet_scop* PetScan::extract(clang::Stmt*, pet_expr*, isl_id*)
  struct pet_scop *extract(clang::Stmt *stmt, struct pet_expr *expr,
                   ^
scan.h:139:19: note:   no known conversion for argument 1 from 'clang::Stmt::child_range {aka llvm::iterator_range<clang::StmtIterator>}' to 'clang::Stmt*'
scan.cc: In member function 'pet_expr* PetScan::resolve_nested(pet_expr*)':
scan.cc:3412:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < expr->n_arg; ++i) {
                            ^
scan.cc: In function 'pet_stmt* remove_nested_parameters(pet_stmt*)':
scan.cc:3931:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < stmt->n_arg; ++i) {
                            ^
scan.cc: In member function 'pet_stmt* PetScan::extract_nested(pet_stmt*, int, std::map<int, int>&)':
scan.cc:3969:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (i = 0; i < stmt->n_arg; ++i)
                        ^
scan.cc: In function 'pet_stmt* remove_duplicate_arguments(pet_stmt*, int)':
scan.cc:4000:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (n == stmt->n_arg)
                 ^
scan.cc:4016:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (j = i; j + 1 < stmt->n_arg; ++j)
                             ^
scan.cc: At global scope:
scan.cc:5073:35: error: 'pet_scop* PetScan::extract' is not a static member of 'struct PetScan'
 struct pet_scop *PetScan::extract(StmtRange stmt_range, bool block,
                                   ^
scan.cc:5073:35: error: 'StmtRange' was not declared in this scope
In file included from /usr/include/c++/4.8/bits/atomic_base.h:36:0,
                 from /usr/include/c++/4.8/atomic:41,
                 from /usr/local/include/llvm/ADT/IntrusiveRefCntPtr.h:24,
                 from /usr/local/include/clang/Basic/DiagnosticIDs.h:19,
                 from /usr/local/include/clang/Basic/Diagnostic.h:18,
                 from /usr/local/include/clang/Basic/PartialDiagnostic.h:19,
                 from /usr/local/include/clang/AST/DeclarationName.h:17,
                 from /usr/local/include/clang/AST/DeclBase.h:18,
                 from /usr/local/include/clang/AST/Decl.h:18,
                 from /usr/local/include/clang/AST/ASTTypeTraits.h:20,
                 from /usr/local/include/clang/AST/ASTContext.h:18,
                 from scan.cc:40:
scan.cc:5073:57: error: expected primary-expression before 'bool'
 struct pet_scop *PetScan::extract(StmtRange stmt_range, bool block,
                                                         ^
scan.cc:5074:2: error: expected primary-expression before 'bool'
  bool skip_declarations)
  ^
scan.cc:5074:24: error: expression list treated as compound expression in initializer [-fpermissive]
  bool skip_declarations)
                        ^
scan.cc:5075:1: error: expected ',' or ';' before '{' token
 {
 ^
In file included from pet.cc:89:0:
scan.h:128:19: error: expected ';' at end of member declaration
  struct pet_scop *extract(clang::StmtRange stmt_range, bool block,
                   ^
scan.h:128:34: error: 'pet_scop* PetScan::extract' conflicts with a previous declaration
  struct pet_scop *extract(clang::StmtRange stmt_range, bool block,
                                  ^
scan.h:126:19: note: previous declaration 'pet_scop* PetScan::extract(clang::Stmt*, bool)'
  struct pet_scop *extract(clang::Stmt *stmt,
                   ^
scan.h:128:44: error: expected ')' before 'stmt_range'
  struct pet_scop *extract(clang::StmtRange stmt_range, bool block,
                                            ^
scan.h: In constructor 'PetScan::PetScan(clang::Preprocessor&, clang::ASTContext&, ScopLoc&, pet_options*, isl_union_map*)':
scan.h:45:11: warning: 'PetScan::ctx' will be initialized after [-Wreorder]
  isl_ctx *ctx;
           ^
scan.h:39:23: warning:   'clang::Preprocessor& PetScan::PP' [-Wreorder]
  clang::Preprocessor &PP;
                       ^
scan.h:82:2: warning:   when initialized here [-Wreorder]
  PetScan(clang::Preprocessor &PP,
  ^
scan.h:80:17: warning: 'PetScan::value_bounds' will be initialized after [-Wreorder]
  isl_union_map *value_bounds;
                 ^
scan.h:48:6: warning:   'int PetScan::n_stmt' [-Wreorder]
  int n_stmt;
      ^
scan.h:82:2: warning:   when initialized here [-Wreorder]
  PetScan(clang::Preprocessor &PP,
  ^
pet.cc: In constructor 'PragmaValueBoundsHandler::PragmaValueBoundsHandler(isl_ctx*, clang::Sema&)':
pet.cc:138:11: warning: 'PragmaValueBoundsHandler::ctx' will be initialized after [-Wreorder]
  isl_ctx *ctx;
           ^
pet.cc:137:8: warning:   'clang::Sema& PragmaValueBoundsHandler::sema' [-Wreorder]
  Sema &sema;
        ^
pet.cc:141:2: warning:   when initialized here [-Wreorder]
  PragmaValueBoundsHandler(isl_ctx *ctx, Sema &sema) :
  ^
pet.cc: In constructor 'PetASTConsumer::PetASTConsumer(isl_ctx*, clang::Preprocessor&, clang::ASTContext&, clang::DiagnosticsEngine&, ScopLocList&, const char*, pet_options*, int (*)(pet_scop*, void*), void*)':
pet.cc:510:11: warning: 'PetASTConsumer::ctx' will be initialized after [-Wreorder]
  isl_ctx *ctx;
           ^
pet.cc:504:16: warning:   'clang::Preprocessor& PetASTConsumer::PP' [-Wreorder]
  Preprocessor &PP;
                ^
pet.cc:519:2: warning:   when initialized here [-Wreorder]
  PetASTConsumer(isl_ctx *ctx, Preprocessor &PP, ASTContext &ast_context,
  ^
pet.cc: In function 'bool is_implicit(const clang::IdentifierInfo*)':
pet.cc:92:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define ARRAY_SIZE(array) (sizeof(array)/sizeof(*array))
                                                        ^
pet.cc:645:22: note: in expansion of macro 'ARRAY_SIZE'
  for (int i = 0; i < ARRAY_SIZE(implicit_functions); ++i)
                      ^
pet.cc: In function 'clang::driver::Driver* construct_driver(const char*, clang::DiagnosticsEngine&)':
pet.cc:700:17: error: no matching function for call to 'clang::driver::Driver::Driver(const char*&, std::string, const char [1], clang::DiagnosticsEngine&)'
        "", Diags);
                 ^
pet.cc:700:17: note: candidate is:
In file included from pet.cc:50:0:
/usr/local/include/clang/Driver/Driver.h:223:3: note: clang::driver::Driver::Driver(llvm::StringRef, llvm::StringRef, clang::DiagnosticsEngine&, llvm::IntrusiveRefCntPtr<clang::vfs::FileSystem>)
   Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple,
   ^
/usr/local/include/clang/Driver/Driver.h:223:3: note:   no known conversion for argument 3 from 'const char [1]' to 'clang::DiagnosticsEngine&'
pet.cc: In function 'clang::CompilerInvocation* construct_invocation(const char*, clang::DiagnosticsEngine&)':
pet.cc:713:8: error: 'OwningPtr' in namespace 'llvm' does not name a type
  const llvm::OwningPtr<Driver> driver(construct_driver(binary, Diags));
        ^
pet.cc:717:8: error: 'OwningPtr' in namespace 'llvm' does not name a type
  const llvm::OwningPtr<Compilation> compilation(
        ^
pet.cc:719:18: error: 'compilation' was not declared in this scope
  JobList &Jobs = compilation->getJobs();
                  ^
pet.cc:723:44: error: cannot convert 'clang::driver::Command' to 'clang::driver::Command*' in initialization
  Command *cmd = cast<Command>(*Jobs.begin());
                                            ^
pet.cc: In function 'clang::TargetInfo* create_target_info(clang::CompilerInstance*, clang::DiagnosticsEngine&)':
pet.cc:779:47: error: no matching function for call to 'clang::TargetInfo::CreateTargetInfo(clang::DiagnosticsEngine&, clang::TargetOptions&)'
  return TargetInfo::CreateTargetInfo(Diags, TO);
                                               ^
pet.cc:779:47: note: candidate is:
In file included from pet.cc:48:0:
/usr/local/include/clang/Basic/TargetInfo.h:105:3: note: static clang::TargetInfo* clang::TargetInfo::CreateTargetInfo(clang::DiagnosticsEngine&, const std::shared_ptr<clang::TargetOptions>&)
   CreateTargetInfo(DiagnosticsEngine &Diags,
   ^
/usr/local/include/clang/Basic/TargetInfo.h:105:3: note:   no known conversion for argument 2 from 'clang::TargetOptions' to 'const std::shared_ptr<clang::TargetOptions>&'
pet.cc: In function 'int foreach_scop_in_C_source(isl_ctx*, const char*, const char*, pet_options*, int (*)(pet_scop*, void*), void*)':
pet.cc:867:28: error: no matching function for call to 'clang::CompilerInstance::createPreprocessor()'
  Clang->createPreprocessor();
                            ^
pet.cc:867:28: note: candidate is:
In file included from pet.cc:52:0:
/usr/local/include/clang/Frontend/CompilerInstance.h:637:8: note: void clang::CompilerInstance::createPreprocessor(clang::TranslationUnitKind)
   void createPreprocessor(TranslationUnitKind TUKind);
        ^
/usr/local/include/clang/Frontend/CompilerInstance.h:637:8: note:   candidate expects 1 argument, 0 provided
pet.cc:877:28: error: 'class clang::SourceManager' has no member named 'createMainFileID'
  Clang->getSourceManager().createMainFileID(file);
                            ^
pet.cc: In function 'clang::driver::Driver* construct_driver(const char*, clang::DiagnosticsEngine&)':
pet.cc:701:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
pet.cc: In function 'clang::TargetInfo* create_target_info(clang::CompilerInstance*, clang::DiagnosticsEngine&)':
pet.cc:780:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
scan.cc: In function 'clang::DeclRefExpr* create_DeclRefExpr(clang::VarDecl*)':
scan.cc:74:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
pet.cc: At global scope:
pet.cc:697:16: warning: 'clang::driver::Driver* construct_driver(const char*, clang::DiagnosticsEngine&)' defined but not used [-Wunused-function]
 static Driver *construct_driver(const char *binary, DiagnosticsEngine &Diags)
                ^
make[4]: *** [pet.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
scan.cc: In member function 'pet_scop* PetScan::extract(clang::CompoundStmt*, bool)':
scan.cc:3255:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
scan.cc: At global scope:
scan.cc:393:28: warning: 'isl_set* set_parameter_bounds(isl_set*, unsigned int, clang::ValueDecl*)' defined but not used [-Wunused-function]
 static __isl_give isl_set *set_parameter_bounds(__isl_take isl_set *set,
                            ^
scan.cc:5034:25: warning: 'pet_scop* mark_exposed(pet_scop*)' defined but not used [-Wunused-function]
 static struct pet_scop *mark_exposed(struct pet_scop *scop)
                         ^
make[4]: *** [scan.lo] Error 1
make[4]: Leaving directory `/home/gayatripk/pluto/pet'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/gayatripk/pluto/pet'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/gayatripk/pluto/pet'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gayatripk/pluto'
make: *** [all] Error 2


what is the issue? how to correct this?

Uday R Bondhugula

unread,
Feb 25, 2017, 1:01:25 AM2/25/17
to Gayatri P K, Pluto development

It looks like you don't have Clang 3.4 or you don't have all the
necessary header files from it. What's the output of your

$ llvm-config --version

How did you install Clang/LLVM?

~ Uday
> --
> You received this message because you are subscribed to the Google
> Groups "Pluto development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pluto-developm...@googlegroups.com.
> To post to this group, send email to
> pluto-de...@googlegroups.com.
> Visit this group at MAILSCANNER HAS DETECTED DEFINITE FRAUD IN THE
> WEBSITE AT "GROUPS.GOOGLE.COM". DO _NOT_ TRUST THIS WEBSITE:
> https://groups.google.com/group/pluto-development [1].
> For more options, visit MAILSCANNER HAS DETECTED DEFINITE FRAUD IN THE
> WEBSITE AT "GROUPS.GOOGLE.COM". DO _NOT_ TRUST THIS WEBSITE:
> https://groups.google.com/d/optout [2].
>
> --
> This message has been scanned for viruses and
> dangerous content by MAILSCANNER [3], and is
> believed to be clean.
>
> Links:
> ------
> [1] https://groups.google.com/group/pluto-development
> [2] https://groups.google.com/d/optout
> [3] http://www.mailscanner.info/

Gayatri P K

unread,
Feb 25, 2017, 1:11:13 AM2/25/17
to Pluto development
 
 The ouput of llvm-config --version is 3.9.0svn So should i uninstall clang 3.9 and then install clang 3.4 ?

Uday Reddy B

unread,
Feb 25, 2017, 1:18:43 AM2/25/17
to Gayatri P K, Pluto development


On 25-02-2017 11:41, 'Gayatri P K' via Pluto development wrote:
> The ouput of llvm-config --version is 3.9.0svn So should i uninstall
> clang 3.9 and then install clang 3.4 ?

You need to install clang 3.4; it doesn't matter whether you have the
other versions around as long as you install the former in a separate
location.

~ Uday
> --
> You received this message because you are subscribed to the Google
> Groups "Pluto development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pluto-developm...@googlegroups.com.
> To post to this group, send email to
> pluto-de...@googlegroups.com.
> Visit this group at MAILSCANNER HAS DETECTED DEFINITE FRAUD IN THE
> WEBSITE AT "GROUPS.GOOGLE.COM". DO _NOT_ TRUST THIS WEBSITE:
> https://groups.google.com/group/pluto-development [1].
> For more options, visit MAILSCANNER HAS DETECTED DEFINITE FRAUD IN THE
> WEBSITE AT "GROUPS.GOOGLE.COM". DO _NOT_ TRUST THIS WEBSITE:
> https://groups.google.com/d/optout [2].
>
>

Gayatri P K

unread,
Feb 25, 2017, 1:42:17 AM2/25/17
to Pluto development


 I installed clang 3.4 but still the error is there in make -j4 command.
 After installing clang 3.4, clang version shows only 3. 9

On Saturday, February 25, 2017 at 11:28:14 AM UTC+5:30, Gayatri P K wrote:
Reply all
Reply to author
Forward
0 new messages