Skip to contentSkip to conversation

sparse-llvm: link errors with LLVM 3.5.0

DISCUSSION Alain Kalker 1 participant 1 message Sep 21, 2014 Sparse checker

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm getting link errors building sparse on Arch Linux, which has LLVM version 3.5.0.

An example:
/usr/lib/libLLVMSupport.a(Mutex.o): In function `llvm::sys::MutexImpl::MutexImpl(bool)':
(.text._ZN4llvm3sys9MutexImplC2Eb+0x37): undefined reference to `pthread_mutexattr_init'

From some discussion in [1], we found that this is most likely due to a change in LLVM[2] which requires the new "--system-libs" option to llvm- config to get the list of link flags for correct linking of system libraries (including "-lpthread") needed by the LLVM libraries.

Kind regards,

Alain

[1]: https://bugs.archlinux.org/task/42053
[2]: http://reviews.llvm.org/rL197664