mozilla/nixpkgs-mozilla

Firefox-nightly 96.0a1 fail to start on NixOS 21.05

codelamb opened this issue · 7 comments

...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

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

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

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

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.

Maybe this could help?
Quote:

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

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