-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Bundled gcc (windows x64) is unable to build any c file #24418
Comments
The shipped |
I completely agree, but some crates like For example, I created a dummy project with
This is very unsatisfactory and it shouldn't be necessary to manually install and setup additional toolchains in order to build rust pages, at least on Windows. |
How did the directory for This is also why we recommend crates not use C code unless absolutely necessary! There's a tracking issue in libtime for removing the C dependency. |
I added it manually to PATH because I assumed that this is the desired toolchain to build such C parts. That means I additionally have to maintain an extra MinGW setup. That sucks :/ |
I have gcc installed on my system that's 32 bits for something else you can't assume I don't have it installed for your program to work |
…hton Warn windows-gnu users that the bundled gcc can't compile Add a `DO NOT USE THIS gcc.exe FOR COMPILATION.txt` file to `lib\rustlib\*-pc-windows-gnu\bin` folders in `windows-gnu` installations in order to warn against attempting to use the bundled `gcc.exe` as a C compiler. I'm pretty sure that location is usually found manually, so this should be easily noticeable. This mistake has been made plenty of times and has lead to misunderstandings: Rust: [Bundled gcc (windows x64) is unable to build any c file](rust-lang#24418) gtk-rs: [Compiling on windows](gtk-rs/gtk#625) bzip2-rs: [Build failure at gcc level: blocksort.c not found](alexcrichton/bzip2-rs#30) Alternatives: rename the bundled `gcc.exe` to e.g. `rustc-gcc.exe` or `gcc-linker.exe`. This might require a more comprehensive change or break crates already using it as a linker. r? @alexcrichton
Warn windows-gnu users that the bundled gcc can't compile Add a `DO NOT USE THIS gcc.exe FOR COMPILATION.txt` file to `lib\rustlib\*-pc-windows-gnu\bin` folders in `windows-gnu` installations in order to warn against attempting to use the bundled `gcc.exe` as a C compiler. I'm pretty sure that location is usually found manually, so this should be easily noticeable. This mistake has been made plenty of times and has lead to misunderstandings: Rust: [Bundled gcc (windows x64) is unable to build any c file](#24418) gtk-rs: [Compiling on windows](gtk-rs/gtk#625) bzip2-rs: [Build failure at gcc level: blocksort.c not found](alexcrichton/bzip2-rs#30) Alternatives: rename the bundled `gcc.exe` to e.g. `rustc-gcc.exe` or `gcc-linker.exe`. This might require a more comprehensive change or break crates already using it as a linker. r? @alexcrichton
I just installed the Rust 1.0 nightly on Windows x64 and run into a severe problem with the shipped MinGW infrastructure.
Environment:
If I now try to build a minimal C program
main() {}
withgcc -v test.c
I receive the following error:The text was updated successfully, but these errors were encountered: