From 590822ee4f0af03b55bb87b1bd6f967c47aa60ec Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 25 Aug 2022 07:51:38 +0100 Subject: [PATCH] ucx: pull upstream fix for binutils-2.39 `binutils-2.39` dropped `#define PTR void*` compaibility macro. Without this change build fails as: debug/debug.c: In function 'load_file': debug/debug.c:275:53: error: 'PTR' undeclared (first use in this function) 275 | symcount = bfd_read_minisymbols(file->abfd, 0, (PTR)&file->syms, &size); | ^~~ --- pkgs/development/libraries/ucx/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ucx/default.nix b/pkgs/development/libraries/ucx/default.nix index 4c1728868568..7a5f57b42299 100644 --- a/pkgs/development/libraries/ucx/default.nix +++ b/pkgs/development/libraries/ucx/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, doxygen +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, doxygen , numactl, rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin , enableCuda ? false , cudatoolkit @@ -22,6 +22,16 @@ in stdenv.mkDerivation rec { sha256 = "sha256-DWiOmqxBAAH8DE7H0teoKyp+m3wYEo652ac7ey43Erg="; }; + patches = [ + # Pull upstream fix for binutils-2.39: + # https://github.com/openucx/ucx/pull/8450 + (fetchpatch { + name = "binutils-2.39.patch"; + url = "https://github.com/openucx/ucx/commit/6b6128efd416831cec3a1820f7d1c8e648b79448.patch"; + sha256 = "sha256-ci00nZG8iOUEFXbmgr/5XkIfiw4eAAdG1wcEYjQSiT8="; + }) + ]; + nativeBuildInputs = [ autoreconfHook doxygen ]; buildInputs = [