Problems building on Ubuntu 13.10 with LLVM 3.3

David Nadlinger code at klickverbot.at
Mon Aug 19 15:13:01 PDT 2013


Hi Joseph,

On 20 Aug 2013, at 0:04, Joseph Rushton Wakeling wrote:
> […]
> /usr/lib/llvm-3.3/lib/libLLVMSupport.a(Mutex.o): In function 
> `llvm::sys::MutexImpl::tryacquire()':
> (.text+0xf8): undefined reference to `pthread_mutex_trylock'
> collect2: error: ld returned 1 exit status
> make[2]: *** [bin/gen_gccbuiltins] Error 1
> make[1]: *** [CMakeFiles/gen_gccbuiltins.dir/all] Error 2
> ---------------------------------------------
>
> Is this a known bug/issue when building against LLVM 3.3 or is 
> something else the problem?

LLVM depends on pthreads, but it should be pulled in automatically as 
part of the linker flags specified by llvm-config.

To find out what is going on here, could you please post:
  1) the output of "llvm-config --ldflags", and
  2) the command line used for linking (make VERBOSE=1)?

David


More information about the digitalmars-d-ldc mailing list