[cp2k] fix FTBFS in rawhide

Dominik Mierzejewski rathann at fedoraproject.org
Wed Apr 17 23:08:52 UTC 2013


commit 312ce99b7f2dca45c0d0c864d99321b28ec01b56
Author: Dominik Mierzejewski <rpm at greysector.net>
Date:   Thu Apr 18 01:06:24 2013 +0200

    fix FTBFS in rawhide
    
    - fix build with gfortran-4.8
    - link with libf77blas for MPI builds to avoid undefined reference to symbol 'dgemm_'

 Linux-gfortran-openmpi.popt |    2 +-
 cp2k-gfortran48.patch       |   21 +++++++++++++++++++++
 cp2k.spec                   |    9 ++++++++-
 3 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/Linux-gfortran-openmpi.popt b/Linux-gfortran-openmpi.popt
index 059d70a..9d0c20a 100644
--- a/Linux-gfortran-openmpi.popt
+++ b/Linux-gfortran-openmpi.popt
@@ -15,6 +15,6 @@ DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__parallel -D__BLACS -D__SCALAPACK
 OPTFLAGS = -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native
 FCFLAGS  = $(OPTFLAGS) -ffree-form -ffree-line-length-none $(DFLAGS)
 LDFLAGS  = $(FCFLAGS) 
-LIBS     = -lstdc++ -llapack -lscalapack -lmpiblacsF77init -lmpiblacs -lmpiblacsCinit -lfftw3 -lint -lderiv -lxc
+LIBS     = -lstdc++ -llapack -lscalapack -lf77blas -lmpiblacsF77init -lmpiblacs -lmpiblacsCinit -lfftw3 -lint -lderiv -lxc
 
 OBJECTS_ARCHITECTURE = machine_gfortran.o
diff --git a/cp2k-gfortran48.patch b/cp2k-gfortran48.patch
new file mode 100644
index 0000000..79cc97d
--- /dev/null
+++ b/cp2k-gfortran48.patch
@@ -0,0 +1,21 @@
+diff -up cp2k-2.4/src/dbcsr_lib/dbcsr_dist_operations.F.gfortran48 cp2k-2.4/src/dbcsr_lib/dbcsr_dist_operations.F
+--- cp2k-2.4/src/dbcsr_lib/dbcsr_dist_operations.F.gfortran48	2012-05-31 17:01:33.000000000 +0200
++++ cp2k-2.4/src/dbcsr_lib/dbcsr_dist_operations.F	2013-04-17 23:43:46.677109224 +0200
+@@ -190,7 +190,7 @@ CONTAINS
+   PURE SUBROUTINE get_stored_coordinates_type(matrix, row, column, transpose,&
+        processor)
+     TYPE(dbcsr_type), INTENT(IN)             :: matrix
+-    INTEGER, INTENT(INOUT)                   :: row, column
++    INTEGER, INTENT(IN)                      :: row, column
+     LOGICAL, INTENT(INOUT)                   :: transpose
+     INTEGER, INTENT(OUT), OPTIONAL           :: processor
+ 
+@@ -252,7 +252,7 @@ CONTAINS
+ ! *****************************************************************************
+   SUBROUTINE get_stored_coordinates_obj(matrix, row, column, transpose, processor)
+     TYPE(dbcsr_obj), INTENT(IN)              :: matrix
+-    INTEGER, INTENT(INOUT)                   :: row, column
++    INTEGER, INTENT(IN)                      :: row, column
+     LOGICAL, INTENT(INOUT)                   :: transpose
+     INTEGER, INTENT(OUT), OPTIONAL           :: processor
+ 
diff --git a/cp2k.spec b/cp2k.spec
index 6b31c17..a59cd87 100644
--- a/cp2k.spec
+++ b/cp2k.spec
@@ -3,7 +3,7 @@
 
 Name: cp2k
 Version: 2.4
-Release: 0.3.%{snapshot}%{?dist}
+Release: 0.4.%{snapshot}%{?dist}
 Group: Applications/Engineering
 Summary: A molecular dynamics engine capable of classical and Car-Parrinello simulations
 License: GPLv2+
@@ -28,6 +28,8 @@ Source4: cp2k-snapshot.sh
 # use external makedepf90
 # skip compilation during regtests
 Patch0: %{name}-rpm.patch
+# fix build with gfortran-4.8
+Patch1: %{name}-gfortran48.patch
 BuildRequires: atlas-devel
 # for regtests
 BuildRequires: bc
@@ -110,6 +112,7 @@ cp -p %{SOURCE2} arch/Linux-i686-gfortran.ssmp
 cp -p %{SOURCE2} arch/Linux-x86-64-gfortran.ssmp
 cp -p %{SOURCE3} arch/
 %patch0 -p1 -b .r
+%patch1 -p1 -b .gfortran48
 rm -r tools/makedepf90
 chmod -x src/harris_{functional,{env,energy}_types}.F
 # fix crashes in fftw on i686
@@ -188,6 +191,10 @@ popd
 %{_libdir}/mpich2%{?_opt_cc_suffix}/bin/cp2k.popt_mpich2
 
 %changelog
+* Wed Apr 17 2013 Dominik Mierzejewski <rpm at greysector.net> - 2.4-0.4.20130220
+- fix build with gfortran-4.8
+- link with libf77blas for MPI builds to avoid undefined reference to symbol 'dgemm_'
+
 * Sun Apr 14 2013 Dominik Mierzejewski <rpm at greysector.net> - 2.4-0.3.20130220
 - fix crashes in fftw on i686 (patch by Michael Banck)
 


More information about the scm-commits mailing list