heinzelotto / rust-callgraph

Which functions call each other in your rust crate? Static call graph analysis.
Other
28 stars 4 forks source link

Build Error (rust 1.62) #2

Open fkarg opened 2 years ago

fkarg commented 2 years ago
$ cargo +nightly build
   Compiling rust-callgraph v0.1.0 (/home/fkarg/Coding/rust-callgraph)
error[E0462]: found staticlib `rustc` instead of rlib or dylib
 --> src/main.rs:3:1
  |
3 | extern crate rustc;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using --crate-type lib
  = note: the following crate versions were found:
          crate `rustc`: /home/fkarg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-nightly_rt.lsan.a
          crate `rustc`: /home/fkarg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-nightly_rt.asan.a
          crate `rustc`: /home/fkarg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-nightly_rt.msan.a
          crate `rustc`: /home/fkarg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-nightly_rt.tsan.a

error[E0463]: can't find crate for `rustc_driver`
 --> src/main.rs:4:1
  |
4 | extern crate rustc_driver;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
  |
  = help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview`

error[E0463]: can't find crate for `rustc_interface`
 --> src/main.rs:5:1
  |
5 | extern crate rustc_interface;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
  |
  = help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview`

error[E0463]: can't find crate for `syntax`
 --> src/main.rs:6:1
  |
6 | extern crate syntax;
  | ^^^^^^^^^^^^^^^^^^^^ can't find crate

For more information about this error, try `rustc --explain E0463`.
error: could not compile `rust-callgraph` due to 4 previous errors
vikramnitin9 commented 1 month ago

I have a fork that is updated to Rust 1.78.0, here. But to fully resolve your issue, you do need to run rustup component add rust-src rustc-dev llvm-tools-preview as suggested in the error message.