-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-windows-gnuToolchain: GNU, Operating system: WindowsToolchain: GNU, Operating system: WindowsP-highHigh priorityHigh priorityT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
I saw this failure in rayon CI: https://ci.appveyor.com/project/cuviper/rayon/builds/29634901/job/y7h1kc7w9wsusl8r
info: syncing channel updates for 'beta-x86_64-pc-windows-gnu'
info: latest update on 2019-12-18, rust version 1.41.0-beta.1 (eb3f7c2d3 2019-12-17)
[...]
beta installed - (error reading rustc version)
Rust is installed now. Great!
To get started you need Cargo's bin directory (%USERPROFILE%.cargo\bin) in your
PATH
environment variable. Future applications will automatically have the
correct environment, but you may need to restart your current shell.
set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
rustc -Vv
Command exited with code -1073741515
I'm on Linux, but I tried this build under Wine:
005b:err:module:import_dll Library libstdc++-6.dll (which is needed by L"Z:\\home\\jistone\\.rustup\\toolchains\\beta-x86_64-pc-windows-gnu\\bin\\rustc_driver-2602f879d4c5def3.dll") not found
005b:err:module:import_dll Library rustc_driver-2602f879d4c5def3.dll (which is needed by L"Z:\\home\\jistone\\.rustup\\toolchains\\beta-x86_64-pc-windows-gnu\\bin\\rustc.exe") not found
005b:err:module:LdrInitializeThunk Importing dlls for L"Z:\\home\\jistone\\.rustup\\toolchains\\beta-x86_64-pc-windows-gnu\\bin\\rustc.exe" failed, status c0000135
It seems @mati865's intention in #65911 was that this should be statically linked, but that was clobbered by #67077 in src/bootstrap/compile.rs
at least.
The same error occurs on 1.41.0-nightly (3ed3b8bb7 2019-12-17)
(via Wine again for me).
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-windows-gnuToolchain: GNU, Operating system: WindowsToolchain: GNU, Operating system: WindowsP-highHigh priorityHigh priorityT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
mati865 commentedon Dec 18, 2019
Probably the culprit is here: https://github.com/rust-lang/rust/pull/67077/files#r359557571
mati865 commentedon Dec 18, 2019
As immediate workaround I suggest adding
libstdc++-6.dll
to the PATH, it should be installed on most of the Windows CI.tan-wei commentedon Dec 19, 2019
@mati865 Thanks! It works.
pnkfelix commentedon Dec 19, 2019
triage: P-high, has PR, removing nomination.
binarycrusader commentedon Dec 19, 2019
Sadly, that didn't work for me:
"The procedure entry point _ZNSt13__future_base12_Result_baseC2Ev could not be located in the dynamic link library C:\Users\xxx\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\bin\rustc_driver-3aaebb9b017b7498.dll."
Just posting as an FYI, not expecting a solution.
Rollup merge of rust-lang#67410 - mati865:mingw_link_fix, r=Mark-Simu…
Rollup merge of rust-lang#67410 - mati865:mingw_link_fix, r=Mark-Simu…
Rollup merge of rust-lang#67410 - mati865:mingw_link_fix, r=Mark-Simu…
mati865 commentedon Dec 27, 2019
FWIW it was fixed in nightly but not yet in beta.
John-Nagle commentedon Mar 13, 2022
Did this fix make it into stable? I'm getting that error in rustc 1.59.0 (9d1b210 2022-02-23).
Cross-compiling from Linux:
cargo build --target x86_64-pc-windows-gnu --examples
Trying to run under Wine 7.0.
Wine error messages:
Please, statically link this stuff.
(Trying to find the correct version of
libstdc++-6.dll
. MinGW has four different versions. Correct versions seem to be the ones in 9.3.win32)mati865 commentedon Mar 13, 2022
It was linked statically in the past, must be regression.
Does it work on other versions for you?
There are 2 versions shipped in Ubuntu: posix and win32. Posix is the correct one.
BTW those libraries come from GCC, not MinGW.
mati865 commentedon Mar 13, 2022
Upon closer inspection you are not having problem running rustc but with artifacts built with rustc.
In this case this entirely different issue and you need to find which crate in your dependency tree has linked dynamic libstdc++.
John-Nagle commentedon Mar 14, 2022
Yes. I was using a deprecated package that pulled in some DLLs. Once I got rid of that package, the problem disappeared.
hydra commentedon Mar 28, 2022
@John-Nagle two questions: 1) how did you find the offending package, 2) which one was it? I'm getting the same thing on
rustc 1.61.0-nightly (6a7055661 2022-02-27)
John-Nagle commentedon Mar 28, 2022
Looked through the build logs with "grep" for the package name.
hydra commentedon Mar 28, 2022
I couldn't find a specific dependency that caused the issue, but upgrading rust from
rustc 1.61.0-nightly (6a7055661 2022-02-27)
torustc 1.61.0-nightly (1d9c262ee 2022-03-26)
fixed it for me.