[cfe-dev] Compiling llvm/clang/compiler-rt 3.2

Graeme Russell grussell86 at gmail.com
Mon May 6 18:48:47 PDT 2013


Hi cfe-dev,

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?

Thanks,
Graeme

*Compiler Errror*
make[4]: Entering directory `/home/grarus/build/tools/clang/lib/Basic'
llvm[4]: Compiling Builtins.cpp for Release+Asserts build
llvm[4]: Compiling ConvertUTF.c for Release+Asserts build
llvm[4]: Compiling ConvertUTFWrapper.cpp for Release+Asserts build
llvm[4]: Compiling Diagnostic.cpp for Release+Asserts build
llvm[4]: Compiling DiagnosticIDs.cpp for Release+Asserts build
llvm[4]: Compiling FileManager.cpp for Release+Asserts build
llvm[4]: Compiling FileSystemStatCache.cpp for Release+Asserts build
llvm[4]: Compiling IdentifierTable.cpp for Release+Asserts build
llvm[4]: Compiling LangOptions.cpp for Release+Asserts build
llvm[4]: Compiling Module.cpp for Release+Asserts build
llvm[4]: Compiling ObjCRuntime.cpp for Release+Asserts build
llvm[4]: Compiling SourceLocation.cpp for Release+Asserts build
llvm[4]: Compiling SourceManager.cpp for Release+Asserts build
llvm[4]: Compiling TargetInfo.cpp for Release+Asserts build
llvm[4]: Compiling Targets.cpp for Release+Asserts build
llvm[4]: Compiling TokenKinds.cpp for Release+Asserts build
llvm[4]: Compiling Version.cpp for Release+Asserts build
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function
‘std::string clang::getClangRepositoryPath()’:
/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()’
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:38:63: error:
assignment of function ‘llvm::StringRef clang::URL()’
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:38:63: error: cannot
convert ‘llvm::StringRef’ to ‘llvm::StringRef()’ in assignment
/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()’
/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()’
/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()’
/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()’
/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>}’
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function
‘std::string clang::getLLVMRepositoryPath()’:
/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()’
/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()’
/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>}’
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function
‘std::string clang::getClangRevision()’:
/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]
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:76:1: warning: no
return statement in function returning non-void [-Wreturn-type]
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function
‘std::string clang::getLLVMRevision()’:
/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]
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:84:1: warning: no
return statement in function returning non-void [-Wreturn-type]
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function
‘std::string clang::getLLVMRepositoryPath()’:
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:68:1: warning: control
reaches end of non-void function [-Wreturn-type]
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp: In function
‘std::string clang::getClangRepositoryPath()’:
/home/grarus/llvm/tools/clang/lib/Basic/Version.cpp:51:1: warning: control
reaches end of non-void function [-Wreturn-type]
/bin/rm: cannot remove
`/home/grarus/build/tools/clang/lib/Basic/Release+Asserts/Version.d.tmp':
No such file or directory
make[4]: ***
[/home/grarus/build/tools/clang/lib/Basic/Release+Asserts/Version.o] Error 1


*Code Snippet from Version.cpp*
#include "clang/Basic/Version.h"
#include "clang/Basic/LLVM.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Config/config.h"
#include <cstring>
#include <cstdlib>

namespace clang {

std::string getClangRepositoryPath() {
#if defined(CLANG_REPOSITORY_STRING)
  return CLANG_REPOSITORY_STRING;
#else
#ifdef SVN_REPOSITORY
  StringRef URL(SVN_REPOSITORY);
#else
  StringRef URL("");
#endif

  // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps
us
  // pick up a tag in an SVN export, for example.
  static StringRef SVNRepository("$URL:
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final/lib/Basic/Version.cpp
 $");
  if (URL.empty()) {
    URL = SVNRepository.slice(SVNRepository.find(':'),
                              SVNRepository.find("/lib/Basic"));
  }

  // Strip off version from a build from an integration branch.
  URL = URL.slice(0, URL.find("/src/tools/clang"));

  // Trim path prefix off, assuming path came from standard cfe path.
  size_t Start = URL.find("cfe/");
  if (Start != StringRef::npos)
    URL = URL.substr(Start + 4);

  return URL;
#endif
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130507/3d8b1459/attachment.html>


More information about the cfe-dev mailing list