| 24 Nov 2023 |
hexa | ok, so firefox 120.0 isn't crashing for me exactly | 14:34:44 |
hexa | but webgl support is failing with | 14:34:52 |
hexa |
Status: WebGL creation failed: * WebglAllowWindowsNativeGl:false restricts context creation on this system. () * Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS)
| 14:34:56 |
hexa | so I'm having a hard time to reproduce | 14:35:12 |
nbp | I was able to reproduce the issue earlier. I can try patches if needed. | 14:35:37 |
@yannis:mozilla.org | Also nm -D can be used first to distinguish good builds from bad builds if you can't reproduce. | 14:37:53 |
hexa | $ nm -D result/bin/.firefox-wrapped| grep _S_initialize
00000000000c55c0 T _ZNSt6locale13_S_initializeEv
00000000000c5560 T _ZNSt6locale18_S_initialize_onceEv
00000000000c2860 T _ZNSt6locale5facet18_S_initialize_onceEv
| 14:44:09 |
hexa | ok, the T here is bad | 14:44:16 |
hexa | diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index aadbb32d6e02..7a00670ebc44 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -497,6 +497,8 @@ buildStdenv.mkDerivation ({
preBuild = ''
cd mozobj
+ '' + lib.optionalString (stdenv.cc.isGNU) ''
+ export NIX_LDFLAGS="-L${stdenv.cc.cc.lib}/lib"
'' + lib.optionalString (lib.versionAtLeast version "120") ''
# https://bugzilla.mozilla.org/show_bug.cgi?id=1864083
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)"
| 14:44:38 |
hexa | * diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index aadbb32d6e02..7a00670ebc44 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -497,6 +497,8 @@ buildStdenv.mkDerivation ({
preBuild = ''
cd mozobj
+ '' + lib.optionalString stdenv.cc.isGNU ''
+ export NIX_LDFLAGS="-L${stdenv.cc.cc.lib}/lib"
'' + lib.optionalString (lib.versionAtLeast version "120") ''
# https://bugzilla.mozilla.org/show_bug.cgi?id=1864083
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)"
| 14:44:52 |
hexa | this is the patch I'm trying | 14:44:58 |
hexa |
ld.lld: error: unable to find library -lz
| 15:31:48 |
hexa | looks like that breaks things | 15:31:56 |
nbp | probably because it replaces the one which are set by having buildInputs. | 15:32:37 |
hexa | the only ldflags hackery on firefox is for musl | 15:32:39 |
hexa | oh possibly | 15:32:51 |
hexa | https://github.com/NixOS/nixpkgs/pull/267737 was just merged fwiw | 15:35:21 |
nbp | I fetching staging-23.05 and I will soon start to rebuild the world. | 15:47:08 |
nbp | * I fetched staging-23.05 and I will soon start to rebuild the world. | 15:47:15 |
hexa | oh no 😄 good luck | 15:47:32 |
hexa | still testing the more localized approach | 15:47:42 |
nbp | I saw all the tarball being downloaded, so I read the man page to learn about the --builders "ssh://beefy-machine x86_64-linux" trick | 15:48:40 |
hexa | it was highly effective? | 15:49:00 |
hexa | there is also the -j0 trick, so that you can keep doing on your local machine whatever it was you were doing 🙂 | 15:49:15 |
nbp | I have not yet finished downloading everything … 🙄 | 15:49:34 |
hexa | also nix.settings.builders-use-substitutes = true | 15:50:07 |
nbp | well it is not always on | 15:50:19 |
hexa | yeah, but you don't want to download everything to your local machine, just to then push it to your builder | 15:50:51 |
hexa | well at least for things that can be substituted, which is probably not much on a linux stdenv rebuild | 15:51:08 |
hexa | so nvm | 15:51:13 |