I just built the latest llvm3.4 branch, and when I tried to compile my program with ghc --make MyLibClangApp.hs I got this error:
Linking MyLibClangApp ...
/usr/bin/ld: /home/ghorn/hslibs/LibClang/build/out/lib/libLLVMSupport.a(Mutex.o): undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
I do have the pthread_mutexattr_settype symbol:
$ nm /lib/x86_64-linux-gnu/libpthread.so.0 | grep -i pthread_mutexattr_settype
000000000000af40 T __pthread_mutexattr_settype
000000000000af40 T pthread_mutexattr_settype
but it doesn't have @@GLIBC_2.2.5 appended to it.
Do you have any idea what this might be about? I'm on Debian Sid, 64 bit btw
Sounds like you're not getting libpthread linked in. This is probably working for me since my main application is multithreaded. Does the referenced commit fix this for you?
I just built the latest llvm3.4 branch, and when I tried to compile my program with
ghc --make MyLibClangApp.hs
I got this error:I do have the
pthread_mutexattr_settype
symbol:but it doesn't have
@@GLIBC_2.2.5
appended to it.Do you have any idea what this might be about? I'm on Debian Sid, 64 bit btw