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

electron-cash: 3.1.6 -> 3.3.1 #43390

Merged
merged 4 commits into from Sep 23, 2018

Conversation

nyanloutre
Copy link
Member

Motivation for this change

Upgrade electron-cash to version 3.3

Unfortunately it's more complicated than expected.

Here is the error I get :

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-org.kde.kwin.qpa, minimal, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

If somebody could help me debug this, I would be very glad !

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@infinisil
Copy link
Member

See #44047 and #24256, it's a common qt issue. Maybe wrapping it with qt5.qtbase somehow will fix it. Ping @samueldr

@samueldr
Copy link
Member

samueldr commented Jul 30, 2018

Using this gross workaround I just thought of I am able to run most Qt apps in that situation. This update seems to run fine with this. (Read the comments in the gist for details about how.)

~/tmp/nixpkgs/nixpkgs-43390 $ nix-verify -A electron-cash
 $ exec env -i NIXPKGS_ALLOW_UNFREE=1 nix-build -A electron-cash
/nix/store/0s68rakzip5ghigvivgx184kzcx2f52j-electron-cash-3.3

~/tmp/nixpkgs/nixpkgs-43390 $ qt-run result/bin/electron-cash

This gets the thumbs-up of probably working as-designed. (It probably works when used in a profile or environment when other Qt apps work.)

EDIT: This works when HEAD is at the author's commit, 223bde8ff697a4b521bc08865098a680ca0a7f9d comitted 27 days ago; as per ofborg's output, looks like a dependency broke meanwhile on master?

@samueldr
Copy link
Member

@GrahamcOfBorg build electron-cash

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: electron-cash

Partial log (click to expand)

  File "/nix/store/pyvd05namlbgacai4vr5xcpy5wlhhcb2-python3.6-bootstrapped-pip-18.0/lib/python3.6/site-packages/setuptools/dist.py", line 581, in fetch_build_egg
    return cmd.easy_install(req)
  File "/nix/store/pyvd05namlbgacai4vr5xcpy5wlhhcb2-python3.6-bootstrapped-pip-18.0/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 670, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-markdown')
builder for '/nix/store/259lk8n561lxni9j6vpiwpcxlhiifdv9-python3.6-rlp-1.0.1.drv' failed with exit code 1
cannot build derivation '/nix/store/xy5cxkqqzsczh8kjx4vvzgl919lb9rmm-python3.6-trezor-0.10.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/8240rwwx3qx2h802vqf06l5pncy8vbkd-python3.6-keepkey-4.0.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/8hhk9fqw1258rwkjjnhxr0spagclx7ga-electron-cash-3.3.drv': 2 dependencies couldn't be built
error: build of '/nix/store/8hhk9fqw1258rwkjjnhxr0spagclx7ga-electron-cash-3.3.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: electron-cash

Partial log (click to expand)

[7008/16620] CXX obj/third_party/webrtc/rtc_base/rtc_base_generic/asyncpacketsocket.o
[7009/16620] CXX obj/third_party/webrtc/p2p/rtc_p2p/packetlossestimator.o
[7010/16620] CXX obj/third_party/webrtc/modules/rtp_rtcp/rtp_rtcp/ulpfec_receiver_impl.o
[7011/16620] CXX obj/third_party/webrtc/rtc_base/rtc_base_generic/asynctcpsocket.o
[7012/16620] CXX obj/third_party/webrtc/modules/rtp_rtcp/rtp_rtcp/forward_error_correction_internal.o
[7013/16620] CXX obj/third_party/webrtc/rtc_base/rtc_base_generic/messagedigest.o
building of '/nix/store/3kd7fwwh5jbqajjir6q7zc1ra1c03qvy-qtwebengine-5.11.1.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/s97r7fq8p8in3blhz0vqi6iy8k7rgxkj-python3.6-PyQt-5.10.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/j97i0vlyqy1hb40db7p2bwapmkmb7gll-electron-cash-3.3.drv': 3 dependencies couldn't be built
error: build of '/nix/store/j97i0vlyqy1hb40db7p2bwapmkmb7gll-electron-cash-3.3.drv' failed

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: electron-cash

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@nyanloutre nyanloutre force-pushed the pythonApplication.electron-cash.3.3 branch from 223bde8 to bda3a47 Compare September 12, 2018 15:38
@nyanloutre nyanloutre changed the title WIP electron-cash: 3.1.6 -> 3.3 WIP electron-cash: 3.1.6 -> 3.3.1 Sep 12, 2018

substituteInPlace $out/share/applications/electron-cash.desktop \
--replace "Exec=electron-cash %u" "Exec=$out/bin/electron-cash %u"

wrapProgram $out/bin/electron-cash \
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins
Copy link
Member

@samueldr samueldr Sep 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this may make the applications work, this is something that will need to be cleaned up after an actual fix is built into nixpkgs, such as #44047. (Nothing to do, just remarking; this will cross-reference in the PR.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it was meant to be a temporary fix

@nyanloutre
Copy link
Member Author

@samueldr would this be acceptable to merge this as is, while waiting for your better fix ?

@samueldr
Copy link
Member

samueldr commented Sep 23, 2018

I'm not fond of the idea of wrapping Qt executables to work around the issue, but I think that making the thing usable on mis-matched Qt is better than it not working. Sideway thumb for the Qt wrapper. As far as updating the package, seems alright.

EDIT: JUST in case, I was about to click the "Merge pull request" button; your title still has WIP in it. Is it still in WIP @nyanloutre?

@nyanloutre
Copy link
Member Author

@samueldr I will just add a commentary above the wrapper definition, so it's not left there in the future. I will remove the WIP title when I am done and ping you

@nyanloutre nyanloutre force-pushed the pythonApplication.electron-cash.3.3 branch from dae34ea to 1004dae Compare September 23, 2018 16:50
@nyanloutre nyanloutre changed the title WIP electron-cash: 3.1.6 -> 3.3.1 electron-cash: 3.1.6 -> 3.3.1 Sep 23, 2018
@nyanloutre
Copy link
Member Author

@samueldr done, everything is working fine, thanks for the help !

Copy link
Member

@samueldr samueldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, didn't need the reminder, but is fine with; makes it more obvious to a future contributor why this is there.

@samueldr samueldr merged commit fd2b54b into NixOS:master Sep 23, 2018
@nyanloutre nyanloutre deleted the pythonApplication.electron-cash.3.3 branch October 2, 2018 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants