<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Looks like a <a href="http://en.wikipedia.org/wiki/Most_vexing_parse">vexing parse</a> problem. Try changing 'StringRef URL(SVN_REPOSITORY)' to 'StringRef URL = SVN_REPOSITORY'.</div><div><br></div><div>If that works, please let us know so we can fix it for 3.3!</div><div><br></div><div>Jordan</div><div><br></div><br><div><div>On May 6, 2013, at 18:48 , Graeme Russell <<a href="mailto:grussell86@gmail.com">grussell86@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi cfe-dev,<div><br></div><div>I'm currently trying to compile llvm, clang and compiler-rt from the official 3.2 tag with gcc4.7.0 but unfortunately I'm getting the compiler error detailed below. Is this something anyone has come across before?</div>
<div><br></div><div>Thanks,</div><div>Graeme</div><div><br></div><div><b><u>Compiler Errror</u></b></div><div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">make[4]: Entering directory `/home/grarus/build/tools/clang/lib/Basic'</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling Builtins.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)">
<font face="courier new, monospace">llvm[4]: Compiling ConvertUTF.c for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling ConvertUTFWrapper.cpp for Release+Asserts build</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling Diagnostic.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)">
<font face="courier new, monospace">llvm[4]: Compiling DiagnosticIDs.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling FileManager.cpp for Release+Asserts build</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling FileSystemStatCache.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)">
<font face="courier new, monospace">llvm[4]: Compiling IdentifierTable.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling LangOptions.cpp for Release+Asserts build</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling Module.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)">
<font face="courier new, monospace">llvm[4]: Compiling ObjCRuntime.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling SourceLocation.cpp for Release+Asserts build</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling SourceManager.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)">
<font face="courier new, monospace">llvm[4]: Compiling TargetInfo.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling Targets.cpp for Release+Asserts build</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">llvm[4]: Compiling TokenKinds.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)">
<font face="courier new, monospace">llvm[4]: Compiling Version.cpp for Release+Asserts build</font></div><div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function ‘std::string clang::getClangRepositoryPath()’:</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:36:11: error: request for member ‘empty’ in ‘clang::URL’, which is of non-class type ‘llvm::StringRef()’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:38:63: error: assignment of function ‘llvm::StringRef clang::URL()’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:38:63: error: cannot convert ‘llvm::StringRef’ to ‘llvm::StringRef()’ in assignment</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:42:13: error: request for member ‘slice’ in ‘clang::URL’, which is of non-class type ‘llvm::StringRef()’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:42:26: error: request for member ‘find’ in ‘clang::URL’, which is of non-class type ‘llvm::StringRef()’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:45:22: error: request for member ‘find’ in ‘clang::URL’, which is of non-class type ‘llvm::StringRef()’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:47:15: error: request for member ‘substr’ in ‘clang::URL’, which is of non-class type ‘llvm::StringRef()’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:49:10: error: could not convert ‘clang::URL’ from ‘llvm::StringRef (*)()’ to ‘std::string {aka std::basic_string<char>}’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function ‘std::string clang::getLLVMRepositoryPath()’:</font></div>
<div style="color: rgb(34, 34, 34); font-size: 13px; background-color: rgb(255, 255, 255); position: static; z-index: auto; "><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:63:22: error: request for member ‘find’ in ‘clang::URL’, which is of non-class type ‘llvm::StringRef()’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:65:15: error: request for member ‘substr’ in ‘clang::URL’, which is of non-class type ‘llvm::StringRef()’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:67:10: error: could not convert ‘clang::URL’ from ‘llvm::StringRef (*)()’ to ‘std::string {aka std::basic_string<char>}’</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function ‘std::string clang::getClangRevision()’:</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:72:3: error: return-statement with no value, in function returning ‘std::string {aka std::basic_string<char>}’ [-fpermissive]</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:76:1: warning: no return statement in function returning non-void [-Wreturn-type]</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function ‘std::string clang::getLLVMRevision()’:</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:80:3: error: return-statement with no value, in function returning ‘std::string {aka std::basic_string<char>}’ [-fpermissive]</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:84:1: warning: no return statement in function returning non-void [-Wreturn-type]</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function ‘std::string clang::getLLVMRepositoryPath()’:</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:68:1: warning: control reaches end of non-void function [-Wreturn-type]</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function ‘std::string clang::getClangRepositoryPath()’:</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:51:1: warning: control reaches end of non-void function [-Wreturn-type]</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">/bin/rm: cannot remove `/home/grarus/build/tools/clang/lib/Basic/Release+Asserts/Version.d.tmp': No such file or directory</font></div>
<div style="color:rgb(34,34,34);font-size:13px;background-color:rgb(255,255,255)"><font face="courier new, monospace">make[4]: *** [/home/grarus/build/tools/clang/lib/Basic/Release+Asserts/Version.o] Error 1</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<b><u>Code Snippet from Version.cpp</u></b></div><div style="color: rgb(34, 34, 34); font-size: 13px; background-color: rgb(255, 255, 255); position: static; z-index: auto; "><div><font face="courier new, monospace">#include "clang/Basic/Version.h"</font></div>
<div><font face="courier new, monospace">#include "clang/Basic/LLVM.h"</font></div><div><font face="courier new, monospace">#include "llvm/Support/raw_ostream.h"</font></div><div><font face="courier new, monospace">#include "llvm/Config/config.h"</font></div>
<div><font face="courier new, monospace">#include <cstring></font></div><div><font face="courier new, monospace">#include <cstdlib></font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">namespace clang {</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">std::string getClangRepositoryPath() {</font></div><div><font face="courier new, monospace">#if defined(CLANG_REPOSITORY_STRING)</font></div>
<div><font face="courier new, monospace">  return CLANG_REPOSITORY_STRING;</font></div><div><font face="courier new, monospace">#else</font></div><div><font face="courier new, monospace">#ifdef SVN_REPOSITORY</font></div>
<div><font face="courier new, monospace">  StringRef URL(SVN_REPOSITORY);</font></div><div><font face="courier new, monospace">#else</font></div><div><font face="courier new, monospace">  StringRef URL("");</font></div>
<div><font face="courier new, monospace">#endif</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">  // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us</font></div>
<div><font face="courier new, monospace">  // pick up a tag in an SVN export, for example.</font></div><div><font face="courier new, monospace">  static StringRef SVNRepository("$URL: <a href="http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final/lib/Basic/Version.cpp" target="_blank" style="color:rgb(17,85,204)">http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final/lib/Basic/Version.cpp</a> $");</font></div>
<div><font face="courier new, monospace">  if (URL.empty()) {</font></div><div><font face="courier new, monospace">    URL = SVNRepository.slice(SVNRepository.find(':'),</font></div><div><font face="courier new, monospace">                              SVNRepository.find("/lib/Basic"));</font></div>
<div><font face="courier new, monospace">  }</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">  // Strip off version from a build from an integration branch.</font></div>
<div><font face="courier new, monospace">  URL = URL.slice(0, URL.find("/src/tools/clang"));</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">  // Trim path prefix off, assuming path came from standard cfe path.</font></div>
<div><font face="courier new, monospace">  size_t Start = URL.find("cfe/");</font></div><div><font face="courier new, monospace">  if (Start != StringRef::npos)</font></div><div><font face="courier new, monospace">    URL = URL.substr(Start + 4);</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">  return URL;</font></div><div><font face="courier new, monospace">#endif</font></div><div><font face="courier new, monospace">}</font></div>
</div></div>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>