mozilla / nixpkgs-mozilla

Mozilla overlay for Nixpkgs.
MIT License
517 stars 128 forks source link

Firefox-nightly 96.0a1 fail to start on NixOS 21.05 #270

Closed codelamb closed 2 years ago

codelamb commented 2 years ago

...with error message:

/nix/store/l09zv2zxx1wg4mfrysjnb86yrdx502mf-firefox-bin-96.0a1/bin/.firefox-wrapped: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

configuration.nix follows guidelines

 nixpkgs.overlays =
  let
    # Change this to a rev sha to pin
    moz-rev = "master";
    moz-url = builtins.fetchTarball { url = "https://github.com/mozilla/nixpkgs-mozilla/archive/${moz-rev}.tar.gz";};
    nightlyOverlay = (import "${moz-url}/firefox-overlay.nix");
  in [
    nightlyOverlay
  ];
environment.systemPackages = with pkgs; [ latest.firefox-nightly-bin ];
nbp commented 2 years ago

I was not able to reproduce this issue. The firefox wrapper in Nixpkgs is in charge of providing the dependencies which are used by Firefox. Locally ldd reports the following:

libstdc++.so.6 => /nix/store/bz317974raly88wakps7h1y7p9l81hgz-gcc-10.3.0-lib/lib/libstdc++.so.6

Can you provide patchelf --print-rpath /nix/store/…/bin/.firefox-wrapped and ldd /nix/store/…/bin/.firefox-wrapped ?

nbp commented 2 years ago

Ok, I am able to reproduce this issue with the following command:

$ nix run -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/tags/21.05.tar.gz nixpkgs.latest.firefox-nightly-bin

So this seems to be specific to 21.05.

nbp commented 2 years ago

It seems that the latest change I made (commit cf58c4c) caused this problem. Also it seems that Firefox no longer depends on libXtst. I will remove this patch.

nbp commented 2 years ago

It seems that the latest change I made (commit cf58c4c) caused this problem. Also it seems that Firefox no longer depends on libXtst. I will remove this patch.

This was wrong, apparently testing with 21.05, this still seems necessary. So we have to find another way to set the libPath which is compatible with Nixpkgs 21.05.

Artturin commented 2 years ago

backported https://github.com/NixOS/nixpkgs/pull/144259#issuecomment-965134834 https://nixpk.gs/pr-tracker.html?pr=145356

codelamb commented 2 years ago

Maybe this could help? Quote:

Solution: add ${stdenv.cc.cc.lib}/lib/libstdc++.so.6to the LD_LIBRARY_PATH.

codelamb commented 2 years ago

It works now, but only after nix-channel --update which is probably the way to go.