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

Regression on nightly: Cross compiling to x86_64-pc-windows-gnu fails #122228

Closed
VorpalBlade opened this issue Mar 9, 2024 · 4 comments
Closed
Labels
C-bug Category: This is a bug.

Comments

@VorpalBlade
Copy link

VorpalBlade commented Mar 9, 2024

I tried this code (on Arch Linux, as well as in GitHub CI using "ubuntu-latest"):

git clone https://github.com/VorpalBlade/ini-merge.git
cd ini-merge
git checkout 0f4696241825c17faf4d63f2e19bdccabc1ccc51
cross test --target x86_64-pc-windows-gnu # This works, rustc 1.76
cross +nightly test --target x86_64-pc-windows-gnu # This fails with the error below.

I expected to see this happen: explanation
The build to work. Note that plain "build" still works, it is just "test" and "test --no-run" that no longer works on nightly.

Instead, this happened: explanation

  = note: /usr/bin/x86_64-w64-mingw32-ld: cannot find -lsynchronization
          collect2: error: ld returned 1 exit status

(full log from CI run where this happened attached: mingw-broken.txt)

Meta

rustc --version --verbose:

$ rustc --version --verbose
rustc 1.78.0-nightly (46b180ec2 2024-03-08)
binary: rustc
commit-hash: 46b180ec2452d388c5d9c14009442e2e0beb01d7
commit-date: 2024-03-08
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 18.1.0


$ cross +nightly --version --verbose
cross 0.2.5
+ cargo +nightly metadata --format-version 1
+ rustc --print sysroot
+ rustup toolchain list
[cross] warning: using newer rustc `1.78.0-nightly (46b180ec2 2024-03-08)` for the target. Current active rustc on the host is `rustc 1.76.0 (07dca489a 2024-02-04)`.
 > Update with `rustup update`
+ rustup target list --toolchain nightly-x86_64-unknown-linux-gnu
+ rustup component list --toolchain nightly-x86_64-unknown-linux-gnu
[cross] note: Falling back to `cargo` on the host.
+ cargo +nightly --version --verbose
cargo 1.78.0-nightly (a4c63fe53 2024-03-06)
release: 1.78.0-nightly
commit-hash: a4c63fe5388beaa09e5f91196c86addab0a03580
commit-date: 2024-03-06
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Arch Linux Rolling Release [64-bit]
Backtrace

This doesn't seem applicable?

@VorpalBlade VorpalBlade added the C-bug Category: This is a bug. label Mar 9, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 9, 2024
@VorpalBlade
Copy link
Author

I don't know for sure if this is a rustc bug, a cross bug or a bug with mingw. But since the only variable I'm changing is rustc version, I'm inclined to believe it is a rustc bug.

@mati865
Copy link
Contributor

mati865 commented Mar 9, 2024

It looks like a regression from #121317.
It might be a cross bug because the library has been present in mingw-w64 and Rust's rust-mingw component for years. I'll test it later.

@VorpalBlade
Copy link
Author

Apparently cross are treating it as their bug: cross-rs/cross#1453

@mati865
Copy link
Contributor

mati865 commented Mar 9, 2024

Great, I think there is no reason to keep this issue open.

@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants