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

wineWowPackages do not build on darwin x86_64 #137734

Open
maisem opened this issue Sep 14, 2021 · 10 comments
Open

wineWowPackages do not build on darwin x86_64 #137734

maisem opened this issue Sep 14, 2021 · 10 comments
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin

Comments

@maisem
Copy link
Contributor

maisem commented Sep 14, 2021

Describe the bug

wineWowPackages.stable doesn't build on x86_64-darwin

❯ nix-env -iA nixpkgs.wineWowPackages.stable
installing 'wine-wow-6.0'
error: Multilib clang-7.1.0 not supported for 'x86_64-darwin'
(use '--show-trace' to show detailed location information)

Steps To Reproduce

Steps to reproduce the behavior:

  1. on darwin with nixpkgs run
    nix-env -iA nixpkgs.wineWowPackages.stable

Expected behavior

Expected wine to install properly

Additional context

Problem looks to be stemming from

map (x: "${lib.getLib x}/lib") ([ stdenv.cc.cc ] ++ buildInputs)

https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/emulators/wine/base.nix#L92

Notify maintainers

@avnik @raskin @bendlas

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-darwin"`
 - host os: `Darwin 20.3.0, macOS 10.16`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.4pre20210326_dd77f71`
 - channels(maisem): `"darwin, home-manager-20.09, nixpkgs-21.11pre294471.51bb9f3e9ab"`
 - channels(root): `"darwin, nixpkgs-21.05pre278688.c0e88185200"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@maisem maisem added the 0.kind: bug Something is broken label Sep 14, 2021
@Artturin Artturin added the 6.topic: darwin Running or building packages on Darwin label Sep 14, 2021
@bendlas
Copy link
Contributor

bendlas commented Sep 15, 2021

WineWOW needs a multilib compiler, because it compiles both 32 and 64 bit code in a single build. If nix on darwin doesn't provide that, that would be the place to start.

Unfortunately, I don't have a mac and know little about how nix works on it.

Do wine32 and wine64 both work?

@reckenrode
Copy link
Contributor

Since the 10.14 SDK, it’s not possible to link 32-bit applications on Darwin. While x86_64-darwin is currently using the 10.12 SDK, I don’t know whether it can link 32-bit applications either. The future will be using Wine’s new WoW64 support. However, from what I understand, it doesn’t yet support Darwin.

@Atemu
Copy link
Member

Atemu commented Mar 7, 2023

What's the status on this?

IIRC Wine upstream should support WoW on Darwin now.

@reckenrode
Copy link
Contributor

I’ve read the conversion is not quite done yet, but it wouldn’t hurt to try building it anyway. The previous failures were during the build, so any problems should be obvious right away. I can look at it sometime this week.

@reckenrode
Copy link
Contributor

I haven’t had a chance to take a look at it, and I’m currently trying to figure out how/what broke when I upgraded to macOS 13.3 yesterday, so I’m not sure when I’ll get a chance. From looking at the Wine bugtracker, it appears it works for some things but is experimental and not quite ready (e.g., https://bugs.winehq.org/show_bug.cgi?id=54367 and https://bugs.winehq.org/show_bug.cgi?id=54442).

@reckenrode
Copy link
Contributor

@Gcenx pinged me regarding a set of out of tree patches to make this work on Darwin. There are some caveats (e.g., printing is disabled), but it would allow some 32-bit Windows applications to run using Wine from nixpkgs.

@reckenrode
Copy link
Contributor

The WoW64 packages now build on Darwin. Is this still an issue?

@Atemu
Copy link
Member

Atemu commented Oct 3, 2024

The title of this issue is that they did not build. If they build now then this issue is resolved.

@bendlas
Copy link
Contributor

bendlas commented Oct 3, 2024

The title of this issue is that they did not build. If they build now then this issue is resolved.

WoW64 != WoW

Though I think WoW64 is the future of wine, so we might do without WoW

EDIT though IIUC, WoW64 is still somewhat experimental ...

@reckenrode
Copy link
Contributor

The title of this issue is that they did not build. If they build now then this issue is resolved.

The problem is WoW builds 32-bit libraries, which is effectively impossible in nixpkgs with our tooling. After 24.11 is released, the minimum version will be updated to 11.0, which does not support 32-bit at an OS level. Even if the WoW packages could be built, they wouldn’t work.

Wine has to take special steps to run 32-bit code on macOS 10.15 and newer. The supported way to do that is using WoW64. CrossOver used to use a different way that required a custom clang, but I don’t think they use that anymore.

Given the above, the question is whether WoW64 is an acceptable solution. If not, then this should be closed wontfix because it’ll never be implemented in nixpkgs for Darwin.

Once #346043 is merged, I’ll be updating Wine to use the 14.4 SDK to take advantage of an API (when available) added in 14.4 for improved futex support. The 14.4 SDK definitely does not support building for 32-bit Darwin. It won’t even eval for it.

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 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

No branches or pull requests

5 participants