[scalapack] build shared library properly

Tom Callaway spot at fedoraproject.org
Wed Jul 2 20:05:33 UTC 2014


commit 0db18cbebab23b7dafc912af0ccb7bff55b7cc76
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Wed Jul 2 16:05:40 2014 -0400

    build shared library properly

 scalapack-2.0.2-fedora.patch       |    2 +-
 scalapack-2.0.2-shared-blacs.patch |    2 +-
 scalapack.spec                     |    9 ++++++---
 3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/scalapack-2.0.2-fedora.patch b/scalapack-2.0.2-fedora.patch
index 2a385a6..ac0f0e8 100644
--- a/scalapack-2.0.2-fedora.patch
+++ b/scalapack-2.0.2-fedora.patch
@@ -15,7 +15,7 @@ diff -up scalapack-2.0.2/scalapack-2.0.2/Makefile.fedora scalapack-2.0.2/scalapa
  	( cd EXAMPLE; $(MAKE) clean )
  
 +shared: scalapacklib
-+	( mkdir tmp ; cp $(SCALAPACKLIB) tmp ; cd tmp ; ar x $(SCALAPACKLIB) ; $(CC) -shared -o ../libscalapack.so.2.0.0 *.o -Wl,-soname=libscalapack.so.2 ; cd .. )
++	( mkdir tmp ; cp $(SCALAPACKLIB) tmp ; cd tmp ; ar x $(SCALAPACKLIB) ; $(CC) -shared -o ../libscalapack.so.2.0.0 *.o -Wl,-soname=libscalapack.so.2 -lblas -llapack -L.. -lmpiblacs -lm -lgfortran ; cd .. )
 diff -up scalapack-2.0.2/scalapack-2.0.2/SLmake.inc.fedora scalapack-2.0.2/scalapack-2.0.2/SLmake.inc
 --- scalapack-2.0.2/scalapack-2.0.2/SLmake.inc.fedora	2014-02-12 11:19:04.618179216 -0500
 +++ scalapack-2.0.2/scalapack-2.0.2/SLmake.inc	2014-02-12 11:19:00.675184482 -0500
diff --git a/scalapack-2.0.2-shared-blacs.patch b/scalapack-2.0.2-shared-blacs.patch
index 1695137..cbd2bfc 100644
--- a/scalapack-2.0.2-shared-blacs.patch
+++ b/scalapack-2.0.2-shared-blacs.patch
@@ -6,7 +6,7 @@ diff -up scalapack-2.0.2/scalapack-2.0.2/BLACS/SRC/Makefile.shared scalapack-2.0
  	$(ARCH) $(ARCHFLAGS) ../../$(SCALAPACKLIB) $(internal) $(Fintobj) $(Cintobj)
  	$(RANLIB) ../../$(SCALAPACKLIB)
 +	cp -a ../../$(SCALAPACKLIB) ../../libmpiblacs.a
-+	( mkdir tmp ; cp ../../$(SCALAPACKLIB) tmp ; cd tmp ; ar x $(SCALAPACKLIB) ; mpif77 -shared -o ../../../libmpiblacs.so.2.0.0 *.o *.oo -Wl,-soname=libmpiblacs.so.2 ; cd .. )
++	( mkdir tmp ; cp ../../$(SCALAPACKLIB) tmp ; cd tmp ; ar x $(SCALAPACKLIB) ; mpif77 -shared -o ../../../libmpiblacs.so.2.0.0 *.o *.oo -Wl,-soname=libmpiblacs.so.2 ; ln -s libmpiblacs.so.2.0.0 ../../../libmpiblacs.so.2 ; ln -s libmpiblacs.so.2.0.0 ../../../libmpiblacs.so ; cd .. )
  
  #  -----------------------
  #  Delete the object files
diff --git a/scalapack.spec b/scalapack.spec
index 742f980..a38af38 100644
--- a/scalapack.spec
+++ b/scalapack.spec
@@ -8,7 +8,7 @@
 Summary: A subset of LAPACK routines redesigned for heterogeneous computing
 Name: scalapack
 Version: 2.0.2
-Release: 2%{?dist}
+Release: 3%{?dist}
 # This is freely distributable without any restrictions.
 License: Public Domain
 Group: Development/Libraries
@@ -341,8 +341,8 @@ for i in mpich %{?with_openmpi:openmpi}; do
   pushd %{buildroot}%{_libdir}/$i/lib/
   ln -fs libscalapack.so.2.0.0 libscalapack.so.2
   ln -s libscalapack.so.2.0.0 libscalapack.so
-  ln -fs libmpiblacs.so.2.0.0 libmpiblacs.so.2
-  ln -s libmpiblacs.so.2.0.0 libmpiblacs.so
+  # ln -fs libmpiblacs.so.2.0.0 libmpiblacs.so.2
+  # ln -s libmpiblacs.so.2.0.0 libmpiblacs.so
   popd
 done
 
@@ -397,6 +397,9 @@ cp -f README ../
 %endif
 
 %changelog
+* Tue Jul  1 2014 Tom Callaway <spot at fedoraproject.org> - 2.0.2-3
+- explictly link to other dependent libs
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.2-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list