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

linking failure in run subcommand: x86_64-pc-windows-msvc instead of x86_64-pc-windows-gnu #39

Open
lorenzogatti opened this issue Jun 27, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@lorenzogatti
Copy link

I use 64 bit Mingw-w64 with the latest gcc, 64 bit, and Rust 1.35 on Windows 10 64 bit. I changed the toolchain to x86_64-pc-windows-gnu when installing Rust.

After hacking together a toolchain that can compile pyoxidizer, pyoxidizer init is successful and pyoxidizer run fails because x86_64-pc-windows-msvc is used instead of x86_64-pc-windows-gnu.

error occurred: Failed to find tool. Is cl.exe installed? (see https://github.com/alexcrichton/cc-rs#compile-time-requirements for help)

The gcc toolchain appears to be utterly unsupported (projectmgmt,rs):

/// Attempt to resolve the default Rust target for a build.
pub fn default_target() -> Result<String, String> {
// TODO derive these more intelligently.
if cfg!(target_os = "linux") {
Ok("x86_64-unknown-linux-gnu".to_string())
} else if cfg!(target_os = "windows") {
Ok("x86_64-pc-windows-msvc".to_string())
} else if cfg!(target_os = "macos") {
Ok("x86_64-apple-darwin".to_string())
} else {
Err("unable to resolve target".to_string())
}
}

@indygreg indygreg added the enhancement New feature or request label Jun 28, 2019
@indygreg
Copy link
Owner

You are correct: the GNU toolchain is utterly unsupported at this time.

I plan to support it someday. There's even a good chance we change the default toolchain from MSVC to GNU at some point. Come to think of it, the GNU toolchain might just work. I'm really curious what happens if you try to link the MSVC object files in the default Python distribution used by PyOxidizer using a GNU toolchain on Windows...

Until we do support a GNU toolchain, the failure mode could definitely be improved. Let's use this issue to track improving the failure mode.

We'll want a separate issue to track proper GNU toolchain support on Windows. Feel free to file that. If there isn't one, it will remain on my mental TODO list :)

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

No branches or pull requests

2 participants