Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Compilation issues on older versions of crates #1257

Open
muhammad-hassnain opened this issue Jan 10, 2024 · 0 comments
Open

Compilation issues on older versions of crates #1257

muhammad-hassnain opened this issue Jan 10, 2024 · 0 comments

Comments

@muhammad-hassnain
Copy link

Issue

I am trying to set this tool and use this to generate call graph. But, when I try running the flags it does not recognize them and when I try to run cargo mirai on a package as well, it fails.
I am also trying to run it with flags, but none of the flags are working. The command I am running is :
cargo mirai -- --print_function_names (it does not give any error message or function names)

Steps to Reproduce

git clone https://github.com/facebookexperimental/MIRAI.git
cd MIRAI
cargo install --locked --path ./checker

cargo download -x bat (this downloads the latest version)
cargo mirai - this works fine
but if we try older versions like 0.18.1, it gives some errors. (this is not the case for just this crate and version - can be replicated on other as well)

Expected Behavior

I expected it to compile without errors.

Actual Results

I get this error message

"error: could not compile `bat` (bin "bat")

Caused by:
  process didn't exit successfully: `/Users/hassnain/.cargo/bin/cargo-mirai /Users/hassnain/.rustup/toolchains/nightly-2023-09-10-aarch64-apple-darwin/bin/rustc --crate-name bat --edition=2018 src/bin/bat/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=158 --crate-type bin --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --cfg 'feature="application"' --cfg 'feature="atty"' --cfg 'feature="clap"' --cfg 'feature="default"' --cfg 'feature="dirs-next"' --cfg 'feature="git"' --cfg 'feature="git2"' --cfg 'feature="lazy_static"' --cfg 'feature="paging"' --cfg 'feature="regex-onig"' --cfg 'feature="shell-words"' --cfg 'feature="wild"' -C metadata=e473c20d9816187a -C extra-filename=-e473c20d9816187a --out-dir '/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps' -C 'incremental=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/incremental' -L 'dependency=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps' --extern 'ansi_colours=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libansi_colours-322d4db2bce3c99a.rmeta' --extern 'ansi_term=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libansi_term-f8978d85933fcbc3.rmeta' --extern 'atty=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libatty-d66f0356a7b940b2.rmeta' --extern 'bat=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libbat-9214995f8b51e67a.rmeta' --extern 'bugreport=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libbugreport-c5fbbe041161f5ca.rmeta' --extern 'clap=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libclap-16ff92ff96ff2063.rmeta' --extern 'clircle=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libclircle-b3db9df7c621b592.rmeta' --extern 'console=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libconsole-0ab1e674c72411c8.rmeta' --extern 'content_inspector=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libcontent_inspector-ad4d16bc3606d66c.rmeta' --extern 'dirs_next=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libdirs_next-b9df189dbbfd2d57.rmeta' --extern 'encoding=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libencoding-2de4fe711d8651fd.rmeta' --extern 'error_chain=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/liberror_chain-08caaeefc1c51594.rmeta' --extern 'git2=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libgit2-559613c3cb4dcf6f.rmeta' --extern 'globset=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libglobset-1ee243b59385f4fd.rmeta' --extern 'lazy_static=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/liblazy_static-f8cedd00f3916f27.rmeta' --extern 'path_abs=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libpath_abs-3ea431e9fcc5c280.rmeta' --extern 'semver=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libsemver-d9c7c0c0efc05d88.rmeta' --extern 'serde=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libserde-e0169456aff98faf.rmeta' --extern 'serde_yaml=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libserde_yaml-0bad9069f2036709.rmeta' --extern 'shell_words=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libshell_words-0391c7c6ba1d7c38.rmeta' --extern 'syntect=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libsyntect-6caabf2904c8b681.rmeta' --extern 'unicode_width=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libunicode_width-044df00d1d100a71.rmeta' --extern 'wild=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/deps/libwild-b9079dd4012320fa.rmeta' --cfg mirai -Z always_encode_mir -L 'native=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/build/ansi_colours-fc0e879df3181248/out' -L 'native=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/build/sys-info-bafda0d2da79ed0c/out' -L 'native=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/build/libgit2-sys-d2e9ab55951af1dd/out/build' -L 'native=/Users/hassnain/Desktop/RUST Sec/bat-0.18.1/target/debug/build/onig_sys-1915b09c33931da5/out'` (exit status: 255)"
  

Environment

Rust version (rustc --version)
rustc 1.75.0 (82e1608df 2023-12-21)
System : 14 inch M2 Pro

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant