title: Statically linking system libraries, libc, pthreads, to aid in debugging
body: <p>I am trying to avoid the situation described in this Stackoverflow entry:  <a href="https://stackoverflow.com/questions/10616417/debugging-core-files-generated-on-a-customers-box">Debugging core files generated on a Customer&#39;s box</a>.  If I compile all the libraries statically will I avoid having to always gather the shared libraries when it core dumps?  I essentially want to be in a situation where I can just load up the core file with gdb and examine the crashed application.</p>
  
  <p>What should I watch out for if I go down the route of statically linking all the libraries we need.  I figure glib and pthreads might cause the biggest problems.</p>
  
  <p>Will Valgrind cease to be useful?  If I load up Valgrind against the binary which has everything statically compiled will it find errors?  Or shall we maintain a binary that isn't statically compiled so Valgrind continues to work.
  How about strace?</p>
  
  <p>We crashes quite often as we have a large install base and it is also a legacy application.  Gathering up all the shared libraries is becoming intractable - I need another solution.</p>
  
  <p>Edit: fixed typo.</p>