-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
can not build Windows 32-bit executable with Cargo 1.32.0 on Windows 10 x64 #6754
Comments
It looks like there may be some environment variables in play here or perhaps a shell script along the way injecting arguments, but this unfortunately doesn't look like a cargo/rustc bug |
ok @alexcrichton I understand it perfectly fine but how (as a cargo user) do I go about resolving it ? I can provide any information that's missing, so that we could decide which part of the toolset (if any) should this be raised for |
first question - is this ( |
Unfortunately this isn't the best venue to debug toolchain issues, but perhaps users.rust-lang.org can help? |
Well, the idea was that here I could find people who at least understand how it works and provide some guidance as to how to localize the root cause. Another point of posting it here is that people with similar problem might later find it here as well. But I understand your point. Will ask on the forum. Thanks
--
Sent from Mail.Ru app for Android Monday, 18 March 2019, 08:21PM +02:00 from Alex Crichton [email protected] :
…Unfortunately this isn't the best venue to debug toolchain issues, but perhaps users.rust-lang.org can help?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .
|
It seems I have it resolved:
So, thanks for suggestions, I think we may close this one! |
All the referenced issues have been closed: rust-lang/rust#47048 rust-lang/rust#53454 rust-lang/cargo#6754 Since we can (and should) use 'stable' on these targets too, we don't need the TOOLCHAIN logic any longer, so remove it.
All the referenced issues [1] have been Closed, so use "stable" for everything. Now `i686-w64-mingw32-gcc` fails with this instead error: linker `i686-w64-mingw32-gcc` not found so keep it disabled. There is probably a simple solution for this that is obvious to someone used to cross-compiling Rust programs on Windows... [1] rust-lang/rust#47048 rust-lang/rust#53454 rust-lang/cargo#6754
All the referenced issues [1] have been Closed, so use "stable" for everything. Now `i686-w64-mingw32-gcc` fails with this instead error: linker `i686-w64-mingw32-gcc` not found so keep it disabled. There is probably a simple solution for this that is obvious to someone used to cross-compiling Rust programs on Windows... [1] rust-lang/rust#47048 rust-lang/rust#53454 rust-lang/cargo#6754
Problem
Trying to build simple Rust (v. 1.32.0) executable for Windows 32 (i686-pc-windows-gnu) and process fails with
error: linking with
gccfailed: exit code: 1
Steps
src/main.rs
:.cargo/config
:Cargo.toml
:cargo build --verbose
brings this:Possible Solution(s)
If I comment out the
[build]\target
line in.cargo/config
file, .exe file builds and runs fine. But I need to link it as a Win32-executable, because I need to call Win32-library from it. And if you call it from x64-executable, it throws a%1 is not a Win32 application
error. :(NB: by looking at
it feels as if a path to ImageMagick library folder is incorrectly parsed (or provided) without escaped spaces, but I have no slightest idea as to which tool might be the culprit here :(
Notes
Output of
cargo version
:cargo 1.32.0 (8610973 2019-01-02)
Output of
rustc version
:rustc 1.32.0 (9fda7c223 2019-01-16)
Windows 10 x64
The text was updated successfully, but these errors were encountered: