Skip to content

tests\ui\native-library-link-flags\msvc-non-utf8-output.rs fails with lld-link as the linker #111256

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

Closed
danakj opened this issue May 5, 2023 · 2 comments · Fixed by #111262
Closed

Comments

@danakj
Copy link
Contributor

danakj commented May 5, 2023

This test is either new or changed recently, it now fails when using -Clinker=lld-link

Example build failure on Chromium CI: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8781936910784713969/+/u/package_rust/stdout

  diff of stderr:
  
  -	error: linking with `link.exe` failed: exit code: 1181
  +	error: linking with `C:\b\s\w\ir\cache\builder\src\third_party\rust-toolchain-intermediate\llvm-host-install\bin/lld-link` failed: exit code: 1
  2	   |
  -	   = note: LINK : fatal error LNK1181: cannot open input file 'märchenhaft.obj'
  +	   = note: lld-link: error: could not open 'märchenhaft': no such file or directory
  4	           
  5	
  6	error: aborting due to previous error

The test has link.exe error messages hardcoded into it, which are wrong when not using link.exe.

We can disable this test when not using link.exe but it would be much better to make the error checking more flexible or explicitly define an output for ldd-link.

How would one go about the latter?

@danakj
Copy link
Contributor Author

danakj commented May 5, 2023

cc: @ChrisDenton

Maybe the answer is since we're not using MSVC we don't care about this test, but from what I can tell this is testing how we invoke the linker, not the link.exe execution itself, in which case, it's valid to test with other linkers too?

@ChrisDenton
Copy link
Member

Hm, yes, sorry this was only meant to test msvc itself.

It could just test whether märchenhaft is in the output. That might be easier. Though I'm uncertain about testing every linker. It's possible there's one that doesn't support unicode output (I don't know).

@bors bors closed this as completed in c9433a4 May 8, 2023
aarongable pushed a commit to chromium/chromium that referenced this issue May 16, 2023
This reverts commit 8e635c4.

Reason for revert: Fixed rust-lang/rust#111256

Original change's description:
> Disable failing rust test
>
> Bug: 1442943
> Change-Id: I4232350f05c41c71971d31f18e6d6ad57a4d21d4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4506666
> Reviewed-by: danakj <[email protected]>
> Auto-Submit: Hans Wennborg <[email protected]>
> Commit-Queue: Hans Wennborg <[email protected]>
> Commit-Queue: danakj <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1140208}

Bug: 1442943
Change-Id: I645e2319fb289b48aaacc1fab431cb7d8e8acbc9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4513455
Reviewed-by: Hans Wennborg <[email protected]>
Auto-Submit: danakj <[email protected]>
Commit-Queue: Hans Wennborg <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1144642}
oneseer pushed a commit to oneseer/rust that referenced this issue May 24, 2025
This reverts commit 8e635c4850fd92a754538861dee0ebb3745ebc29.

Reason for revert: Fixed rust-lang/rust#111256

Original change's description:
> Disable failing rust test
>
> Bug: 1442943
> Change-Id: I4232350f05c41c71971d31f18e6d6ad57a4d21d4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4506666
> Reviewed-by: danakj <[email protected]>
> Auto-Submit: Hans Wennborg <[email protected]>
> Commit-Queue: Hans Wennborg <[email protected]>
> Commit-Queue: danakj <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1140208}

Bug: 1442943
Change-Id: I645e2319fb289b48aaacc1fab431cb7d8e8acbc9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4513455
Reviewed-by: Hans Wennborg <[email protected]>
Auto-Submit: danakj <[email protected]>
Commit-Queue: Hans Wennborg <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1144642}
NOKEYCHECK=True
GitOrigin-RevId: 5ac3835d5d0d3b50a367b960f16eb603d8767c0f
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