LLVM 2.9 does not and is not expected to work with top-of-trunk clang. There
are dependencies between the two repositories. Thus, you must checkout the two
at roughly the same revision number.
See: http://llvm.org/docs/GettingStarted.html
Chad
On Nov 5, 2011, at 9:56 AM, janarbek wrote:
> I had llvm 2.9 installed on ununtu. I tried to build clang but got
following error. I have llvm 2.9 and clang is latest version ( I don't know,
I got from svn). I am wondering is it because of version problem ?
>
> Does clang work with 2.9 llvm ?
>
> llvm[3]: Compiling ClangASTNodesEmitter.cpp for Debug build
> In file included from
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:14:
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:17:43:
error: llvm/TableGen/TableGenBackend.h: No such file or directory
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:18:34:
error: llvm/TableGen/Record.h: No such file or directory
> In file included from
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:14:
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:28:
error: expected class-name before ‘{’ token
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:30:
error: ‘Record’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:30:
error: ‘Record’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:30:
error: template argument 1 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:30:
error: template argument 2 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:30:
error: template argument 3 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:30:
error: template argument 4 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:31:
error: typedef name may not be a nested-name-specifier
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:31:
error: expected ‘;’ before ‘ChildIterator’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:33:
error: ISO C++ forbids declaration of ‘RecordKeeper’ with no type
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:33:
error: expected ‘;’ before ‘&’ token
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:34:
error: ‘Record’ does not name a type
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:48:
error: ‘Record’ has not been declared
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:55:
error: ‘Record’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:55:
error: ‘Record’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:55:
error: template argument 1 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:55:
error: template argument 2 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:55:
error: ‘raw_ostream’ has not been declared
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:56:
error: ‘Record’ has not been declared
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:58:
error: expected ‘)’ before ‘&’ token
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:64:
error: ‘raw_ostream’ has not been declared
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:35:
warning: non-static reference ‘const std::string&
llvm::ClangASTNodesEmitter::BaseSuffix’ in class without a constructor
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:
In member function ‘std::string llvm::ClangASTNodesEmitter::baseName(int&)’:
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:49:
error: ‘Root’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:52:
error: request for member ‘getName’ in ‘R’, which is of non-class type ‘int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:
At global scope:
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:70:
error: expected class-name before ‘{’ token
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:71:
error: ISO C++ forbids declaration of ‘RecordKeeper’ with no type
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:71:
error: expected ‘;’ before ‘&’ token
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:74:
error: expected ‘)’ before ‘&’ token
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.h:79:
error: ‘raw_ostream’ has not been declared
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:24:
error: ‘Record’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:24:
error: ‘Record’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:24:
error: template argument 1 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:24:
error: template argument 2 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:26:
error: ‘raw_ostream’ has not been declared
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:27:
error: ‘Record’ has not been declared
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:
In member function ‘int llvm::ClangASTNodesEmitter::EmitNode(const int&,
int&, int*)’:
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:28:
error: request for member ‘getName’ in ‘* Base’, which is of non-class type
‘int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:30:
error: ‘ChildIterator’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:30:
error: expected ‘;’ before ‘i’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:32:
error: ‘Record’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:32:
error: ‘First’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:32:
error: ‘Last’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:35:
error: request for member ‘getValue’ in ‘* Base’, which is of non-class type
‘int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:35:
error: request for member ‘getValueAsBit’ in ‘* Base’, which is of non-class
type ‘int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:38:
error: ‘i’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:38:
error: ‘e’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:39:
error: ‘R’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:43:
error: invalid operands of types ‘int’ and ‘const char [9]’ to binary
‘operator<<’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:44:
error: invalid operands of types ‘int’ and ‘const char [11]’ to binary
‘operator<<’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:46:
error: invalid operands of types ‘int’ and ‘const char [8]’ to binary
‘operator<<’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:49:
error: invalid operands of types ‘int’ and ‘const char [10]’ to binary
‘operator<<’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:49:
error: ‘Root’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:52:
error: no match for ‘operator<<’ in ‘OS << NodeName’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:55:
error: request for member ‘find’ in ‘Tree’, which is of non-class type ‘const
int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:55:
error: request for member ‘end’ in ‘Tree’, which is of non-class type ‘const
int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:56:
error: ‘Record’ cannot appear in a constant-expression
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:56:
error: ‘Record’ cannot appear in a constant-expression
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:56:
error: template argument 1 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:56:
error: template argument 2 is invalid
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:57:
error: invalid type in declaration before ‘=’ token
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:58:
error: request for member ‘first’ in ‘Result’, which is of non-class type ‘const
int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:59:
error: request for member ‘first’ in ‘Result’, which is of non-class type ‘const
int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:60:
error: request for member ‘second’ in ‘Result’, which is of non-class type
‘const int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:61:
error: request for member ‘second’ in ‘Result’, which is of non-class type
‘const int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:71:
error: invalid operands of types ‘int’ and ‘const char [8]’ to binary
‘operator<<’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:75:
error: ‘assert’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:76:
error: ‘Root’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:77:
error: invalid operands of types ‘int’ and ‘const char [6]’ to binary
‘operator<<’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:80:
error: request for member ‘getName’ in ‘* Base’, which is of non-class type
‘int’
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:
At global scope:
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:87:
error: variable or field ‘run’ declared void
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:87:
error: ‘raw_ostream’ was not declared in this scope
>
/home/jmatai/Work/llvm2.9/llvm/final/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp:87:
error: ‘OS’ was not declared in this scope
> make[3]: ***
[/home/jmatai/Work/llvm2.9/llvm-obj/tools/clang/utils/TableGen/Debug/ClangASTNodesEmitter.o]
Error 1
> make[3]: Leaving directory
`/home/jmatai/Work/llvm2.9/llvm-obj/tools/clang/utils/TableGen'
> make[2]: *** [all] Error 1
> make[2]: Leaving directory
`/home/jmatai/Work/llvm2.9/llvm-obj/tools/clang'
> make[1]: *** [clang/.makeall] Error 2
> make[1]: Leaving directory `/home/jmatai/Work/llvm2.9/llvm-obj/tools'
> make: *** [all] Error 1
> jmatai at ubuntu:~/Work/llvm2.9/llvm-obj$
>
>
>
>
> ==========================================>
> Phone : 82-42-860-1838
> Fax : 82-42-860-6790
> Cell Phone: 82-10-7599-1981
> ==========================================>
_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20111105/56597058/attachment.html>