about summary refs log tree commit diff
path: root/pkgs/applications/science/chemistry/siesta
diff options
context:
space:
mode:
authorMarkus Kowalewski <markus.kowalewski@fysik.su.se>2022-05-09 14:31:16 +0200
committerMarkus Kowalewski <markus.kowalewski@fysik.su.se>2022-05-09 14:31:16 +0200
commita5e2f0f4106d623762e07f128805e116e3ba4761 (patch)
tree838e8a8d77bc43dc29cfc2e719485b2346218601 /pkgs/applications/science/chemistry/siesta
parent4f355040c40197f28cbdb7558fda395d1d7ea271 (diff)
siesta: fix build for gcc/gfortran-10/11
Diffstat (limited to 'pkgs/applications/science/chemistry/siesta')
-rw-r--r--pkgs/applications/science/chemistry/siesta/default.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/applications/science/chemistry/siesta/default.nix b/pkgs/applications/science/chemistry/siesta/default.nix
index 7ee46f7d7e22f..4c3d1d4c1a7d2 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