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

Unable to test Wine i686/x86_64 targets on Windows Host under WSL2 #1277

Open
4 of 11 tasks
Sewer56 opened this issue Jun 12, 2023 · 1 comment
Open
4 of 11 tasks

Unable to test Wine i686/x86_64 targets on Windows Host under WSL2 #1277

Sewer56 opened this issue Jun 12, 2023 · 1 comment

Comments

@Sewer56
Copy link

Sewer56 commented Jun 12, 2023

Checklist

Describe your issue

Note: This is probably a WSL issue rather than a cross issue; but I am reporting this here for any soul that comes across the same issue with a working workaround (so people can find it when searching for issues). Then crossposting this to WSL issues.


OS: Win11 build 22621 (also tested on 23475)
WSL (Latest):

WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.23475.1000

On Windows, running Rust tests on a WSL based container (e.g. Docker+WSL2) or raw WSL leads to runtime errors; both on x86_64 and i686 targets. Appears to be an issue with test runner itself in this environment; the tested code has no effect on result.

Example:

    Finished test [unoptimized + debuginfo] target(s) in
 26.28s
     Running unittests src/lib.rs (/target/x86_64-pc-win
dows-gnu/debug/deps/reloaded_memory_buffers-13b5df74e878
54aa.exe)
0044:err:winediag:nodrv_CreateWindow Application tried t
o create a window, but no driver could be loaded.
0044:err:winediag:nodrv_CreateWindow Make sure that your
 X server is running and that $DISPLAY is set correctly.
0044:err:systray:initialize_systray Could not create tray window
00fc:err:virtual:virtual_setup_exception stack overflow 2704 bytes
in thread 00fc addr 0x170054b4a stack 0xed0570 (0xed0000-0xed1000-0
x10d0000)

Other Platforms/Backends

(for Reference)

Linux (Ubuntu VM):

Runs flawlessly.

vmplayer_K5MfbrPL1r

Docker inside WSL

Running cross inside WSL exhibits the same behaviour as Windows+Docker:

image


Workaround:

Today, the Windows install instructions specifically instruct you to install Docker with WSL2 backend.

You can work around this issue (for now) by being a rebel and doing the exact opposite:

image

(uncheck the box in Docker Desktop)

This should get tests successfully running under Wine:

image

What target(s) are you cross-compiling for?

x86_64-pc-windows-gnu

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.5

Example

# Make sure you have Docker/Podman first
rustup target add x86_64-pc-windows-gnu
cross build --target x86_64-pc-windows-gnu
cross test --target x86_64-pc-windows-gnu

Additional information / notes

No response

@Sewer56
Copy link
Author

Sewer56 commented Jun 12, 2023

This is a crosspost with: microsoft/WSL#10188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant