GaloisInc / mir-json

Plugin for rustc to dump MIR in JSON format
Apache License 2.0
8 stars 2 forks source link

Build fails #17

Closed fshaked closed 4 years ago

fshaked commented 4 years ago

When executing step 3 I get this:

$ RUSTC_WRAPPER=./rustc-rpath.sh cargo install --locked
[...]
   Compiling mir-json v0.1.0 (/home/sflur/workspace/mir-json)
error[E0462]: found staticlib `rustc` instead of rlib or dylib
  --> src/lib.rs:10:1
   |
10 | extern crate rustc;
   | ^^^^^^^^^^^^^^^^^^^
   |
   = help: please recompile that crate using --crate-type lib
   = note: the following crate versions were found:
           crate `rustc`: /home/sflur/.rustup/toolchains/nightly-2020-03-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-nightly_rt.lsan.a
           crate `rustc`: /home/sflur/.rustup/toolchains/nightly-2020-03-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-nightly_rt.asan.a
           crate `rustc`: /home/sflur/.rustup/toolchains/nightly-2020-03-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-nightly_rt.msan.a
           crate `rustc`: /home/sflur/.rustup/toolchains/nightly-2020-03-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-nightly_rt.tsan.a
spernsteiner commented 4 years ago

rustc should be finding librustc.rlib at the path ~/.rustup/toolchains/nightly-2020-03-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-f2346a014cb63e11.rlib. If that file is missing on your system, you may need to add the rustc-dev component to the toolchain. Please run rustup component add --toolchain nightly-2020-03-22 rustc-dev and then try the build again.

If adding the rustc-dev component doesn't help, please run cargo build --locked --verbose (without setting RUSTC_WRAPPER) and post the results.

fshaked commented 4 years ago

Adding rustc-dev works. Thanks.

spernsteiner commented 4 years ago

Thanks, I've updated the README