Clang compile error

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&lt;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&lt;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&lt;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.

Is the source code in /home/Downloads/llvm-3-6 and build directory inside it? Build dir should be outside your source dir.

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) {}
                                                            ^
/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

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.

I had the same problem! :frowning:

Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

LLVM: 3.6 (Downloaded today)

g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Error:

Compile it outside the src folder as Chilledheart told me. It works :wink:

Sorry for double posting but if you wanna make a pass. You should build it
on top of src folder. I don't know why but that's how it worked for me in
the end. And use svn. Don't download from website. It doesn't work.

Hi Pedro. Thanks, i'm installed via apt-get ubuntu repo. I'll try to get from
svn like u.