Linker wrapper script for musl outputs garbage due to `set -x`
Checklist
- [x] I've looked through the issues and pull requests for similar reports
Describe your issue
https://github.com/cross-rs/cross/blob/main/docker/musl-gcc.sh uses set -x, which causes unexpected output. Rustc now issues a lint for that (on nightly). This breaks -Dwarning builds. See this rustc issue: https://github.com/rust-lang/rust/issues/136132
Cross should remove that set -x and then make a new release of the affected component(s). The docker images in this case I suppose?
What target(s) are you cross-compiling for?
No response
Which operating system is the host (e.g computer cross is on) running?
- [ ] macOS
- [ ] Windows
- [x] Linux / BSD
- [ ] other OS (specify in description)
What architecture is the host?
- [x] x86_64 / AMD64
- [ ] arm32
- [ ] arm64 (including Mac M1)
What container engine is cross using?
- [x] docker
- [ ] podman
- [ ] other container engine (specify in description)
cross version
cross 0.2.5 (66221abde 2024-11-19)
Example
Cross compile any program to aarch64-unknown-linux-musl.
Additional information / notes
No response
To solve this without a fix to our images, one can use #![allow(linker_messages)] in root
I think it's unfortunate that this is an error-by-default, but oh well, it's a simple thing to fix. PRs welcome, otherwise I'll get to it myself
I think it's unfortunate that this is an error-by-default, but oh well, it's a simple thing to fix. PRs welcome, otherwise I'll get to it myself
I believe they are currently planning to roll back this temporarily due to the fallout of the it.
Ah yes, it was changed: https://github.com/rust-lang/rust/pull/136098
Yes, we rolled it back for now to fix the warnings on our side and in places like here before enabling it again to reduce fallout.
I see that this script was added 3 years ago to work around issues in "older Rust versions". Maybe it can just be removed now?
I think it's unfortunate that this is an error-by-default, but oh well, it's a simple thing to fix. PRs welcome, otherwise I'll get to it myself
It is a warning by default. OP used -Dwarnings upgrading any warning to an error: https://github.com/VorpalBlade/chezmoi_modify_manager/blob/12c5fea1442fcd7e465f827c9963475d088cf73e/.github/workflows/build.yml#L22
Yes, I wrote that in the initial post as well. The discussion about using that or not is a whole topic on its own though (and without it, I wouldn't have noticed this problem to begin with).