rust-callgraph icon indicating copy to clipboard operation
rust-callgraph copied to clipboard

Build Error (rust 1.62)

Open fkarg opened this issue 2 years ago • 1 comments

$ 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

fkarg avatar Jul 14 '22 11:07 fkarg

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.

vikramnitin9 avatar Jul 18 '24 21:07 vikramnitin9

This project now supports Rust 1.82.0, so I'm closing this issue.

vikramnitin9 avatar Oct 07 '24 22:10 vikramnitin9