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

Windows fixes #1195

Closed
wants to merge 12 commits into from
Closed

Windows fixes #1195

wants to merge 12 commits into from

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Aug 29, 2021

Fixes the issues found in https://github.com/bjorn3/rustc_codegen_cranelift/issues/1193. This still needs testing on CI.
cc @EndilWayfare

@EndilWayfare
Copy link

./test.sh initially fails with

[BUILD] mini_core
C:/Users/{redacted}/rustc_codegen_cranelift/build/bin/cg_clif.exe: error while loading shared libraries: rustc_codegen_cranelift.dll: cannot open shared object file: No such file or directory

Copying rustc_codegen_cranelift.dll to the repo root fixes that. :/


Then it fails with
[BUILD] mini_core
C:/Users/{redacted}/rustc_codegen_cranelift/build/bin/cg_clif.exe: error while loading shared libraries: std-77774f43f6f43ae2.dll: cannot open shared object file: No such file or directory

Weird, the toolchain's not on the path? Adding

export RUST_SYSROOT="$(readlink -f ~)/.rustup/toolchains/nightly-2021-08-25-x86_64-pc-windows-gnu"
PATH="$RUST_SYSROOT/bin:$PATH"

at the begging of test.sh fixes that. Strangely, it also fixes the rustc_codegen_cranelift.dll problem above; it's not necessary to copy the .dll, or even add build/bin to PATH, apparently...


Then it fails with
[BUILD] rustc_codegen_cranelift
// ...
   Compiling rustc_codegen_cranelift v0.1.0 (C:\Users\{redacted}\rustc_codegen_cranelift)
    Finished release [optimized] target(s) in 1.12s
error: environment variable `RUSTUP_TOOLCHAIN` not defined
  --> scripts/cargo-clif.rs:37:38
   |
37 |     env::set_var("RUSTUP_TOOLCHAIN", env!("RUSTUP_TOOLCHAIN"));
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)

export RUSTUP_TOOLCHAIN=nightly-2021-08-25-x86_64-pc-windows-gnu


Then `[TEST] rust-random/rand` fails:
     Running unittests (target\debug\deps\rand_distr-97e69b0a61466c32.exe)

running 50 tests
test dirichlet::test::test_dirichlet_invalid_length - should panic ... ok
test binomial::test::test_binomial_invalid_lambda_neg - should panic ... ok
// ...
test pareto::tests::sample ... ok
test pareto::tests::value_stability ... FAILED
test pert::test::test_pert ... ok
// ...
test weighted_alias::test::test_weighted_index_u8 ... ok
test weighted_alias::test::test_weighted_index_i128 ... ok
test weighted_alias::test::test_weighted_index_u128 ... ok

failures:

---- pareto::tests::value_stability stdout ----
---- pareto::tests::value_stability stderr ----
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `[9.019295276219138, 4.3097126018270595, 6.837815045397156, 105.8826669383772]`,
 right: `[9.019295276219136, 4.3097126018270595, 6.837815045397157, 105.8826669383772]`', rand_distr\src\pareto.rs:119:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    pareto::tests::value_stability

test result: FAILED. 49 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.23s

Huh. Well that's certainly odd. I have no idea why rand isn't producing stable values, so that's where I'm stuck.

Windows uses PDB instead of DWARF and using DWARF debuginfo causes the linker to give an error
@bjorn3
Copy link
Member Author

bjorn3 commented Aug 28, 2022

Closing as outdated. Some parts have been fixed through the rewrite of the test harness in rust (by @afonso360) the rest had already landed on master I believe. There are still a couple of remaining issues for full Windows support though.

@bjorn3 bjorn3 closed this Aug 28, 2022
@bjorn3 bjorn3 deleted the windows_fixes branch August 28, 2022 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants