I fix it by this patch:<div><br></div><div><div>Index: lib/AST/CMakeLists.txt</div><div>===================================================================</div><div>--- lib/AST/CMakeLists.txt<span class="Apple-tab-span" style="white-space:pre"> </span>(revision 135826)</div>
<div>+++ lib/AST/CMakeLists.txt<span class="Apple-tab-span" style="white-space:pre"> </span>(working copy)</div><div>@@ -1,6 +1,6 @@</div><div> set(LLVM_LINK_COMPONENTS support)</div><div> </div><div>-set(LLVM_USED_LIBS clangBasic)</div>
<div>+set(LLVM_USED_LIBS clangBasic clangLex)</div><div> </div><div> add_clang_library(clangAST</div><div> APValue.cpp</div><div><br></div><br><div class="gmail_quote">On Fri, Jul 22, 2011 at 7:13 AM, Ryuta Suzuki <span dir="ltr"><<a href="mailto:ryuuta@gmail.com">ryuuta@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>Hi,</div><div><br></div><div>I've seen the the following undefined reference error for a while:</div><div><br>
</div><div>[ 94%] Built target gtest_main</div><div>Linking CXX executable AST/ASTTests</div><div>../../../lib/libclangAST.so: undefined reference to `clang::Lexer::AdvanceToTokenCharacter(clang::SourceLocation, unsigned int, clang::SourceManager const&, clang::LangOptions const&)'</div>
<div>../../../lib/libclangAST.so: undefined reference to `clang::Lexer::LexTokenInternal(clang::Token&)'</div><div>../../../lib/libclangAST.so: undefined reference to `clang::StringLiteralParser::init(clang::Token const*, unsigned int)'</div>
<div>../../../lib/libclangAST.so: undefined reference to `clang::Lexer::getSourceLocation(char const*, unsigned int) const'</div><div>../../../lib/libclangAST.so: undefined reference to `clang::Lexer::Lexer(clang::SourceLocation, clang::LangOptions const&, char const*, char const*, char const*)'</div>
<div>../../../lib/libclangAST.so: undefined reference to `clang::StringLiteralParser::getOffsetOfStringByte(clang::Token const&, unsigned int) const'</div><div>collect2: ld returned 1 exit status</div><div>make[2]: *** [tools/clang/unittests/AST/ASTTests] Error 1</div>
<div>make[1]: *** [tools/clang/unittests/CMakeFiles/ASTTests.dir/all] Error 2</div><div><br></div><div>LLVM_USED_LIBS in clang/lib/AST/CMakeLists.txt may need to be updated?</div><div><br></div><div>Thanks,</div><div><br>
</div><div>Ryuta</div>
</blockquote></div><br></div>