Skip to content
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

Install rust-mingw component when adding a target #607

Open
bekker opened this issue Jul 21, 2016 · 6 comments
Open

Install rust-mingw component when adding a target #607

bekker opened this issue Jul 21, 2016 · 6 comments
Labels
O-windows Windows related
Milestone

Comments

@bekker
Copy link

bekker commented Jul 21, 2016

When adding the target i686-pc-windows-gnu, rustup only installs rust-std, not rust-mingw. To cross-compile we need mingw component.
When manually downloaded and copied rust-mingw, compile works well.

@brson
Copy link
Contributor

brson commented Jul 26, 2016

Thanks for the report! This is interesting indeed. rust-mingw is installed with the win/gnu toolchain but not with the rust-std package.

The easy way to fix this would be to have rustup hard-code an understanding that sometimes rust-std depends on rust-mingw, but I think to do it correctly we probably need to update the manifest format so that packages other than rust can declare subcomponents. Then we make rust-mingw a sub-component of rust-std instead of a subcomponent of rust. Not sure offhand how disruptive this change would be.

I also know that @alexcrichton has a desire to make rust-mingw an optional package instead of a default package.

In the meantime, a workaround for the problem would be to add the rust component subcommand for installing arbitrary components (this is needed for other purposes too). Then one could install rust-mingw manually.

@Diggsey
Copy link
Contributor

Diggsey commented Jul 28, 2016

One issue here is that rust-mingw is specific to both the host and target architectures - installing it with the windows-gnu target would solve the problem when compiling on windows, but wouldn't help with cross-compiling from linux to windows for example.

Logically, the rust-mingw package sits in the same bracket as eg. the android SDK and other cross-linkers which rustc sometimes needs, it's just that for the moment we treat it specially.

@bekker
Copy link
Author

bekker commented Jul 29, 2016

@Diggsey I had to install mingw compiler, and add it as linker and ar in the cargo config. Then it worked well. I guess only the linker of rust-mingw was architecture-dependent.

@brson
Copy link
Contributor

brson commented Jul 29, 2016

@Diggsey ah interesting observation. Yep.

@brson
Copy link
Contributor

brson commented Jul 29, 2016

Maybe we will deprecate the rust-mingw package and fold it into the NDK support feature of rustup when it arrives.

@Diggsey Diggsey added this to Features (inclination: reject) in Issue Categorisation May 4, 2017
@workingjubilee
Copy link
Contributor

@rustbot label: +O-windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Windows related
Projects
No open projects
Issue Categorisation
Features (need further discussion or ...
Development

No branches or pull requests

6 participants