Closed
Description
With the current HEAD of master (commit 505572b), when I install rust to my home directory and symlink rustc in $HOME/bin (which is on my $PATH), I get the following error:
$ ./configure --prefix=$HOME/opt/rust && make install
# elided
$ echo 'fn main() {}' > t.rs
$ RUST_LOG=rustc::metadata rustc t.rs
using sysroot = /Users/bnoordhuis
resolving extern mod stmt. ident: @"std" path_opt: Some((@"std#0.10-pre", CookedStr))
filesearch: searching additional lib search paths [0u]
filesearch: searching target lib path
searching /Users/bnoordhuis/lib/rustlib/x86_64-apple-darwin/lib
is /Users/bnoordhuis/src/rust/.rust/lib/x86_64-apple-darwin in visited_dirs? false
searching /Users/bnoordhuis/src/rust/.rust/lib/x86_64-apple-darwin
is /Users/bnoordhuis/src/rust/lib/x86_64-apple-darwin in visited_dirs? false
searching /Users/bnoordhuis/src/rust/lib/x86_64-apple-darwin
t.rs:1:1: 1:1 error: can't find crate for `std`
t.rs:1 fn main() {}
^
Invoking rustc as $HOME/opt/rust/bin/rustc fixes it as does linking with -L$HOME/opt/rust/lib/rustlib/x86_64-apple-darwin/lib.
I suspect that rustc is looking for the libraries relative to dirname(argv[0]). That should probably be dirname(realpath(argv[0])).
Metadata
Metadata
Assignees
Labels
No labels