[cfe-dev] Clang compile error

Chilledheart chilledheart at fastmail.fm
Mon Mar 16 00:12:13 PDT 2015


You say you are following the guide
http://clang.llvm.org/get_started.html, so I am assuming you are using
trunk version of llvm.

-- 
  Cheers,
Chilledheart

On Mon, Mar 16, 2015, at 12:38, pdrocaldeira wrote:
> Thanks guys. I've done it and it looks same as before. Another tip?
> 
> llvm[4]: Compiling SanitizerBlacklist.cpp for Release+Asserts build
> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/SanitizerBlacklist.cpp:
> In constructor ‘clang::SanitizerBlacklist::SanitizerBlacklist(const
> std::vector<std::basic_string<char> >&, clang::SourceManager&)’:
> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/SanitizerBlacklist.cpp:20:60:
> error: no matching function for call to
> ‘llvm::SpecialCaseList::createOrDie(const
> std::vector<std::basic_string<char> >&)’
>      : SCL(llvm::SpecialCaseList::createOrDie(BlacklistPaths)), SM(SM) {}

>From the change log this line of code in clang and this API in llvm are
not there until version 3.7. And your source directory's name hints you
are using llvm 3.6 instead of llvm 3.7. So I guess you misused the new
clang on the old version of llvm. Can you check it?

>                                                             ^
> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/SanitizerBlacklist.cpp:20:60:
> note: candidate is:
> In file included from
> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/../../include/clang/Basic/SanitizerBlacklist.h:21:0,
>                  from
> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/SanitizerBlacklist.cpp:14:
> /home/pedro/Downloads/llvm-3.6/include/llvm/Support/SpecialCaseList.h:71:43:
> note: static std::unique_ptr<llvm::SpecialCaseList>
> llvm::SpecialCaseList::createOrDie(llvm::StringRef)
>    static std::unique_ptr<SpecialCaseList> createOrDie(StringRef Path);
>                                            ^
> /home/pedro/Downloads/llvm-3.6/include/llvm/Support/SpecialCaseList.h:71:43:
> note:   no known conversion for argument 1 from ‘const
> std::vector<std::basic_string<char> >’ to ‘llvm::StringRef’
> /bin/rm: cannot remove
> ‘/home/pedro/Downloads/llvm-3.6_build/tools/clang/lib/Basic/Release+Asserts/SanitizerBlacklist.d.tmp’:
> No such file or directory
> make[4]: ***
> [/home/pedro/Downloads/llvm-3.6_build/tools/clang/lib/Basic/Release+Asserts/SanitizerBlacklist.o]
> Error 1
> make[4]: Leaving directory
> `/home/pedro/Downloads/llvm-3.6_build/tools/clang/lib/Basic'
> make[3]: *** [Basic/.makeall] Error 2
> make[3]: *** Waiting for unfinished jobs....
> llvm[4]: Compiling PPMacroExpansion.cpp for Release+Asserts build
> llvm[4]: Compiling PTHLexer.cpp for Release+Asserts build
> llvm[4]: Compiling Pragma.cpp for Release+Asserts build
> llvm[4]: Compiling PreprocessingRecord.cpp for Release+Asserts build
> llvm[4]: Compiling Preprocessor.cpp for Release+Asserts build
> llvm[4]: Compiling PreprocessorLexer.cpp for Release+Asserts build
> llvm[4]: Compiling ScratchBuffer.cpp for Release+Asserts build
> llvm[4]: Compiling TokenConcatenation.cpp for Release+Asserts build
> llvm[4]: Compiling TokenLexer.cpp for Release+Asserts build
> llvm[4]: Building Release+Asserts Archive Library libclangLex.a
> make[4]: Leaving directory
> `/home/pedro/Downloads/llvm-3.6_build/tools/clang/lib/Lex'
> make[3]: Leaving directory
> `/home/pedro/Downloads/llvm-3.6_build/tools/clang/lib'
> make[2]: *** [all] Error 1
> make[2]: Leaving directory
> `/home/pedro/Downloads/llvm-3.6_build/tools/clang'
> make[1]: *** [clang/.makeall] Error 2
> make[1]: Leaving directory `/home/pedro/Downloads/llvm-3.6_build/tools'
> make: *** [all] Error 1
> 
> 
> 2015-03-15 19:28 GMT-03:00 Nikola Smiljanic [via Clang Developers] <
> ml-node+s42468n4044510h5 at n3.nabble.com>:
> 
> > Is the source code in /home/Downloads/llvm-3-6 and build directory inside
> > it? Build dir should be outside your source dir.
> >
> > On Mon, Mar 16, 2015 at 8:36 AM, pdrocaldeira <[hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=4044510&i=0>> wrote:
> >
> >> I'm trying to compile Clang. I'm using Ubuntu 14.04.
> >>
> >> I'm using this http://clang.llvm.org/get_started.html and I can't get it
> >> to
> >> work.
> >>
> >> This is what I get:
> >>
> >> llvm[4]: Compiling SourceLocation.cpp for Release+Asserts build
> >>
> >> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/SanitizerBlacklist.cpp:
> >> In constructor ‘clang::SanitizerBlacklist::SanitizerBlacklist(const
> >> std::vector<std::basic_string<char> >&, clang::SourceManager&)’:
> >>
> >> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/SanitizerBlacklist.cpp:20:60:
> >> error: no matching function for call to
> >> ‘llvm::SpecialCaseList::createOrDie(const
> >> std::vector<std::basic_string<char> >&)’
> >>      : SCL(llvm::SpecialCaseList::createOrDie(BlacklistPaths)), SM(SM) {}
> >>                                                             ^
> >>
> >> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/SanitizerBlacklist.cpp:20:60:
> >> note: candidate is:
> >> In file included from
> >>
> >> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/../../include/clang/Basic/SanitizerBlacklist.h:21:0,
> >>                  from
> >>
> >> /home/pedro/Downloads/llvm-3.6/tools/clang/lib/Basic/SanitizerBlacklist.cpp:14:
> >>
> >> /home/pedro/Downloads/llvm-3.6/include/llvm/Support/SpecialCaseList.h:71:43:
> >> note: static std::unique_ptr<llvm::SpecialCaseList>
> >> llvm::SpecialCaseList::createOrDie(llvm::StringRef)
> >>    static std::unique_ptr<SpecialCaseList> createOrDie(StringRef Path);
> >>                                            ^
> >>
> >> /home/pedro/Downloads/llvm-3.6/include/llvm/Support/SpecialCaseList.h:71:43:
> >> note:   no known conversion for argument 1 from ‘const
> >> std::vector<std::basic_string<char> >’ to ‘llvm::StringRef’
> >> /bin/rm: cannot remove
> >>
> >> ‘/home/pedro/Downloads/llvm-3.6/build/tools/clang/lib/Basic/Release+Asserts/SanitizerBlacklist.d.tmp’:
> >> No such file or directory
> >> make[4]: ***
> >>
> >> [/home/pedro/Downloads/llvm-3.6/build/tools/clang/lib/Basic/Release+Asserts/SanitizerBlacklist.o]
> >> Error 1
> >> make[4]: *** Waiting for unfinished jobs....
> >> llvm[4]: Compiling PPLexerChange.cpp for Release+Asserts build
> >> make[4]: Leaving directory
> >> `/home/pedro/Downloads/llvm-3.6/build/tools/clang/lib/Basic'
> >> make[3]: *** [Basic/.makeall] Error 2
> >> llvm[4]: Compiling PPMacroExpansion.cpp for Release+Asserts build
> >> llvm[4]: Compiling PTHLexer.cpp for Release+Asserts build
> >> llvm[4]: Compiling Pragma.cpp for Release+Asserts build
> >> llvm[4]: Compiling PreprocessingRecord.cpp for Release+Asserts build
> >> llvm[4]: Compiling Preprocessor.cpp for Release+Asserts build
> >> llvm[4]: Compiling PreprocessorLexer.cpp for Release+Asserts build
> >> llvm[4]: Compiling ScratchBuffer.cpp for Release+Asserts build
> >> llvm[4]: Compiling TokenConcatenation.cpp for Release+Asserts build
> >> llvm[4]: Compiling TokenLexer.cpp for Release+Asserts build
> >> llvm[4]: Building Release+Asserts Archive Library libclangLex.a
> >> make[4]: Leaving directory
> >> `/home/pedro/Downloads/llvm-3.6/build/tools/clang/lib/Lex'
> >> make[3]: Leaving directory
> >> `/home/pedro/Downloads/llvm-3.6/build/tools/clang/lib'
> >> make[2]: *** [all] Error 1
> >> make[2]: Leaving directory
> >> `/home/pedro/Downloads/llvm-3.6/build/tools/clang'
> >> make[1]: *** [clang/.makeall] Error 2
> >> make[1]: Leaving directory `/home/pedro/Downloads/llvm-3.6/build/tools'
> >> make: *** [all] Error 1
> >>
> >> Sorry if I made something wrong.
> >>
> >> Thanks for your time.
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >> http://clang-developers.42468.n3.nabble.com/Clang-compile-error-tp4044509.html
> >> Sent from the Clang Developers mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> cfe-dev mailing list
> >> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4044510&i=1>
> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> >>
> >
> >
> > _______________________________________________
> > cfe-dev mailing list
> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4044510&i=2>
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> > http://clang-developers.42468.n3.nabble.com/Clang-compile-error-tp4044509p4044510.html
> >  To unsubscribe from Clang compile error, click here
> > <http://clang-developers.42468.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4044509&code=cGRyb2NhbGRlaXJhQGdtYWlsLmNvbXw0MDQ0NTA5fC00ODEzMDk5MQ==>
> > .
> > NAML
> > <http://clang-developers.42468.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
> >
> 
> 
> 
> 
> --
> View this message in context:
> http://clang-developers.42468.n3.nabble.com/Clang-compile-error-tp4044509p4044513.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list