Merge pull request #172182 from markuskowa/fix-siesta

siesta: fix build for gcc/gfortran-10/11
This commit is contained in:
davidak 2022-05-09 15:16:40 +02:00 committed by GitHub
commit 0bc16c7f2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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