Can't find create for std

I am hoping this is just dumb user error, but I'm not sure how to start debugging this

I downloaded the latest rust nightly snapshot from https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz

I then unpacked it and then tried to compile something with the just unpacked rustc:

achin@bigbox ~/tmp/16 $ curl 'https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz' > nightly.tar.gz

achin@bigbox ~/tmp/16 $ tar -zxf nightly.tar.gz

achin@bigbox ~/tmp/16/rust-nightly-x86_64-unknown-linux-gnu/rustc $ export LD_LIBRARY_PATH=${PWD}/lib

achin@bigbox ~/tmp/16/rust-nightly-x86_64-unknown-linux-gnu/rustc $ bin/rustc a.rs
a.rs:1:1: 1:1 error: can't find crate for `std` [E0463]
a.rs:1 fn main() {}
       ^
error: aborting due to previous error


In this past (with the 1.4 nightly) setting LD_LIBRARY_PATH to the lib dir was sufficient. But apparently not any more? I'm not sure how to debug this problem, I would be grateful for any hints!

Thanks

Looks like libstd on the nightly channel is distributed separately now to make cross-building easier. I'd guess you need to fetch https://static.rust-lang.org/dist/rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz

It seems that the rust-std-nightly tarball contains an identical copy of libstd-8cf6ce90.so and libstd-8cf6ce90.rlib compared to the rust-nightly tarball

Oops. Sorry for misinformation then.

Ah ha! But you got me on the right track!

Here's how I got rust installed from these tarballs:

$ tar -zxf rust-nightly-x86_64-unknown-linux-gnu.tar.gz
$ tar -zxf rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz 
$ mv rust-std-nightly-x86_64-unknown-linux-gnu/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/ rust-nightly-x86_64-unknown-linux-gnu/rustc/lib/rustlib/
$ cd rust-nightly-x86_64-unknown-linux-gnu/rustc/
$ env LD_LIBRARY_PATH=lib bin/rustc

So thank you! Your information was very useful!

If you find yourself installing nightlies from tarballs on a regular basis, you should look into multirust (if you already have, I'm curious how it does or doesn't fit your use case).

Actually, multirust is just what I need! My blocking issue was that both multirust and rust install into $HOME, blowing out my home directory quota. So instead of solving that, I tried to bypass this by just installing rust from tarballs (into a network fileshare)

If I'm reading the source correctly, you can export a MULTIRUST_HOME environment variable to override multirust's default usage of ~/.multirust. Alternatively you could probably replace .multirust with a symlink.