I'm playing with Rust's compilation options on an extremely simple project, hello world:
fn main() {
println!("Hello, world!");
}
I'm compiling with this line, prefer-dynamic is the only notable option:
rustc main.rs -o ./build/rci -C prefer-dynamic
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:
./build/rci: error while loading shared libraries: libstd-2ddb28df747fcb8c.so: cannot open shared object file: No such file or directory
The output of ldd is:
linux-vdso.so.1 => (0x00007ffd321a4000)
libstd-2ddb28df747fcb8c.so => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f52eaef3000)
/lib64/ld-linux-x86-64.so.2 (0x000055f0f6251000)
This is on Ubuntu 17.04 with Rust 1.15.1.