-
Notifications
You must be signed in to change notification settings - Fork 893
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
ci(windows): fix CI failure on x86_64-pc-windows-gnu
#3849
Conversation
x86_64-pc-windows-gnu
x86_64-pc-windows-gnu
0dc8f78
to
99a4df7
Compare
Thanks for picking this up! |
@djc Sorry this PR is not ready yet. I thought it was fixed but obviously I wasn't looking at the right direction 😓 @mati865 do you happen to have any idea on this one? The context is that our Windows/GNU CI has been failing since merging #3367 and we have now idea why this is the case 🙏 |
Looks like a linker crash to me. LTO is unrelated because Rust doesn't use linker's LTO (unless you explicitly enable it: https://doc.rust-lang.org/rustc/linker-plugin-lto.html). I can only guess what is crashing it but I'd bet |
475a043
to
f32b890
Compare
@mati865 Thanks for helping out! Unfortunately, now the error is different, but the build is still a failure, am I doing anything wrong? = note: Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_gnu-0.42.2\lib/libwindows.a(ntdll_dll_s00014.o): local symbol `' has no section
collect2.exe: error: ld returned 1 exit status |
I have no idea what it means but maybe this section causes the crash with |
0042d4c
to
821d0f0
Compare
@mati865 I just tried with error: linking with `rust-lld.exe` failed: exit code: 1
|
= note: "rust-lld.exe" "-flavor" "gnu" "--dynamicbase" "--disable-auto-image-base" "-m" "i386pep" "--high-entropy-va" "C:\\Users\\runneradmin\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcVUMshG\\symbols.o" "D:\\a\\rustup\\rustup\\target\\x86_64-pc-windows-gnu\\debug\\deps\\rustup_init-02e6c105cc009354.14p56amfjwwsn5jm.rcgu.o" "D:\\a\\rustup\\rustup\\target\\x86_64-pc-windows-gnu\\debug\\deps\\rustup_init-02e6c105cc009354.17ib23qhpn1v4l6i.rcgu.o" "D:\\a\\rustup\\rustup\\target\\x86_64-pc-windows-gnu\\debug\\deps\\rustup_init-02e6c105cc009354.19e13oqkyvw78abj.rcgu.o" "D:\\a\\rustup\\rustup\\target\\x86_64-pc-windows-gnu\\debug\\deps\\rustup_init-02e6c105cc009354.1d01k4kqg3wx0lrc.rcgu.o" "D:\\a\\rustup\\rustup\\target\\x86_64-pc-windows-gnu\\debug\\deps\\rustup_init-02e6c105cc009354.1eteqsfeqh29lh61.rcgu.o" "D:\\a\\rustup\\rustup\\target\\x86_64-pc-windows-gnu\\debug\\deps\\rustup_init-02e6c105cc009354
= note: lld: error: unable to find library -lpsapi
lld: error: unable to find library -lpowrprof
lld: error: unable to find library -lws2_32
lld: error: unable to find library -lcrypt32
lld: error: unable to find library -lbcrypt
lld: error: unable to find library -ladvapi32
lld: error: unable to find library -ladvapi32
lld: error: unable to find library -lkernel32
lld: error: unable to find library -lole32
lld: error: unable to find library -loleaut32
lld: error: unable to find library -lntdll
lld: error: unable to find library -lkernel32
lld: error: unable to find library -ladvapi32
lld: error: unable to find library -lkernel32
lld: error: unable to find library -lntdll
lld: error: unable to find library -luserenv
lld: error: unable to find library -lws2_32
lld: error: unable to find library -lkernel32
lld: error: unable to find library -lws2_32
lld: error: unable to find library -lkernel32
lld: error: too many errors emitted, stopping now |
@rami3l LLD should be used like on Unix systems, via |
Yes, I did exactly that in https://github.com/rust-lang/rustup/actions/runs/9321950575/job/25661988047, but that... still looks like a GNU ld error? |
Yeah, for some reason LLD was not used. Locally running with MSYS2 (ucrt64 env) I got slightly different error couple time:
but all new builds since then do pass (doing Upon trying https://github.com/niXman/mingw-builds-binaries/releases/tag/13.2.0-rt_v11-rev0 that you install via chocolatey it seems to reproduce every time. Also LLD didn't help, there is probably some incompatibility in how GCC and Clang generate the sections:
So the solution here would be to use more recent tools, for an example using MSYS2 but anything modern should work.
|
b6569c4
to
fe28c8c
Compare
5346ef9
to
5823121
Compare
I suspect we've been using the bundled (sigh) mingw all along (!) and have encountered something similar to actions/runner-images#5459. ... and the version so far is:
... which explains everything.
> Get-Command x86_64-w64-mingw32-gcc
CommandType Name Version Source
----------- ---- ------- ------
Application x86_64-w64-mingw32-gcc.exe 0.0.0.0 C:\mingw64\bin\x86_64-w64-mingw32-gcc.exe Update: After trying another installer, it finally worked! Thanks a lot for your pointers @mati865 and @ChrisDenton! |
6dcf9ef
to
3005c8d
Compare
Currently, the
master
CI fails onx86_64-pc-windows-gnu
onThis PR tries to address this issue while moving away from the previously hardcoded MinGW version (6.3.0 from 2017) at the same time.
Concerns
Should we keep theI guess we should, at least for the moment.x86_64-pc-windows-gnu
CI enabled even on PRs?