-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Tracking Issue for enabling the linker-messages
lint by default
#136096
Comments
linker-warnings
lint by defaultlinker-messages
lint by default
Why should "built for newer 'macOS' version than being linked" be silenced? My instinct is that indicates libraries are being built with the wrong macos deployment target. cc #136113 |
windows-gnu generates a large amount of warnings. On a simple hello-world, it looks like:
Might be good to know why it does that. |
@ehuss what version of gnu ld do you have installed? that looks like #119286 (comment), which was fixed by updating the toolchain in #119229 |
i do not know much about macos linking. what can go wrong if you have mismatched deployment targets? |
warning: linker stderr: rust-lld: /Users/kpreid/.rustup/toolchains/nightly-2025-01-26-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-cef32f9876d137b7.rlib: archive member '45c91108d938afe8-absvdi2.o' is neither Wasm object file nor LLVM bitcode
rust-lld: /Users/kpreid/.rustup/toolchains/nightly-2025-01-26-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-cef32f9876d137b7.rlib: archive member '45c91108d938afe8-absvsi2.o' is neither Wasm object file nor LLVM bitcode
rust-lld: /Users/kpreid/.rustup/toolchains/nightly-2025-01-26-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-cef32f9876d137b7.rlib: archive member '45c91108d938afe8-absvti2.o' is neither Wasm object file nor LLVM bitcode
... |
Looks like I had a relatively old version of ld on my system. However, the default GitHub Actions 2022 image seems to be affected. It looks like it has GNU Binutils 2.39. 2025 has binutils 2.42 which I think should work? Or maybe it can be upgraded with chocolatey? |
I am not in the loop here, but I believe the answer is “nobody”. Quote from Jubilee on Zulip in 2023:
Perhaps @daxpedda could help out here; they at least work on |
alexcrichton is the target maintainer for wasm32-unknown-unknown. I believe the issue with compiler_builtins is a known thing where it includes object code. This was recently discussed in https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Building.20wasm32v1-none.20target.20fails/near/492830795 (see also #132802). |
Downgrade `linker-warnings` to allow-by-default This needs more time to bake before we turn it on. Turning it on early risks people silencing the warning indefinitely, before we have the chance to make it less noisy. cc rust-lang#136096 fixes rust-lang#136086 (comment) r? `@saethlin` cc `@Noratrieb` `@bjorn3` `@rustbot` label A-linkage L-linker_messages
I noticed today that a bunch of ui tests were failing locally on a clean branch, on my macOS system:
The key part being:
Not an immediate concern due to the impending lint level downgrade (#136098), but something to keep in mind when trying to turn this on again. |
On
And then windows-gnu has the already-mentioned Relevant CI run: rust-lang/libc#4254. |
Downgrade `linker-warnings` to allow-by-default This needs more time to bake before we turn it on. Turning it on early risks people silencing the warning indefinitely, before we have the chance to make it less noisy. cc rust-lang#136096 fixes rust-lang#136086 (comment) r? `@saethlin` cc `@Noratrieb` `@bjorn3` `@rustbot` label A-linkage L-linker_messages
Downgrade `linker-warnings` to allow-by-default This needs more time to bake before we turn it on. Turning it on early risks people silencing the warning indefinitely, before we have the chance to make it less noisy. cc rust-lang#136096 fixes rust-lang#136086 (comment) r? `@saethlin` cc `@Noratrieb` `@bjorn3` `@rustbot` label A-linkage L-linker_messages
Downgrade `linker-warnings` to allow-by-default This needs more time to bake before we turn it on. Turning it on early risks people silencing the warning indefinitely, before we have the chance to make it less noisy. cc rust-lang/rust#136096 fixes rust-lang/rust#136086 (comment) r? `@saethlin` cc `@Noratrieb` `@bjorn3` `@rustbot` label A-linkage L-linker_messages
This is a tracking issue for the
linker-messages
lint.About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
linker-warnings
to allow-by-default #136098linker-info
andlinker-messages
. The former should be allow by default, and should contain things we know aren't actually an issue (at least not enough to warn by default). The latter includes everything else. See below for a detailed list of known linker warnings.linker-messages
warn by default again.Ideally, I would also like to post-process these messages and add more context about why they happen. For example, the MACOSX_DEPLOYMENT_TARGET warning should contain context about what a deployment target is and how it gets set. We could even go so far as to map back from symbol names and object files to the original Span and crate that caused a warning.
Known Warnings (should be silenced)
wasm32-unknown-unknown
(and potentially other WASM platforms?) contain code for the wrong architecture #132802 and should be silenced until that issue is resolved.Known Warnings (should not be silenced)
linker-messages
lint by default #136096 (comment)). This seems like a real issue?Unresolved Questions
Implementation history
linker-warnings
to allow-by-default #136098@rustbot label L-linker_messages T-compiler A-linkage
The text was updated successfully, but these errors were encountered: