From 0976f9a6178877912443559955e98e5b67b3303b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 11 Aug 2023 20:43:24 +0100 Subject: [PATCH] liburing: backport upstream parallel build fix Without the change parallel build fails for me occasionally as: > CC liburing-ffi.so.2.4 > /nix/store/44xr71vsjfg2kz1hsxsq975day2fm12q-binutils-2.41/bin/ld: cannot find queue.os: No such file or directory > collect2: error: ld returned 1 exit status > make[1]: *** [Makefile:85: liburing-ffi.so.2.4] Error 1 shuffle=3560684383 > make[1]: *** Waiting for unfinished jobs.... > make[1]: Leaving directory '/build/liburing/src' > make: *** [Makefile:10: all] Error 2 shuffle=3560684383 --- pkgs/development/libraries/liburing/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix index 0f1757f4e61..5779389dda1 100644 --- a/pkgs/development/libraries/liburing/default.nix +++ b/pkgs/development/libraries/liburing/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchgit }: +{ lib, stdenv, fetchgit, fetchpatch }: stdenv.mkDerivation rec { pname = "liburing"; @@ -10,6 +10,16 @@ stdenv.mkDerivation rec { sha256 = "sha256-vbe9uh9AqXyPkzwD6zHoHH3JMeAJEl2FSGzny1T7diM="; }; + patches = [ + # Pull upstream fix for parallel build failures: + # https://github.com/axboe/liburing/pull/891 + (fetchpatch { + name = "parallel.patch"; + url = "https://github.com/axboe/liburing/commit/c34dca74854cb6e7f2b09affa2a4ab0145e62371.patch"; + hash = "sha256-RZSgHdQy5d7mXtMvkMyr+/kMhp1w+S5v9cqk5NSii5o="; + }) + ]; + separateDebugInfo = true; enableParallelBuilding = true; # Upstream's configure script is not autoconf generated, but a hand written one.