Rust does not install, again (Windows)

It started with this helpful message from rustup:

note: the msvc targets depend on the msvc linker but link.exe was not found
note: please ensure that VS 2013 or VS 2015 was installed with the Visual C++ option
error: aborting due to previous error

I knew from previous suffering that Rust needs the "Microsoft Build tools 2015". I found 2 downloads:

  • BuildTools_Full.exe (25MB)
  • vs_BuildTools.exe (1MB)

Seems "2015" is out and "2017" is in. Oh well.

Neither worked. Microsoft doesn't help (or should I say: actively frustrates), because the link in "On Windows, Rust additionally requires the C++ build tools for Visual Studio 2013 or later. The easiest way to acquire the build tools is by installing Microsoft Visual C++ Build Tools 2017 which provides just the Visual C++ build tools" (on [Install Rust - Rust Programming Language) points to Download Visual Studio Tools - Install Free for Windows, Mac, Linux, which goes to a page that lists a Lot of things, and none of them in particular (defeating the purpose of linking there).

Especially if your browser or location is not in the english language domain, things get hairy. There apparently is no way to convince Microsoft to give a page in english.

In summary, textual instructions (to people) don't cut it, and Microsoft does not provide an unambiguous page for build tools, or Rust does not link to it. Anyhow, the "#build-tools-for-visual-studio-2017" in the url does NOT do anything.

But I found MSBuild on the page (a term Rust does not use), and got to download vs_BuildTools.exe. But, as stated installing this did not resolve the problem, despite downloading 1.3GB. Also, there are way too many options, by default this monster wants to install 4.5GB. That was after I had already installed BuildTools_Full.exe, found through Google. Didn't work. Or maybe there was this small detail everybody knows...

My experience today is typical. There are always problems of this nature. Hours lost with no recourse. I thought rustup resolved these issues.

In the end... I never feel welcome, it seems there is always an "admittance exam" before I am allowed to use Rust, and whatever I do the end result is always the same. When the install works out, examples don't work (yes, also in the second edition book), packages are not found, documentation is inaccurate, exciting code almost allways relies on advanced patterns, like iterator magic. Code won't compile whichever way. Let alone getting VSCode to work.

I wish Rust would not rely on an external linker (from such an unreliably third party). It is absurd that a well known tool from the dark ages of programming, surely no bigger than a few MB, results in the absurdities mentioned above. A simple url or the executable would suffice.

Why waste life? I am sure the Rust maintainers do a good job, but this needs to be said nevertheless.

Something to meditate on: a compiler has the simplest of interfaces: transform one file into another.

PS after pasting in all of the above text, a page with a similar complaint suggested But after running the executable (visualcppbuildtools_full.exe) it comes up with an indecent proposal: it needs "4GB of space across all drives", and the only optionally selected item (in custom instead of the default) is the Windows 8.1 SDK. If I unselect that, it still needs 3GB and it is clear that there is no basis for a conversation.

At all.

The only item on the menu is frustration. The internet serves it cold, with a vengeance, to unsuspecting victims. Directly from Microsofts heartless servers (as in its younger years).

I suggest you add the tag "shame" to categorize this post under :((

1 Like

The BuildTools_Full.exe (from here) worked for me. It requires selecting Windows 8.1 SDK, since that component has the files Rust needs.

The install will be huge, it will download gigabytes of needless stuff, and it will take very long time. I'm afraid there's no way around that.

Two things that would make things better:

  1. Recommend and use the 2017 build tools. IIUC, the 2017 toolchain was revamped to minimize the amount of stuff downloaded.
  2. Do whatever needs to be done to make the Windows 10 SDK work, so we don't need the Windows 8.1 SDK. I think a lot of people try to avoid installing the 8.1 SDK and then get tripped up. That happened to me, at least.

I would guess someone at Microsoft has screwed up the localized version of that page. English version has a working button to download Build Tools for Visual Studio 2017, which initiates a download from this url: Grab it while the link is still valid!

Thanks for the help.

Fast forward I had 2 days of surprisingly rapid development, curstomizing serde to read a non-standard xml file, with the compiler being quite good at guiding me towards solutions.

But today I am stuck in a way that involves crates, modules, extern, the docs and bad discoverability around these topics reminiscent of the C-ecosystem. That's for the next post.

I still think the installation process goes wrong at so many levels, that Rust should seriously consider dumping these build tools.

Rust hides the fact that, "by the way", it depends on this absurd 5GB download, of which it uses only 1%. It needs a page that explains this and that seriously curses Microsoft. This is a good time to be politically correct and protect your users :slight_smile:

1 Like

It shouldn't be that large; you can choose only the build tools.

Hi Steve, Brian commented this:

I think a lot of people try to avoid installing the 8.1 SDK and then get tripped up. That happened to me, at least.

I did too did install without the Windows 8.1SDK at first. Did not work. Then I surrended and did the absurd. And it worked.

Note that we also have ...-pc-windows-gnu toolchains, which are completely self-contained. However you won't be able to use native Windows debuggers (e.g. WinDbg or Visual Studio) with them.