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

cargo test error in windows #11668

Closed
ANOLASC opened this issue Feb 2, 2023 · 3 comments
Closed

cargo test error in windows #11668

ANOLASC opened this issue Feb 2, 2023 · 3 comments
Labels
C-bug Category: bug

Comments

@ANOLASC
Copy link

ANOLASC commented Feb 2, 2023

Problem

While running cargo test in nightly, it failed with

error: test failed, to rerun pass `--lib`

Caused by:
  process didn't exit successfully: `my_path.exe` (exit code: 0xc0000135, STATUS_DLL_NOT_FOUND)

I 'm in nightly build, and my test code is:

 #[test]
 fn success() {
     assert_eq!(1, 1);
 }

my config.toml:

[build]
rustflags = "-Cdebuginfo=2 -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
# rustflags = "-Cinstrument-coverage"
incremental = false

[env]
LLVM_PROFILE_FILE = "test-%p-%m.profraw"

Steps

Run "cargo test" can trigger this problem in nightly build.

Possible Solution(s)

  1. Put it into visual studio and debug it
  2. visual studio show that it miss "mrmsupport.dll"
  3. copy the "mrmsupport.dll" which located in "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64" to the path that "my_path.exe" located and it works well

Notes

No response

Version

cargo 1.69.0-nightly (e84a7928d 2023-01-31)
release: 1.69.0-nightly
commit-hash: e84a7928d93a31f284b497c214a2ece69b4d7719
commit-date: 2023-01-31
host: x86_64-pc-windows-msvc
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:Schannel)
os: Windows 10.0.22621 [64-bit]
@ANOLASC ANOLASC added the C-bug Category: bug label Feb 2, 2023
@z3r086

This comment was marked as duplicate.

@ehuss
Copy link
Contributor

ehuss commented Feb 6, 2023

Unfortunately I am unable to reproduce this issue with what is given. You may want to check if you have any environment variables set that may influence the build. mrmsupport.dll seems related to some Windows app package resource support, which is not something that Rust would use by default.

Unfortunately we are unable to provide support here for helping with issues. I suggest you try one of the user forums such as https://users.rust-lang.org/ to see if someone can help.

@weihanglo
Copy link
Member

Closing since it doesn't look like an issue of Rust itself, and there has been no response for a period. If you figure out it is very likely a bug of Rust or Cargo, please share an example that can reproduce on people's machines. Thank you.

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

4 participants