[LLVMdev] error with cmake build of llvm

erkan diken erkandiken at gmail.com
Tue Jul 3 05:25:08 PDT 2012


Dear all,

I am trying to build the llvm with cmake and using the following checkouts.

LLVM version 3.2svn
clang version 3.2 (trunk 158320) (llvm/trunk 158308)

cmake runs with default configuration without any problem.

cmake ../llvm
-- Target triple: i686-pc-linux-gnu
-- Native target architecture is X86
-- Threads enabled.
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Targeting ARM
-- Targeting CellSPU
-- Targeting CppBackend
-- Targeting Hexagon
-- Targeting Mips
-- Targeting MBlaze
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting Sparc
-- Targeting X86
-- Targeting XCore
-- Clang version: 3.2
-- Configuring done
-- Generating done

I hit the make command after cmake, the moment it starts to link clang
tools:

(add_subdirectory(libclang)
add_subdirectory(c-index-test)
add_subdirectory(arcmt-test)
add_subdirectory(c-arcmt-test)
add_subdirectory(diagtool)
add_subdirectory(driver)
add_subdirectory(clang-check))

Starting from c-index-test, it outputs undefined reference to all clang
functions.

make
...
[ 97%] Built target libclang
[ 97%] Built target libclang_static
Linking CXX executable ../../../../bin/c-index-test
../../../../lib/libclang.so.3.2: undefined reference to
`clang::ReturnStmt::getRetValue()'
../../../../lib/libclang.so.3.2: undefined reference to
`clang::NestedNameSpecifierLocBuilder::MakeGlobal(clang::ASTContext&,
clang::SourceLocation)'
../../../../lib/libclang.so.3.2: undefined reference to
`clang::NestedNameSpecifierLocBuilder::Extend(clang::ASTContext&,
clang::NamespaceDecl*, clang::SourceLocation, clang::SourceLocation)'
....

I could not figure out the reason, any idea is welcome ?

Thanks.
-- 
Best Regards,
Erkan
------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120703/69e6d247/attachment.html>


More information about the llvm-dev mailing list