[Solved] Issue with building Rust from source

Hi folks,

I’m trying to build the rust compiler from source using the instructions available on the official Rust github repo. I am specifying a Windows MSVC build. I am trying to build the rust compiler on the Hosted 2017 azure pipelines agent (VM), which has the following software installed: https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/win/Vs2017-Server2016-Readme.md.

However, I am encountering compiler errors when trying to build stage0 compiler artifacts. The full log can be found here. The build works on my local machine, so I suspect it might be an issue with a missing dependency/versioning. Does anyone know what this error might pertain to?

Given that the error message is "error: description for error code EXXX doesn't start and end with a newline" and you’re building on Windows, there’s a good chance it’s related to Windows vs *nix newlines. The Rust project also uses Azure Pipelines and looking at the recent Git history, I see that we recently changed some Git settings so that newlines wouldn’t be converted on checkout: https://github.com/rust-lang/rust/commit/239a404cae1bebbd0fe6e01688e8cf94be3a6c52

Perhaps you should try something similar?

1 Like

Hi @wesleywiser,

That was indeed the issue. I solved it by changing the git config with git config --global core.autocrlf false in a powershell script before cloning the source repository.

Thank you so much for the assistance :smiley:

2 Likes