title: Unable to execute a hello world project when using prefer-dynamic
body: <p>I'm playing with Rust's compilation options on an extremely simple project, hello world:</p>
  
  <pre><code>fn main() {
      println!("Hello, world!");
  }
  </code></pre>
  
  <p>I'm compiling with this line, prefer-dynamic is the only notable option:</p>
  
  <pre class="lang-none prettyprint-override"><code>rustc main.rs -o ./build/rci -C prefer-dynamic
  </code></pre>
  
  <p>It was working fine until I made some changes and then it didn't. Now if I try to compile the code exactly as above I get this output:</p>
  
  <pre class="lang-none prettyprint-override"><code>./build/rci: error while loading shared libraries: libstd-2ddb28df747fcb8c.so: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>The output of ldd is:</p>
  
  <pre class="lang-none prettyprint-override"><code>linux-vdso.so.1 =&gt;  (0x00007ffd321a4000)
  libstd-2ddb28df747fcb8c.so =&gt; not found
  libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f52eaef3000)
  /lib64/ld-linux-x86-64.so.2 (0x000055f0f6251000)
  </code></pre>
  
  <p>This is on Ubuntu 17.04 with Rust 1.15.1.</p>