Skip to content

Regression: x86_64-pc-windows-msvc: can't find crate for std [E0463] #29418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
briansmith opened this issue Oct 28, 2015 · 5 comments
Closed

Comments

@briansmith
Copy link
Contributor

I have a script that installs Rust on Windows the following way (on Appveyor):

  1. Downloads https://static.rust-lang.org/dist/%RUST_TAR_GZ_BASE%.tar.gz
  2. Extracts the file, leaving the Rust distribution in build/%RUST_TAR_GZ_BASE%
  3. SET PATH=%cd%\build%RUST_TAR_GZ_BASE%\rustc\bin;%cd%\build%RUST_TAR_GZ_BASE%\cargo\bin;%PATH%

Then, I could successfully build with cargo build. This worked fine through rustc 1.5.0-nightly (d3f4978 2015-10-18) / cargo 0.6.0-nightly (1a6d6c4 2015-10-18). However, as of rustc 1.5.0-nightly (7275d3d 2015-10-20) / cargo 0.6.0-nightly (65f50e7 2015-10-19), this has stopped working with the error "can't find crate for std [E0463]"

I think this is likely due to #29009 or related changes. cc @alexcrichton.

@briansmith
Copy link
Contributor Author

Also, this works fine when you install using the MSI installer, as tested with rustc 1.5.0-nightly (7beebbe 2015-10-22) / cargo 0.6.0-nightly (e1ed995 2015-10-22).

@alexcrichton
Copy link
Member

Yeah we've split the standard library into a separate package now, so if RUSTC_TAR_GZ_BASE is the "rustc-nightly-$target" package then it won't have the standard library and you'll also need to download the "rust-std-nightly-$target" package.

For now I'd recommend using the standard "rust-nightly-$target" installers as they should always work for getting a full installation

briansmith added a commit to briansmith/ring that referenced this issue Oct 28, 2015
See rust-lang/rust#29418. The Rust .tar.gz
files no longer contain all the stuff needed to build code. Switch to
using the MSI installer instead.
@briansmith
Copy link
Contributor Author

Thanks! I believe I was using the .tar.gz because at one time not every channel had MSI/EXE installers for the -msvc targets.

In case somebody else had a similar issue as the one reported here, here is how I switched from using the .tar.gz to the MSI installer on AppVeyor: briansmith/ring@6dc50ec.

@retep998
Copy link
Member

There is actually a .tar.gz for "rust-nightly-$target" for the windows targets although you need an MSYS environment to run the install.sh.

@ghost
Copy link

ghost commented May 14, 2019

I have solved this. Obviously the MSI files here:

https://forge.rust-lang.org/other-installation-methods#standalone-installers

are installers. However the TAR.GZ files are also installers. So to work with
the TAR.GZ, you need to do this:

./install.sh --verbose --prefix=/tmp \
--components=rustc,rust-mingw,rust-std-x86_64-pc-windows-gnu

or alternatively this:

cp -r -s "$PWD"/rust-std-x86_64-pc-windows-gnu/lib rustc
cp -r -s "$PWD"/rust-mingw/lib rustc

I disagree with the decision to make the TAR.GZ archives require installation:
the whole point distributing an archive over an installer is so that users can
extract and go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants