From a5e2f0f4106d623762e07f128805e116e3ba4761 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 9 May 2022 14:31:16 +0200 Subject: [PATCH] siesta: fix build for gcc/gfortran-10/11 --- .../science/chemistry/siesta/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/chemistry/siesta/default.nix b/pkgs/applications/science/chemistry/siesta/default.nix index 7ee46f7d7e22..4c3d1d4c1a7d 100644 --- a/pkgs/applications/science/chemistry/siesta/default.nix +++ b/pkgs/applications/science/chemistry/siesta/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { buildInputs = [ blas lapack ] ++ lib.optionals useMpi [ mpi scalapack ]; - enableParallelBuilding = true; + enableParallelBuilding = false; # Started making trouble with gcc-11 # Must do manualy becuase siesta does not do the regular # ./configure; make; make install @@ -35,17 +35,23 @@ stdenv.mkDerivation rec { cp gfortran.make arch.make ''; - preBuild = if useMpi then '' + preBuild = '' + # See https://gitlab.com/siesta-project/siesta/-/commit/a10bf1628e7141ba263841889c3503c263de1582 + # This may be fixed in the next release. makeFlagsArray=( + FFLAGS="-fallow-argument-mismatch" + ) + '' + (if useMpi then '' + makeFlagsArray+=( CC="mpicc" FC="mpifort" FPPFLAGS="-DMPI" MPI_INTERFACE="libmpi_f90.a" MPI_INCLUDE="." COMP_LIBS="" LIBS="-lblas -llapack -lscalapack" ); '' else '' - makeFlagsArray=( + makeFlagsArray+=( COMP_LIBS="" LIBS="-lblas -llapack" ); - ''; + ''); installPhase = '' mkdir -p $out/bin