diff --git a/packaging/dependencies.nix b/packaging/dependencies.nix index dda9ef8dc..17ba06b4d 100644 --- a/packaging/dependencies.nix +++ b/packaging/dependencies.nix @@ -50,9 +50,19 @@ scope: { requiredSystemFeatures = [ ]; }; - boehmgc = pkgs.boehmgc.override { - enableLargeConfig = true; - }; + boehmgc = + (pkgs.boehmgc.override { + enableLargeConfig = true; + }).overrideAttrs + (attrs: { + # Increase the initial mark stack size to avoid stack + # overflows, since these inhibit parallel marking (see + # GC_mark_some()). To check whether the mark stack is too + # small, run Nix with GC_PRINT_STATS=1 and look for messages + # such as `Mark stack overflow`, `No room to copy back mark + # stack`, and `Grew mark stack to ... frames`. + NIX_CFLAGS_COMPILE = "-DINITIAL_MARK_STACK_SIZE=1048576"; + }); # TODO Hack until https://github.com/NixOS/nixpkgs/issues/45462 is fixed. boost =