title: Preventing shared library version incompatibilities on GNU/Linux
body: <p>I've been tracking a bug triggered at the launch of my program. Here is the backtrace provided by gdb:</p>
  
  <pre><code>(gdb) bt
  #0  0xb753f571 in llvm::cl::parser&lt;llvm::FunctionPass* (*)()&gt;::getOption(unsigned int) const () 
  from ./libgdl.so
  #1  0xb79aeab4 in llvm::cl::generic_parser_base::findOption(char const*) ()   
  from ./libgdl.so
  #2  0xb753f679 in llvm::RegisterPassParser&lt;llvm::RegisterRegAlloc&gt;::NotifyRemove(char const*) () 
  from ./libgdl.so
  #3  0xaf35f0b6 in llvm::MachinePassRegistry::Add(llvm::MachinePassRegistryNode*) () from /usr/lib
  /i386-linux-gnu/libLLVM-3.1.so.1
  #4  0xaef42b16 in ?? () from /usr/lib/i386-linux-gnu/libLLVM-3.1.so.1
  #5  0xb7fece9b in ?? () from /lib/ld-linux.so.2
  </code></pre>
  
  <p>In fact, the crash is due to the system using LLVM 3.1 ( for graphics related task ) while I'm using LLVM 3.0, which is embedded in my program ( libgdl.so ): <br>
  When libLLVM-3.1.so.1 wants to call the NotifyRemove function, the call is forwarded to my version of LLVM in libgdl.so and it lead to the crash as the version are incompatible.</p>
  
  <p>Is there any way to prevent such a mess?</p>