NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.8k stars 13.91k forks source link

Hyper has missing libraries #105961

Open wmertens opened 3 years ago

wmertens commented 3 years ago

Describe the bug

$ ldd /nix/store/6kqlskryk7a6cg9gl364l077p2503yaz-hyper-3.0.2/bin/hyper |grep not\ found
    libnode.so => not found
    libgtk-3.so.0 => not found
    libgdk-3.so.0 => not found
    libatk-bridge-2.0.so.0 => not found
    libffmpeg.so => not found

To Reproduce

nix-shell -p hyper --run hyper

Notify maintainers

@puffnfresh

Metadata

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: hyper
SCOTT-HAMILTON commented 3 years ago

Can't reproduce with neither of channels given with your metadata.

wmertens commented 3 years ago

@SCOTT-HAMILTON what does your ldd return for libffmpeg, for example?

Can you try the nix-shell with the --pure parameter? nix-shell --pure -p hyper --run hyper

SCOTT-HAMILTON commented 3 years ago

Ohh, my mistake, I read this too quick, I just tried to run it and thought you couldn't run it because of those missing libraries. But seems like it can run without them. So yes I can reproduce it.

This should be fixed with an autoPatchelfHook.

SCOTT-HAMILTON commented 3 years ago

Working on a patch as described above, I've fixed the not found libraries but now hyper crashes :


(hyper:32654): Gtk-WARNING **: 20:39:56.541: Theme parsing error: gtk.css:2:33: Failed to import: Erreur lors de l’ouverture du fichier /home/scott/.config/gtk-3.0/window_decorations.css : No such file or directory
Gtk-Message: 20:39:56.575: Failed to load module "colorreload-gtk-module"
A JavaScript error occurred in the main process
Uncaught Exception:
Error: `node-pty` failed to load. Typically this means that it was built incorrectly. Please check the `readme.md` to more info.
    at createNodePtyError (/nix/store/k740vbjym8ga6qsinyvs8an94k2gq0wn-hyper-3.0.2/opt/Hyper/resources/app.asar/session.js:11:3)
    at Object.<anonymous> (/nix/store/k740vbjym8ga6qsinyvs8an94k2gq0wn-hyper-3.0.2/opt/Hyper/resources/app.asar/session.js:19:9)
    at Object.<anonymous> (/nix/store/k740vbjym8ga6qsinyvs8an94k2gq0wn-hyper-3.0.2/opt/Hyper/resources/app.asar/session.js:191:3)
    at Module._compile (internal/modules/cjs/loader.js:711:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
    at Function.Module._load (internal/modules/cjs/loader.js:551:3)
    at Function._load (/nix/store/k740vbjym8ga6qsinyvs8an94k2gq0wn-hyper-3.0.2/opt/Hyper/resources/app.asar/plugins.js:77:29)
    at Module.require (internal/modules/cjs/loader.js:658:17)
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
wmertens commented 3 years ago

Hmmm that node-pty error may be a nice module that isn't patched correctly?

The gtk warning seems like it may not be a problem.

But in any case, hyper doesn't work for me, so for me those libraries are required. Odd that it works for you, do you have a LD_LIBRARY_PATH set?

laikq commented 3 years ago

On my system, nix run nixpkgs#hyper and nix-build <nixpkgs> -A hyper failed because of the missing GTK and atk libraries. I needed to add at-spi2-atk to the makeLibraryPath list to make it work.

Isn't this package definition odd? Why does it use makeLibraryPath at all? And why doesn't it use wrapGAppsHook?

wmertens commented 3 years ago

I think it would be "more moral" to build Hyper from source. However, this is an Electron app. Anybody have experience with that?

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

dustinlacewell commented 2 years ago

@SCOTT-HAMILTON How did you resolve libnode.so?

jankaifer commented 1 year ago

After upgrading to latest nixos-unstable I'm not able to use hyper anymore. I got this:

Uncaught Exception:
Error: `node-pty` failed to load. Typically this means that it was built incorrectly. Please check the `readme.md` to more info.
    at createNodePtyError (/nix/store/w7xdsx4cpzvvlp2c85k89l1lgvn42mnl-hyper-3.4.1/opt/Hyper/resources/app.asar/session.js:39:34)
    at Object.<anonymous> (/nix/store/w7xdsx4cpzvvlp2c85k89l1lgvn42mnl-hyper-3.4.1/opt/Hyper/resources/app.asar/session.js:46:11)
    at Module._compile (node:internal/modules/cjs/loader:1120:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1175:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Function._load (/nix/store/w7xdsx4cpzvvlp2c85k89l1lgvn42mnl-hyper-3.4.1/opt/Hyper/resources/app.asar/plugins.js:103:37)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)

@SCOTT-HAMILTON have you resolved this?

jankaifer commented 1 year ago

Workaround: I just use stable version for now: https://github.com/JanKaifer/nixos/blob/9ff30a858aa9f7642d46b9c3e43c4c3a64264ad2/modules/gui.nix#L4-L9

EDIT: my config contains pinned commit. So it still works for me.

devpikachu commented 1 year ago

This is now happening on the stable 23.05

ljuzig commented 1 year ago

As of 06 August 2023 it's broken on both stable and unstable channel.

c4lliope commented 1 year ago

Here is the build-from-source recipe used by Arch Linux; AUR: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=hyper