I tried the Windows OS in my Rust project and encountered an error during the build process.
Here are some highlights from the job log:
error: linking with `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\bin\HostX64\x64\link.exe` failed: exit code: 1181
= note: LINK : fatal error LNK1181: cannot open input file 'advapi32.lib'
error: aborting due to previous error
error: Could not compile `winapi`.
The winapi crate is a dependency of the rand crate that I’m using in this project. The rand crate is pretty popular, so I expect a lot of Rust projects failing to build/test on Windows as well given this issue.
(This is Powershell, but in case you use something else you get the idea.)
VCToolswith recommended components should be enough to build and link Rust code with the x86_64-pc-windows-msvc toolchain. ATL is an additional dependency of SpiderMonkey.
Thanks @josh. I was able to test this update by rerunning the Windows jobs and it worked on Rust stable. Unfortunately, the jobs for beta and nightly Rust failed. Here are the relevant parts of the log:
$ curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION -y
error: could not copy directory from 'C:\Users\travis\.rustup\tmp\vzp4uuxez717jya2_dir\rust- docs\share/doc/rust/html' to 'C:\Users\travis\.rustup\toolchains\beta-x86_64-pc-windows- msvc\share/doc/rust/html'
info: caused by: There is not enough space on the disk. (os error 112)
The command "curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION -y" failed and exited with 1 during .
I guess the additional items recently added to the image is making the disk almost full. Are you able to check how much disk space is available before any of the build specific tasks begin (before git clone)?.
Hopefully over the week, or Monday latest, we will increase the disk size to 60gb temporarily while we try to figure out what is best.
As for the job stalling when trying to install windows-sdk-10.1, I believe that is because that package tries to restart the VM using shutdown.exe. Could you try rerunning with --package-parameters "--quiet --wait --norestart"?
I tried to use choco optimize, which cleans up downloads and frees up space, but that is only for the licensed version.
I have released a new image which has more disk space available thanks to a choco package which helped me clean up some files.
For the time being I think we can class the winapi compile issue as resolved. If you have further issues with disk space could you please open a new topic (for better tracking).