cargo
cargo copied to clipboard
Unable to cross-compile for i686-pc-windows-gnu (cross version out of date?)
Description
I've been attempting to cross compile a Rust project for i686-pc-windows-gnu on the ubuntu-latest platform, which appears to work fine until the linking stage. Related PR is here: https://github.com/FrancisRussell/zoog/pull/17
Workflow code
https://github.com/FrancisRussell/zoog/blob/3dbd3d39438db55344819d9df067490073a93a35/.github/workflows/ci.yml
Action output
2021-01-03T20:43:56.9218892Z Compiling rand_chacha v0.2.2
2021-01-03T20:43:58.6301048Z Compiling rand v0.7.3
2021-01-03T20:44:00.8677438Z Compiling term_size v0.3.2
2021-01-03T20:44:01.1447605Z Compiling remove_dir_all v0.5.3
2021-01-03T20:44:01.7061525Z Compiling textwrap v0.11.0
2021-01-03T20:44:02.4005338Z Compiling tempfile v3.1.0
2021-01-03T20:44:03.2505163Z Compiling clap v2.33.3
2021-01-03T20:44:06.9047767Z Compiling thiserror-impl v1.0.23
2021-01-03T20:44:09.9889944Z Compiling derivative v2.1.1
2021-01-03T20:44:15.0369777Z Compiling thiserror v1.0.23
2021-01-03T20:44:15.1810628Z Compiling zoog v0.1.1 (/home/runner/work/zoog/zoog)
2021-01-03T20:44:16.7638877Z error: linker `i686-w64-mingw32-gcc` not found
2021-01-03T20:44:16.7646309Z ##[error] |
2021-01-03T20:44:16.7664285Z = note: No such file or directory (os error 2)
2021-01-03T20:44:16.7664667Z
2021-01-03T20:44:16.7665437Z error: aborting due to previous error
2021-01-03T20:44:16.7666432Z ##[error]aborting due to previous error
2021-01-03T20:44:16.7813670Z error: could not compile `zoog`
2021-01-03T20:44:16.7814617Z ##[error]could not compile `zoog`
2021-01-03T20:44:16.7816604Z To learn more, run the command again with --verbose.
2021-01-03T20:44:16.7819154Z ##[error]The process 'cross' failed with exit code 101
Expected behavior
Compilation succeeds.
Additional context
From what I can tell, cross does support this target which is why I'm filing here first.
I've noted this in the log:
Warning: `cross` does not provide a Docker image for target i686-pc-windows-gnu, specify a custom image in `Cross.toml`. Falling back to `cargo` on the host.
However, cross does have an image for this target, and setting this image inside Cross.toml
fixes the issue. Perhaps the version of cross being depended on is out of date? It is unclear to me how the dependency on cross is captured in this repository.
I am also having this problem: https://github.com/x4e/PaperBin/runs/2017742621?check_suite_focus=true https://github.com/x4e/PaperBin/blob/62d9d5cf4493397658a0b7ba36ef7abc4bfb83b0/.github/workflows/gradle.yml