<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 21, 2014 at 12:01 AM, Arash Partow <span dir="ltr"><<a href="mailto:arash@partow.net" target="_blank">arash@partow.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br>
<br>
I'm trying to build clang from the tip of the repo, and am getting the compilation failures denoted below.<br></blockquote><div><br></div><div>Just in case you've not figured out the problem by now...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
LLVM/Clang is at r224688<br>
<br>
<br>
--- snip ---<br>
/home/zanboor/workspace/llvm/<u></u>llvm/tools/clang/tools/extra/<u></u>clang-apply-replacements/lib/<u></u>Tooling/ApplyReplacements.cpp:<u></u>49:37: error: no matching constructor for initialization of 'llvm::sys::fs::recursive_<u></u>directory_iterator'<br>
  for (recursive_directory_iterator I(Directory, ErrorCode), E;<br>
                                    ^ ~~~~~~~~~~~~~~~~~~~~<br>
/home/zanboor/workspace/llvm/<u></u>llvm/include/llvm/Support/<u></u>FileSystem.h:797:12: note: candidate constructor not viable: no known conversion from 'llvm::error_code' to 'std::error_code &' for 2nd argument<br>
  explicit recursive_directory_iterator(<u></u>const Twine &path, std::error_code &ec)<br>
           ^<br>
/home/zanboor/workspace/llvm/<u></u>llvm/include/llvm/Support/<u></u>FileSystem.h:796:3: note: candidate constructor not viable: requires 0 arguments, but 2 were provided<br>
  recursive_directory_iterator() {}<br>
  ^<br>
/home/zanboor/workspace/llvm/<u></u>llvm/include/llvm/Support/<u></u>FileSystem.h:792:7: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided<br>
class recursive_directory_iterator {<br>
      ^<br>
/home/zanboor/workspace/llvm/<u></u>llvm/include/llvm/Support/<u></u>FileSystem.h:792:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided<br>
/home/zanboor/workspace/llvm/<u></u>llvm/tools/clang/tools/extra/<u></u>clang-apply-replacements/lib/<u></u>Tooling/ApplyReplacements.cpp:<u></u>250:26: error: no matching constructor for initialization of 'llvm::raw_fd_ostream'<br>
    llvm::raw_fd_ostream FileStream(FileName, ErrorInfo, llvm::sys::fs::F_Text);<br>
                         ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<u></u>~~~~~~~~~~~~<br>
/home/zanboor/workspace/llvm/<u></u>llvm/include/llvm/Support/raw_<u></u>ostream.h:363:3: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char>') to 'std::error_code &' for 2nd argument<br>
  raw_fd_ostream(StringRef Filename, std::error_code &EC,<br>
  ^<br>
/home/zanboor/workspace/llvm/<u></u>llvm/include/llvm/Support/raw_<u></u>ostream.h:368:3: note: candidate constructor not viable: no known conversion from 'const char *' to 'int' for 1st argument; dereference the argument with *<br>
  raw_fd_ostream(int fd, bool shouldClose, bool unbuffered=false);<br>
  ^<br>
/home/zanboor/workspace/llvm/<u></u>llvm/include/llvm/Support/raw_<u></u>ostream.h:324:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided<br>
class raw_fd_ostream : public raw_ostream {<br>
      ^<br></blockquote><div><br></div><div>Your build setup is finding one copy of the LLVM headers in /home/zanboor/workspace/llvm/llvm/include/llvm ...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
/home/zanboor/workspace/llvm/<u></u>llvm/tools/clang/tools/extra/<u></u>clang-apply-replacements/lib/<u></u>Tooling/ApplyReplacements.cpp:<u></u>266:16: error: no viable conversion from 'std::error_code' to 'llvm::error_code'<br>
    error_code Error = llvm::sys::fs::remove(*I);<br>
               ^       ~~~~~~~~~~~~~~~~~~~~~~~~~<br>
/usr/local/include/llvm/<u></u>Support/system_error.h:724:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::error_code' to 'const llvm::error_code &' for 1st argument<br>
class error_code {<br>
      ^<br></blockquote><div><br></div><div>... and another copy in /usr/local/include/llvm.</div><div><br></div><div>This is resulting in mismatched versions of LLVM headers being used in the same compile, which is almost certainly why your build is failing.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
/usr/local/include/llvm/<u></u>Support/system_error.h:724:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::error_code' to 'llvm::error_code &&' for 1st argument<br>
class error_code {<br>
      ^<br>
/usr/local/include/llvm/<u></u>Support/system_error.h:739:22: note: candidate template ignored: disabled by 'enable_if' [with E = std::error_code]<br>
                     is_error_code_enum<E>::value<br>
                     ^<br>
--- snip ---<br>
<br>
<br>
<br>
Note: was able to build tip circa last Wednesday.<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div></div>