error with cmake build of llvm

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

error with cmake build of llvm

erkan diken
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
------------------


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: error with cmake build of llvm

Duncan Sands
Hi Erkan,

> clang version 3.2 (trunk 158320) (llvm/trunk 158308)

maybe try using exactly the same LLVM and clang revisions.

Ciao, Duncan.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: error with cmake build of llvm

Arnaud A. de Grandmaison
You may also want to update your checkout to head.

Cheers,

--
Arnaud de Grandmaison


On 07/03/2012 02:46 PM, Duncan Sands wrote:

> Hi Erkan,
>
>> clang version 3.2 (trunk 158320) (llvm/trunk 158308)
> maybe try using exactly the same LLVM and clang revisions.
>
> Ciao, Duncan.
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev