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

[Windows] [CI] Use Rtools to test pre-computed bindings #53

Closed
Ilia-Kosenkov opened this issue Mar 1, 2021 · 2 comments · Fixed by #56
Closed

[Windows] [CI] Use Rtools to test pre-computed bindings #53

Ilia-Kosenkov opened this issue Mar 1, 2021 · 2 comments · Fixed by #56

Comments

@Ilia-Kosenkov
Copy link
Member

This is a reminder to update CI workflow

if ($env:RUST_TARGETS -like "*x86_64*") {
<# Amend rtools libgcc_eh.a #>
cp C:\rtools40\mingw64\lib\gcc\x86_64-w64-mingw32\8.3.0\libgcc.a C:\rtools40\mingw64\lib\gcc\x86_64-w64-mingw32\8.3.0\libgcc_eh.a

in light of the recent merging of this PR r-windows/rtools-packages#186.

The problem on Windows side is that MSYS2 (used for generating bindings), Rtools (custom MSYS2 build) and mingw toolchains in rust's *pc-windows-gnu ship different versions of gcc and friends. This creates issues that can be resolved using hacks (see code snippet above).
In particular, in PR r-windows/rtools-packages#186 we suggested implementing a hack that was present in 32-bit version of Rtools, but not in 64-bit version.
As soon as updated rtools gets released (I believe it will take significant time), we can update CI here. I hope with Rtools patched we may be able to move additional workflows to Rtools only, avoiding both MSYS2 and rust's own mingw tools.

@clauswilke
Copy link
Member

Could you remind us what exactly will have to be changed, so this info doesn't get lost between now and when the next Rtools is available?

@Ilia-Kosenkov
Copy link
Member Author

It is easy: in the linked code snippet this line should be removed:

cp C:\rtools40\mingw64\lib\gcc\x86_64-w64-mingw32\8.3.0\libgcc.a C:\rtools40\mingw64\lib\gcc\x86_64-w64-mingw32\8.3.0\libgcc_eh.a  

Right now it creates a fake copy of libgcc_eh.a, because Rtools ships none for x64 version (but this lib is required for compilation). With the new Rtools release, this file will be a part of Rtools so there is no need to manually create a copy.

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

Successfully merging a pull request may close this issue.

2 participants