[LLVMdev] CMake build maturity [was: Re: Arm port]

Paul Melis llvm at assumetheposition.nl
Fri May 22 13:01:48 PDT 2009

Hi, just chiming in here...

Óscar Fuentes wrote:
> [...]
> This is a simple guide for using cmake with LLVM:
> http://www.llvm.org/docs/CMake.html
> The makefiles distributed with LLVM have nothing to do with cmake.
>From the few times I tried building LLVM with CMake I got the impression
that it wasn't completely mature yet (the "TODO" sections in the page
you mention above reinforce that impression). I remember at least one
other build error in the past, related to building a non-X86 backend.

With current svn I get:

%> mkdir llvm-svn-build
%>  cd llvm-svn-build/
%>  ccmake ../llvm-svn
# Basically only tweak the install prefix in ccmake, configure, generate
%> make
[  2%] Built target LLVMSupport
[  3%] Built target LLVMSystem
Linking CXX executable ../../bin/tblgen
../../lib/libLLVMSystem.a(Mutex.cpp.o): In function
Mutex.cpp:(.text+0x3f): undefined reference to `pthread_mutex_trylock'
../../lib/libLLVMSystem.a(Mutex.cpp.o): In function
Mutex.cpp:(.text+0x1bb): undefined reference to `pthread_mutexattr_init'
Mutex.cpp:(.text+0x216): undefined reference to `pthread_mutexattr_settype'
Mutex.cpp:(.text+0x256): undefined reference to
Mutex.cpp:(.text+0x2a3): undefined reference to `pthread_mutexattr_destroy'
../../lib/libLLVMSystem.a(Mutex.cpp.o): In function
Mutex.cpp:(.text+0x309): undefined reference to `pthread_mutexattr_init'
Mutex.cpp:(.text+0x364): undefined reference to `pthread_mutexattr_settype'
Mutex.cpp:(.text+0x3a4): undefined reference to
Mutex.cpp:(.text+0x3f1): undefined reference to `pthread_mutexattr_destroy'
collect2: ld returned 1 exit status
make[2]: *** [bin/tblgen] Error 1
make[1]: *** [utils/TableGen/CMakeFiles/tblgen.dir/all] Error 2
make: *** [all] Error 2

This is on a Core2Duo 32-bit Gentoo Linux system, where building with
./configure; make succeeds without problems.

Best regards,

More information about the llvm-dev mailing list