Can't run expansion phase.
Sean1708 opened this issue · 2 comments
I thought I'd post an issue here rather than on rust-lang/rust because there's a very good chance that I'm doing something horrendously stupid.
I updated the code to work on the latest nightly (in this gist) and everything was working absolutely fine. I then changed build_controller
to
fn build_controller(&mut self, _: &Session) -> driver::CompileController<'a> {
let mut control = driver::CompileController::basic();
control.after_parse.stop = Compilation::Stop;
control
}
and everything still compiled and it worked exactly how I expected it to. I then tried to run the expansion phase, like so
fn build_controller(&mut self, _: &Session) -> driver::CompileController<'a> {
let mut control = driver::CompileController::basic();
control.after_expansion.stop = Compilation::Stop;
control
}
and I get the error:
test.rs:1:1: 1:1 error: can't find crate for `std` [E0463]
test.rs:1 fn add(a: i32, b: i32) -> i32 {
^
error: aborting due to previous error
I've tried using several different scripts and all of them compile with rustc
absolutely fine but they all give the previous error when compiled with stupid
. I was running them with cargo run <filename>
, if that makes a difference. I've also tried this with:
multirust 0.7.0 (b222fcd27 2015-09-24 10:53:38 -0700)
cargo 0.6.0-nightly (1a6d6c4 2015-10-18)
rustc 1.5.0-nightly (d3f497861 2015-10-18)
and without:
cargo 0.6.0 (1206e5e 2015-10-19)
rustc 1.5.0-nightly (3e268f2fb 2015-10-19)
multirust
but neither works.
Am I doing something silly here or is this a bug?
It sounds like a path is not getting set somewhere. You might need to set an LD_LIBRARY_PATH
environment variable. Something like:
export LD_LIBRARY_PATH=/home/ncameron/rust/x86_64-unknown-linux-gnu/stage2/lib
You might also need to set the sysroot, so your command line will look something like:
stupid test..rs --sysroot /home/ncameron/rust/x86_64-unknown-linux-gnu/stage2
That did work, thanks, but I had to build the whole thing from source.