title: correct usage of rpath (relative vs absolute)
body: <p>When building a binary or library, specifying the <code>rpath</code>, i.e.</p>
  
  <pre><code>-Wl,rpath,&lt;path/to/lib&gt;
  </code></pre>
  
  <p>tells the linker where to find the required library at runtime of the binary.</p>
  
  <p>What is the UNIX philosphy regarding absolute and relative paths here? Is it better to use an absolute path so the lib can be found from everywhere? Or is it better to make it relative so copying an entire directory or renaming a higher level path won't render the binary unusable?</p>
  
  <h3>Update</h3>
  
  <p>Using <code>$ORIGIN</code> is usually the preferred way of building binaries. For libraries I like to put in the absolute path, because otherwise you won't be able to link to the library. A symbolic link will change the <code>$ORIGIN</code> to point to the path of the <em>link</em> and not of the link <em>target</em>.</p>