title: KLEE for C++ code that uses pthreads
body: <p>I am a beginner trying to use KLEE.
  I am using the KLEE self contained package to on a C++ program that
  uses pthreads.
  I have generated a .o file and used KLEE with the following option</p>
  
  <pre><code>klee --libc=uclibc --posix-runtime test.o
  </code></pre>
  
  <p>But i see i get warning</p>
  
  <pre><code>KLEE: NOTE: Using model:
  /home/pgbovine/klee/Release+Asserts/lib/libkleeRuntimePOSIX.bca
  
  KLEE: output directory = "klee-out-4"
  KLEE: WARNING: undefined reference to function: klee_get_valuel
  KLEE: WARNING: undefined reference to function: pthread_create
  KLEE: WARNING: undefined reference to function: pthread_exit
  KLEE: WARNING: undefined reference to function: pthread_join
  KLEE: WARNING: executable has module level assembly (ignoring)
  KLEE: WARNING: calling external: syscall(54, 0, 21505, 571522624)
  KLEE: WARNING: calling __user_main with extra arguments.
  KLEE: WARNING: calling external: pthread_create(571589384, 0, 563903904, 571574176)
  0  klee 0x08965ab8
  [pid  1846] +++ killed by SIGSEGV +++
  
  +++ killed by SIGSEGV +++
  Segmentation fault
  </code></pre>
  
  <p>Using klee on a .bc file also gives me the same result.</p>
  
  <p>I am not sure why i get undefined reference to pthread functions. I am
  not sure if the libraries for pthreads are being used properly. Is
  there a way to ensure this? Using the llvm-ld also does not help.</p>
  
  <p>Below is the llvm-ld command that i used</p>
  
  <pre><code> llvm-ld tests.bc -l=/usr/lib/libpthread.a
  </code></pre>
  
  <p>I am not sure why there Segmentation fault occurs. The program works
  fine when i normally compile the programs with <code>g++</code> and run  the
  executable file.</p>
  
  <p>Could someone tell me where i am going wrong?</p>