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

Tests for Windows under GNU are experiencing a linker failure #142

Closed
notgull opened this issue Aug 28, 2023 · 4 comments · Fixed by #151
Closed

Tests for Windows under GNU are experiencing a linker failure #142

notgull opened this issue Aug 28, 2023 · 4 comments · Fixed by #151

Comments

@notgull
Copy link
Member

notgull commented Aug 28, 2023

Taken from the latest CI logs:

          Warning: .drectve `-exclude-symbols:_ZN17raw_window_handle8borrowed3imp6Active6handle17hcdc9a7e46fa42377E ' unrecognized
          Warning: .drectve `-exclude-symbols:_ZN17raw_window_handle8borrowed3imp6Active10set_active17h87aab7a0dbfa799aE ' unrecognized
          Warning: .drectve `-exclude-symbols:_ZN17raw_window_handle8borrowed3imp6Active12set_inactive17hdc388a803d443f6fE ' unrecognized
          Warning: .drectve `-exclude-symbols:_ZN17raw_window_handle8borrowed3imp12ActiveHandle13new_unchecked17h717ec49c81207b3aE ' unrecognized
          Warning: corrupt .drectve at end of def file
          Warning: corrupt .drectve at end of def file
          Warning: corrupt .drectve at end of def file
          Warning: corrupt .drectve at end of def file
          collect2.exe: error: ld returned 5 exit status

This failure only occurs for *-pc-windows-gnu, not *-pc-windows-msvc. Also it apparently only happens under Windows, as I can build it for x86_64-pc-windows-gnu just fine on my Linux laptop.

I need to go to bed now, but I'll investigate this on my Windows VM this week.

@ids1024
Copy link
Member

ids1024 commented Sep 8, 2023

I'm guessing this is an issue with how the build environment is set up on CI and not really a Softbuffer issue... still haven't booted into Windows and tried to reproduce it though.

I previously had weird compile issues in a project with the Windows gnu toolchain running under msys2 with a Rust install from outside msys2; which was fixed by just using msys2's version of Rust. Some weird compile error started happening that hadn't before, but I don't remember if it was like this one: pop-os/keyboard-configurator@0b5827a.

@ids1024
Copy link
Member

ids1024 commented Sep 8, 2023

Looking up the error, it looks like these warnings would happen if the libraries were built with msvc, but linked with gnu ld, which doesn't use that directive? Not sure why that would be happening.

@ids1024
Copy link
Member

ids1024 commented Sep 8, 2023

Ah: rust-lang/rust#112368. Looks like the warnings appear starting in Rust 1.70, which updates LLVM to have llvm/llvm-project@c5b3de6. The directive would be supported with a sufficiently new version of ld or lld. But it should just be a warning and work anyway?

It's not obvious to my looking at the logs why this is causing a compile failure. All the messages the linker is printing are warnings.

Anyway, it doesn't seem to be a Softbuffer issue, and would occur with any Rust code built in the same environment. I guess... (Edit: Or well, unless the actual error is something else.)

@ids1024
Copy link
Member

ids1024 commented Sep 8, 2023

microsoft/windows-rs#2614 (comment)

I guess the problem is that ld is crashing, not erroring, with nothing useful logged? But it shouldn't be an issue with newer versions of ld.

In any case, not really softbuffer related.

@ids1024 ids1024 mentioned this issue Sep 8, 2023
notgull added a commit that referenced this issue Sep 9, 2023
They are currently failing due to what we believe is a bug in the
Windows bindings for Rust. For now, disable these until this bug is
resolved.

Closes #142

Signed-off-by: John Nunley <[email protected]>
notgull added a commit that referenced this issue Sep 9, 2023
They are currently failing due to what we believe is a bug in the
Windows bindings for Rust. For now, disable these until this bug is
resolved.

Closes #142

Signed-off-by: John Nunley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants