Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Unable to cross-compile for i686-pc-windows-gnu (cross version out of date?) #148

Open
FrancisRussell opened this issue Jan 3, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@FrancisRussell
Copy link

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: FrancisRussell/zoog#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.

@FrancisRussell FrancisRussell added the bug Something isn't working label Jan 3, 2021
@FrancisRussell
Copy link
Author

FrancisRussell commented Jan 3, 2021

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.

@FrancisRussell FrancisRussell changed the title Unable to cross-compile for i686-pc-windows-gnu Unable to cross-compile for i686-pc-windows-gnu (cross version out of date?) Jan 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants