I have encountered following error from time to time while compiling substrate-node-template

error: internal compiler error: encountered incremental compilation error with mir_built(76e5305fbe3bf3e0-1cbbbe6365e28f21)

I have not been able to reproduce it at will and the compiler indicates to delete artifacts with cargo clean and rebuild which does fix the issue.

Would like to ask if someone else has encountered this error and if you have a high level explanation on the reason behind it as it is not the already well known and documented Fingerprints issue.

Compiling on an M2. thanks!


1 Answer 1


The error you are encountering is an Internal Compiler Error (ICE), which is a bug in the Rust compiler. The error message indicates that the compiler encountered an incremental compilation error with the MIR (Machine Independent Representation) for the function mir_built.

The mir_built function is responsible for building the MIR for a function. The MIR is a representation of the function that is used by the compiler to optimize and generate machine code.

The reason why you are encountering this error is because the compiler is unable to build the MIR for the function mir_built correctly. This can be caused by a number of things, including a bug in the compiler, a bug in your code, or a problem with the compiler's environment.

The easiest way to fix this error is to delete the artifacts directory and rebuild the project. This will force the compiler to rebuild the MIR for all of the functions in your project, including the function mir_built.

If you are still encountering this error after rebuilding the project, you can try the following:

  • Update your Rust compiler to the latest version.
  • Try compiling your project on a different machine.
  • File a bug report with the Rust compiler team.

I hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.