Rustc project compilation failed

I used rust compiler project to make a small tool four month ago, but when I reconfigure the environment, it failed.
I clone my project, and type ./x.py setup, and then ./x.py build, when linking, ld say "
/usr/bin/ld: cannot find -lLVM-15-rust-1.67.0-nightly collect2: error: ld returned 1 exit status". why it happens?

Rust 1.67 was in nightly nearly 6 months ago. Try a more recent version.

Thanks, but the data structure in my project is in 1.67. Is there a way to make it successfully compile?

Is your project just a regular Cargo-based project written in Rust? Then it should still work with the latest stable rustc. More importantly, there generally shouldn't be a need to compile rustc from source; the recommended way to get a rust compiler is via rustup.

My project involves making changes to the source code of the Rust compiler. At the time, I cloned the compiler version 1.67 and made modifications on top of it. I used Github for backup. However, when I now clone my code again, and run ./x.py setup and then ./x.py build , I encounter link errors. I suspect that the new version of rustc is not compatible with version 1.67. What should I do?

didn't you have your Cargo.lock checked in your code? if you need to pin to specific versions of your dependencies, you should check in Cargo.lock at the time you know it builds successfully.

if you are building source code of the rust compiler, you must be using a nightly toolchain? nightly toolchain is changing rapidly, you should take note of the toolchain version the last time you use it to build your project.

try install an older version of toolchain. (e.g. rustup toolchain install nightly-2023-04-30); also you can try to check out the code at an earlier version and try again.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.