-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Wine series3 #71216
Wine series3 #71216
Conversation
Don't merge master. Instead, rebase your changes on top of master. |
Is there an issue somewhere describing the problems? Here on our tracker and upstream? |
wine4 built with nix doesn't properly work on macOS. Further investigation is warrented, but in the mean time let's add wine3 back.
b44d5ad
to
fdd6937
Compare
fdd6937 is really just a missing dependency that nix doesn't provide. even though I was able to build wine4 on macOS Mojave with homebrew; it had the same runtime issues I've experienced with the wine4 built produced by nixpkgs. Those runtime issues mostly concern the execution of the |
Of note: I'd really like to see this back ported to at least
to make cross compiling of windows haskell applications viable on at least those two releases. |
in my opinion it is known that wine doesn't always work and can break certain applications from version to version. Unless we get more reports that things don't work, how about just keeping version 3 outside of Nixpkgs? |
@FRidh sorry, I'm confused. What do you mean by keeping it out of nixpkgs? wine used to be series 3 for long time, but was updated to wine 4 somewhere in 19.03 iirc; which magically started breaking infrastructure built on top of nixpkgs. We can already choose different "versions" of wine, by setting the |
https://github.com/nix-community/NUR is one good option for this
Still, we keep with the announced versions from https://www.winehq.org/ I'm all for pinning an older version, if it fixes a problem, especially if it doesn't require any separate configuration. A demonstration / documentation of the problem would be really helpful, though, ideally as an automated test. |
@bendlas well, the way the current wine package is structured with all it's nested If we I'll try to run the builds with |
@bendlas here's the error that wine keeps reporting with wine4 on macOS:
same derivation with wine3 does not produce this error. |
Yeah, wine is quite heavy. I don't have a beefy mac (or any for that matter), unfortunately. Maybe somebody in IRC does?
|
@bendlas so how are we going to move forward from here? Yes, I could c&p it all into my own expression. I'd rather not do this though. Especially as wine4 is broken on darwin. Is your stance that this is not going to go into nixpkgs? If so we can close this ticket; however having it open doesn't help me to make a decision either way. I'd really like to get off of custom nixpkgs forks at work. |
|
Basically, without a Mac, I can't verify the problem, nor the fix, so I might be the wrong person to help get this in. I'd need to make sure all the necessary work gets done, without being able to do it myself:
My stance is
I will add that we ship nixpkgs to all users, so the bar should be accordingly high. Maybe adding a I think there was feedback about
I can recommend overlays. The can replace many fork use cases. |
Haven't anything against adding series3 on its owns. But could we have simplified way, to inject any arbitrary wine version to build? Or maybe maintain all released wine versions as NUR? (I remember situation, when some apps/games require specific wine version)? (It also can help us maintain unstable/staging automatically, actually we can update them automatically on staging tag appear in their repo)
(I able to test only nixos/linux, not OSX) |
withdraw my note about "4.0.x", because patchset about 3.0.x, and not about 3.x. |
Well, after some thinking, and upcoming 5.0 release, I decide to approve this approach. I would add series4 myself, when 5.0 branch become new stable. (I myself have at least one application, which not work in upcoming 5.0). Also I would like to simplify injection of arbitrary wine release to build process, and make a NUR with all available wine releases. (just a note for future roadmap) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good for me.
(except darwin related cleanup, mentioned above)
fixed presumably in NixOS#63381
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
1265: Update nixpkgs channel to 19.09 r=rvl a=angerman # Overview This updates the nixpkgs version to 19.09 (latest stable release) from 19.03 (unsupported old release). # Details haskell.nix (as referenced in this repository) for the purpose of running CI, was using a custom nixpkgs-19.03 branch. It has been the goal for a while to upgrade from nixpkgs-19.03 to nixpkgs-19.09. Ideally to the stock upstream one without custom patches. This PR updates the nixpkgs-19.03 pin to nixpkgs-19.09 and fixes the issues (as encountered below) in haskell.nix. Subsequently this PR also contains a updated haskell.nix pin. The `w64` issue stems from nixpkgs changing the identifier for windows cross from `x86_64-pc-mingw32` to `x86_64-w64-mingw32` from nixpkgs 19.03 to 19.09. This interacts badly with the jormungandr reference for windows, and @rvl will take a look at that within cardano-wallet, as it can not be fixed in haskell.nix. # Comments Issues encountered: - [x] ```error: attribute 'series3' missing, at /nix/store/87zygi9fxvgqkdflsd5hmx947aj3mf1m-nixpkgs/pkgs/misc/emulators/wine/packages.nix:6:11``` This is due to missing NixOS/nixpkgs#71216 - [x] ```Unknown vendor: w64``` This seems to be due to jourmungandr using some 18.09git checkout, which doesn't sport the `w64` vendor, but uses `pc` instead. - [x] ```/nix/store/d7q2kp5saj7xd9wii7cyfis8y3s4d2sj-network-2.6.3.6-setup-x86_64-w64-mingw32/bin/Setup: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory``` Which is due to ``` ldd /nix/store/d7q2kp5saj7xd9wii7cyfis8y3s4d2sj-network-2.6.3.6-setup-x86_64-w64-mingw32/bin/Setup linux-vdso.so.1 (0x00007ffeb9369000) libm.so.6 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libm.so.6 (0x00007f7a4695c000) librt.so.1 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/librt.so.1 (0x00007f7a46952000) libutil.so.1 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libutil.so.1 (0x00007f7a4694d000) libdl.so.2 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libdl.so.2 (0x00007f7a46948000) libpthread.so.0 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libpthread.so.0 (0x00007f7a46927000) libgmp.so.10 => not found libffi.so.6 => not found libc.so.6 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libc.so.6 (0x00007f7a4676f000) /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/ld-linux-x86-64.so.2 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007f7a46af4000) ``` Which originated from NixOS/nixpkgs#56555 where `NIX_DONT_SET_RPATH` is now set on more leniently. This requires us to properly fix the build level we build the Setup.hs with in haskell.nix; it needs to come from the `buildPackages.stdenv`, not from the `stdenv`, which in the case of cross compilation would be the one for the final host. [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-1265) Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com> Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
1265: Update nixpkgs channel to 19.09 r=rvl a=angerman # Overview This updates the nixpkgs version to 19.09 (latest stable release) from 19.03 (unsupported old release). # Details haskell.nix (as referenced in this repository) for the purpose of running CI, was using a custom nixpkgs-19.03 branch. It has been the goal for a while to upgrade from nixpkgs-19.03 to nixpkgs-19.09. Ideally to the stock upstream one without custom patches. This PR updates the nixpkgs-19.03 pin to nixpkgs-19.09 and fixes the issues (as encountered below) in haskell.nix. Subsequently this PR also contains a updated haskell.nix pin. The `w64` issue stems from nixpkgs changing the identifier for windows cross from `x86_64-pc-mingw32` to `x86_64-w64-mingw32` from nixpkgs 19.03 to 19.09. This interacts badly with the jormungandr reference for windows, and @rvl will take a look at that within cardano-wallet, as it can not be fixed in haskell.nix. # Comments Issues encountered: - [x] ```error: attribute 'series3' missing, at /nix/store/87zygi9fxvgqkdflsd5hmx947aj3mf1m-nixpkgs/pkgs/misc/emulators/wine/packages.nix:6:11``` This is due to missing NixOS/nixpkgs#71216 - [x] ```Unknown vendor: w64``` This seems to be due to jourmungandr using some 18.09git checkout, which doesn't sport the `w64` vendor, but uses `pc` instead. - [x] ```/nix/store/d7q2kp5saj7xd9wii7cyfis8y3s4d2sj-network-2.6.3.6-setup-x86_64-w64-mingw32/bin/Setup: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory``` Which is due to ``` ldd /nix/store/d7q2kp5saj7xd9wii7cyfis8y3s4d2sj-network-2.6.3.6-setup-x86_64-w64-mingw32/bin/Setup linux-vdso.so.1 (0x00007ffeb9369000) libm.so.6 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libm.so.6 (0x00007f7a4695c000) librt.so.1 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/librt.so.1 (0x00007f7a46952000) libutil.so.1 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libutil.so.1 (0x00007f7a4694d000) libdl.so.2 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libdl.so.2 (0x00007f7a46948000) libpthread.so.0 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libpthread.so.0 (0x00007f7a46927000) libgmp.so.10 => not found libffi.so.6 => not found libc.so.6 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libc.so.6 (0x00007f7a4676f000) /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/ld-linux-x86-64.so.2 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007f7a46af4000) ``` Which originated from NixOS/nixpkgs#56555 where `NIX_DONT_SET_RPATH` is now set on more leniently. This requires us to properly fix the build level we build the Setup.hs with in haskell.nix; it needs to come from the `buildPackages.stdenv`, not from the `stdenv`, which in the case of cross compilation would be the one for the final host. [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-1265) Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com> Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change commit messages according to the guidelines https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md
They may read something like: "winePackages.wine3: init at 3.0.2" and "wine: fix darwin build"
@@ -12,6 +12,31 @@ let fetchurl = args@{url, sha256, ...}: | |||
pkgs.fetchFromGitHub { inherit owner repo rev sha256; } // args; | |||
in rec { | |||
|
|||
series3 = fetchurl rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you not going to add it to pkgs/top-level/wine-packages.nix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we could really use a comment with a list of upstream bugs that prevent wine 5 from working in your case.
pkgs/misc/emulators/wine/base.nix
Outdated
@@ -62,6 +62,8 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { | |||
++ lib.optionals stdenv.isDarwin (with pkgs.buildPackages.darwin.apple_sdk.frameworks; [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, drop this commit and the next one
# pass `-mmacosx-version-min` in the LDFLAGS, and end up with a linked | ||
# binary against 10.14 which *does* contain a __DATA,__dyld section and | ||
# then horribly fail to run on Mojave. | ||
postConfigure = lib.optional (stdenv.hostPlatform.isDarwin) '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work as well:
postConfigure = lib.optional (stdenv.hostPlatform.isDarwin) '' | |
makeFlags = lib.optional (stdenv.hostPlatform.isDarwin) "LDFLAGS=-mmacosx-version-min=10.7"; |
Otherwise replace optional
with optionalString
and please use substituteInPlace instead of sed as it prints warning if the original string is not found.
As mentioned in #68397, wine4 on macOS is busted. This adds a
series3
source for wine3 back in; it also adds the macOS system.