From b600bb77d47b725a90a67072145ad566d0b23aee Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Wed, 10 Jun 2020 14:28:10 +0200 Subject: [PATCH] Compile extrae with clang --- bsc/extrae/default.nix | 48 +++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/bsc/extrae/default.nix b/bsc/extrae/default.nix index b27537c..a47bef4 100644 --- a/bsc/extrae/default.nix +++ b/bsc/extrae/default.nix @@ -1,5 +1,5 @@ { stdenv -, fetchurl +, fetchgit , boost , libdwarf , libelf @@ -8,33 +8,45 @@ , papi , binutils-unwrapped , libiberty -, gcc , gfortran , xml2 , mpi ? null , cuda ? null -#, withOpenmp ? false +, llvmPackages +, autoreconfHook }: stdenv.mkDerivation rec { name = "extrae"; version = "3.7.1"; - src = fetchurl { - url = "https://ftp.tools.bsc.es/extrae/${name}-${version}-src.tar.bz2"; - sha256 = "0y036qc7y30pfj1mnb9nzv2vmxy6xxiy4pgfci6l3jc0lccdsgf8"; +# src = fetchurl { +# url = "https://ftp.tools.bsc.es/extrae/${name}-${version}-src.tar.bz2"; +# sha256 = "0y036qc7y30pfj1mnb9nzv2vmxy6xxiy4pgfci6l3jc0lccdsgf8"; +# }; + + # Use patched Extrae version + src = fetchgit { + url = "https://github.com/rodarima/extrae"; + rev = "15883516d6bd802e5b76ff28c4b4a3a5cb113880"; + sha256 = "1hmf6400kw5k3j6xdbbd0yw4xhrjhk1kibp6m7r2i000qjgha8v6"; }; enableParallelBuilding = true; - nativeBuildInputs = [ gcc gfortran libunwind ]; - buildInputs = [ binutils-unwrapped boost boost.dev libiberty mpi - xml2 libxml2.dev ]; - - patchPhase = '' - sed -ie 's|/usr/bin/find|env find|g' substitute-all - sed -ie 's|/bin/mv|env mv|g' substitute - ''; + buildInputs = [ + autoreconfHook + gfortran + libunwind + binutils-unwrapped + boost + boost.dev + libiberty + mpi + xml2 + libxml2.dev + ] + ++ stdenv.lib.optional stdenv.cc.isClang llvmPackages.openmp; preConfigure = '' configureFlagsArray=( @@ -58,15 +70,7 @@ stdenv.mkDerivation rec { else ''--without-mpi''} --without-dyninst) ''; -# --with-mpi=${mpi} -# --with-mpi-headers=${mpi}/include -# --with-mpi-libs=${mpi}/lib -# ++ ( -# if (cuda != null) -# then [ "--with-cuda=${cuda}" ] -# else [ "--without-cuda" ] -# ) # ++ ( # if (openmp) # then [ "--enable-openmp" ]