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

Linker wrapper script for musl outputs garbage due to set -x #1618

Open
4 of 11 tasks
VorpalBlade opened this issue Jan 27, 2025 · 6 comments
Open
4 of 11 tasks

Linker wrapper script for musl outputs garbage due to set -x #1618

VorpalBlade opened this issue Jan 27, 2025 · 6 comments

Comments

@VorpalBlade
Copy link

Checklist

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: rust-lang/rust#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
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • 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

@VorpalBlade VorpalBlade changed the title Linker wrapper script for musl outputs garbage due to set - x Linker wrapper script for musl outputs garbage due to set -x Jan 27, 2025
@Emilgardis
Copy link
Member

Emilgardis commented Jan 27, 2025

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

@VorpalBlade
Copy link
Author

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.

@Emilgardis
Copy link
Member

Emilgardis commented Jan 27, 2025 via email

@Noratrieb
Copy link

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?

@bjorn3
Copy link

bjorn3 commented Jan 28, 2025

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

@VorpalBlade
Copy link
Author

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).

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

No branches or pull requests

4 participants