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

winetricks: not working on WoW64 wine build, detection mechanism fails due to wrapper scripts #338367

Open
osvein opened this issue Aug 30, 2024 · 4 comments
Labels
0.kind: bug Something is broken

Comments

@osvein
Copy link

osvein commented Aug 30, 2024

Describe the bug

winetricks doesn't work with wineWow64Packages.

winetricks fails to identify that the wine build is WoW64-enabled and tries to run wine64, which doesn't exist on WoW64 builds. The detection mechanism works by examining the architecture of the wine and wineserver binaries. This fails on NixOS because the real binaries are renamed to .wine and .wineserver. winetricks tries to examine the environment wrapper scripts instead, which obviously doesn't work.

The detection mechanism is implemented in the winetricks_get_file_arch procedure in winetricks, which is called from winetricks_set_wineprefix.

Steps To Reproduce

Steps to reproduce the behavior:

  1. $ nix shell nixpkgs#wineWow64Packages.minimal nixpkgs#winetricks
  2. $ winetricks

Expected behavior

winetricks should show its GUI and log this warning message to stderr:

You apppear to be using Wine's new wow64 mode. Note that this is EXPERIMENTAL and not yet fully supported. If reporting an issue, be sure to mention this.

Workaround

Create a link from wine64 to wine somewhere in your PATH.

Notify maintainers

winetricks blame (unmaintained): @vs49688
wine maintainers: @avnik @7c6f434c @bendlas @jmc-figueira @reckenrode

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.46, NixOS, 24.05 (Uakari), 24.05.20240822.797f7dc`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos-24.05"`
 - nixpkgs: `/nix/store/5z81la6av4j0ckp0w1949lxiwjyyykks-source`

Add a 👍 reaction to issues you find important.

@osvein osvein added the 0.kind: bug Something is broken label Aug 30, 2024
@bendlas
Copy link
Contributor

bendlas commented Aug 30, 2024

ping @K900 do you have any insight on this?

@K900
Copy link
Contributor

K900 commented Aug 30, 2024

That's to be expected, winetricks just needs to be fixed.

@osvein
Copy link
Author

osvein commented Aug 30, 2024

Upstream issue Winetricks/winetricks#2183 has been open for 7 months. The issue is difficult to solve for all distributions. Can we make a patch for nix in the meantime?

@bendlas
Copy link
Contributor

bendlas commented Sep 1, 2024

Create a link from wine64 to wine somewhere in your PATH.

Looking at the original diff of the relevant change I was not sold on this workaround (since not only we'll be pretending to be a wine64 build, but also what about old-/new-style wow?), but looking at the follow-up, it looks like they made provisions for this case, and if debian is depending on this behavior, then they'll probably not change it overnight ...

Would we also need to do the same for wineserver64?

Can we make a patch for nix in the meantime?

I'm certainly willing to review, if one gets made :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants