Skip to content

Can't install component 'i686-pc-windows-gnu' on linux #1127

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
Thinkofname opened this issue May 19, 2017 · 6 comments
Closed

Can't install component 'i686-pc-windows-gnu' on linux #1127

Thinkofname opened this issue May 19, 2017 · 6 comments
Labels

Comments

@Thinkofname
Copy link

info: downloading component 'rust-std' for 'i686-pc-windows-gnu'
info: installing component 'rust-std' for 'i686-pc-windows-gnu'
info: rolling back changes
error: could not copy file from '/root/.rustup/tmp/b1vtfeiidqc5ro74_dir/rust-std-i686-pc-windows-gnu/lib\rustlib\i686-pc-windows-gnu\lib\arena-04cd199c7c4cce31.dll' to '/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib\rustlib\i686-pc-windows-gnu\lib\arena-04cd199c7c4cce31.dll'
info: caused by: the source path is not an existing regular file

From the looks of the error is seems Windows style paths seem to be being used instead of linux style

@Thinkofname
Copy link
Author

Thinkofname commented May 20, 2017

Looking into it this seems to be an issue with rust-installer.

https://github.com/rust-lang/rust-installer/blob/daa2a05ebe7b8d07a309e8891ebc548652362954/src/generator.rs#L111-L129
Its using display which is placing platform specific paths into the manifest.in

I'm not sure which side should be fixed however

As a workaround something like this would work but i'm not sure if there is a better way?

diff --git a/src/rustup-dist/src/component/package.rs b/src/rustup-dist/src/component/package.rs
index e03b8d2..b6296bf 100644
--- a/src/rustup-dist/src/component/package.rs
+++ b/src/rustup-dist/src/component/package.rs
@@ -94,7 +94,7 @@ impl Package for DirectoryPackage {
             let part = try!(ComponentPart::decode(l)
                             .ok_or_else(|| ErrorKind::CorruptComponent(name.to_owned())));
 
-            let path = part.1;
+            let path: PathBuf = part.1.to_string_lossy().replace('\\', "/").into();
             let src_path = root.join(&path);
 
             match &*part.0 {

@Diggsey Diggsey added the bug label May 20, 2017
@Diggsey
Copy link
Contributor

Diggsey commented May 20, 2017

I reproduced this, but it only happens on nightly. Something must have changed in how the components are built and packaged, which makes this an upstream issue.

@Diggsey
Copy link
Contributor

Diggsey commented May 20, 2017

Reported as rust-lang/rust-installer#65

@onur
Copy link
Member

onur commented May 23, 2017

If you really need to install this target (x86_64-pc-windows in this case) until this issue resolved, you can find downloaded tarball in ~/.rustup/downloads, manually extract it with tar xf and move rust-std-nightly-x86_64-pc-windows-gnu/rust-std-x86_64-pc-windows-gnu/lib/rustlib/x86_64-pc-windows-gnu/ directory into ~/.rustup/toolchains/nightly-{YOUR_NIGHTLY_VERSION}-x86_64-unknown-linux-gnu/lib/rustlib/.

@cuviper
Copy link
Member

cuviper commented May 23, 2017

The manifests should be fixed already by rust-lang/rust#42132.

@Thinkofname
Copy link
Author

Yep, fixed here for me

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

No branches or pull requests

4 participants