-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Regression: linker error 1120 on Windows / Beta #140555
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
Comments
I believe this is due to #138233, tracked for release notes in #138621.
|
Yeah, I believe this is a duplicate of #139352 which was already considered accepted breakage by the library team -- std no longer links advapi32, so user code will have to explicitly link it. |
To be clear, it is always expected for C/C++ libraries to declare their dependencies. Relying on implementation details of the standard library for linking is inherently unstable. |
Thank you all for the responses. I will go update our build script to link against advapi32. |
Your build scripts are probably missing sth like (untested) println!("cargo:rustc-link-lib=advapi32"); |
I'm one of the maintainers of liboqs, an open-source C library for post-quantum cryptography. One of our other projects is a Rust wrapper for the library. We run tests in CI on Linux / Mac / Windows with Stable / Beta / Nightly Rust.
Some time ago, our Windows / Nightly builds started failing with what appears to be a linker error. I am fairly certain that this is due to a change in Rust, as CI had previously passed on the same commit, and I don't believe there were any GitHub runner updates. The same error is now causing our Beta Rust builds to fail. These had previously passed, which seems to confirm that it is indeed a change in Rust triggering the failure.
I am unfortunately out of my depth when dealing with the intricacies of Rust and Windows, but I thought it best to report it here.
Code
Here is a failing GitHub Actions run. I've also copied the relevant portion of the logs below in the backtrace section.
I expected the build to pass, as it had previously on the same commit.
Version it worked on
It most recently worked on: beta-x86_64-pc-windows-msvc - rustc 1.86.0-beta.7 (7824ede 2025-03-22)
Version with regression
beta-x86_64-pc-windows-msvc - rustc 1.87.0-beta.4 (a594829 2025-04-12)
Backtrace
Backtrace
The text was updated successfully, but these errors were encountered: