Rust Windows build: lazy_static error[E0463]: can't find crate for `core`

Hi, my Windows builds for Rust were working, but stopped working sometime in December 2019/January 2020.

Here’s the last successful build (Dec 12 2019): https://travis-ci.com/github/dandavison/delta/jobs/266750525.

However if I rebuild now on the same commit, it fails: https://travis-ci.com/github/dandavison/delta/jobs/322104619

Here’s the first failing build (Jan 21 2020): https://travis-ci.com/github/dandavison/delta/jobs/266751900

The failing builds all fail with

process didn't exit successfully: `rustc --crate-name lazy_static C:\Users\travis\.cargo\registry\src\github.com-1ecc6299db9ec823\lazy_static-1.3.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=f6b6078bac424eab -C extra-filename=-f6b6078bac424eab --out-dir C:\Users\travis\build\dandavison\delta\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\travis\build\dandavison\delta\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\travis\build\dandavison\delta\target\debug\deps --cap-lints allow` (exit code: 1)
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: could not compile `lazy_static`.

Can anyone point me towards getting Windows builds working again?

This seems to have been due to a change in the Travis Windows build environment from stable-x86_64-pc-windows-msvc to stable-x86_64-pc-windows-gnu: my travis.yml was still requesting the former.

1 Like

Now it seems to have switched back to stable-x86_64-pc-windows-msvc.

Imprint