[linbox] Rebuild for givaro 3.7.1. Fix all linkage problems in the same patch. Fix driver compile.

Jerry James jjames at fedoraproject.org
Tue Oct 2 21:48:30 UTC 2012


commit 612e20308209eea58002445caafb68e4b74aa4ee
Author: Jerry James <jamesjer at betterlinux.com>
Date:   Tue Oct 2 15:48:14 2012 -0600

    Rebuild for givaro 3.7.1.
    Fix all linkage problems in the same patch.
    Fix driver compile.

 linbox-destructor.patch |   10 +++-----
 linbox-driver.patch     |   11 +++++++++
 linbox-gcc47.patch      |   56 +++++++++++++++++++++-------------------------
 linbox-int64.patch      |    5 +--
 linbox-lapack.patch     |   22 ++++++++++++++++++
 linbox-underlink.patch  |   27 ++++++++++++++++++++--
 linbox.spec             |   45 ++++++++++++++++++++-----------------
 7 files changed, 113 insertions(+), 63 deletions(-)
---
diff --git a/linbox-destructor.patch b/linbox-destructor.patch
index 4c3ea2d..31f0c97 100644
--- a/linbox-destructor.patch
+++ b/linbox-destructor.patch
@@ -1,6 +1,5 @@
-diff -up linbox-1.3.2/tests/Makefile.in.orig linbox-1.3.2/tests/Makefile.in
---- linbox-1.3.2/tests/Makefile.in.orig	2012-07-03 17:03:58.199463037 -0400
-+++ linbox-1.3.2/tests/Makefile.in	2012-07-03 17:04:57.440465264 -0400
+--- ./tests/Makefile.in.orig	2012-06-08 02:27:28.000000000 -0600
++++ ./tests/Makefile.in	2012-09-26 11:25:17.946134272 -0600
 @@ -1260,14 +1260,14 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_sr
  	$(FFLAS_FFPACK_CFLAGS) $(GMP_CFLAGS) $(NTL_CFLAGS) \
  	$(GIVARO_CFLAGS) $(LIDIA_CFLAGS) $(IML_CFLAGS)
@@ -18,9 +17,8 @@ diff -up linbox-1.3.2/tests/Makefile.in.orig linbox-1.3.2/tests/Makefile.in
  # AM_CXXFLAGS = -g -DLinBoxSrcOnly -Wall -D__LINBOX_HAVE_DGETRF -D__LINBOX_HAVE_DGETRI
  # AM_CFLAGS = -g -Wall
  SUBDIRS = data matrix
-diff -up linbox-1.3.2/tests/test-common.h.orig linbox-1.3.2/tests/test-common.h
---- linbox-1.3.2/tests/test-common.h.orig	2012-07-03 17:05:16.537466108 -0400
-+++ linbox-1.3.2/tests/test-common.h	2012-07-03 17:05:29.191466504 -0400
+--- ./tests/test-common.h.orig	2012-06-07 02:30:32.000000000 -0600
++++ ./tests/test-common.h	2012-09-26 11:25:17.949139540 -0600
 @@ -381,7 +381,7 @@ extern inline double incompleteGamma (do
  
  double chiSquaredCDF (double chi_sqr, double df);
diff --git a/linbox-driver.patch b/linbox-driver.patch
new file mode 100644
index 0000000..fcee2b2
--- /dev/null
+++ b/linbox-driver.patch
@@ -0,0 +1,11 @@
+--- ./interfaces/driver/lb-blackbox-data.h.orig	2012-06-07 02:30:26.000000000 -0600
++++ ./interfaces/driver/lb-blackbox-data.h	2012-10-02 13:58:40.725472935 -0600
+@@ -148,7 +148,7 @@ public:
+ 	{
+ 		Blackbox<DomainSource> *B_source= static_cast<Blackbox<DomainSource> * >  (ptr);
+ 		Blackbox<DomainTarget> *B_target = NULL; /*  was not init't */
+-		typename Blackbox<DomainSource>::template rebind<DomainTarget>()(*B_target, *B_source, *D);
++		typename Blackbox<DomainSource>::template rebind<DomainTarget>()(*B_target, *B_source);
+ 		delete B_source;
+ 		ptr = B_target;
+ 	}
diff --git a/linbox-gcc47.patch b/linbox-gcc47.patch
index d8c1d91..6200a1b 100644
--- a/linbox-gcc47.patch
+++ b/linbox-gcc47.patch
@@ -1,18 +1,16 @@
-diff -up linbox-1.3.2/interfaces/driver/lb-blackbox-functor.h.orig linbox-1.3.2/interfaces/driver/lb-blackbox-functor.h
---- linbox-1.3.2/interfaces/driver/lb-blackbox-functor.h.orig	2012-07-03 17:48:30.630565374 -0400
-+++ linbox-1.3.2/interfaces/driver/lb-blackbox-functor.h	2012-07-03 17:48:49.880566113 -0400
-@@ -53,7 +53,7 @@ public:
-  * Macro for automatic code generation *
-  ***************************************/
- #define LB_BLACKBOX_VISIT(B)				\
--void visit(const B &d){apply(d);}
-+void visit(const B &d){this->apply(d);}
- 
- 
- /**********************************************************************************
-diff -up linbox-1.3.2/interfaces/driver/lb-domain-functor.h.orig linbox-1.3.2/interfaces/driver/lb-domain-functor.h
---- linbox-1.3.2/interfaces/driver/lb-domain-functor.h.orig	2012-07-03 17:49:05.931566774 -0400
-+++ linbox-1.3.2/interfaces/driver/lb-domain-functor.h	2012-07-03 17:49:17.856567170 -0400
+--- ./linbox/algorithms/blackbox-container-symmetric.h.orig	2012-06-07 02:30:32.000000000 -0600
++++ ./linbox/algorithms/blackbox-container-symmetric.h	2012-10-02 13:20:53.840875313 -0600
+@@ -59,7 +59,7 @@ namespace LinBox
+ 		template<class Vector>
+ 		BlackboxContainerSymmetric (const Blackbox *D, const Field &F, const Vector &u0) :
+ 			BlackboxContainerBase<Field, _Blackbox> (D, F)
+-		{ init (u0, u0); }
++		{ this->init (u0, u0); }
+ 		BlackboxContainerSymmetric (const Blackbox *D, const Field &F, RandIter &g) :
+ 			BlackboxContainerBase<Field, _Blackbox> (D, F)
+ 		{ this->init (g); }
+--- ./interfaces/driver/lb-domain-functor.h.orig	2012-06-07 02:30:26.000000000 -0600
++++ ./interfaces/driver/lb-domain-functor.h	2012-10-02 13:20:53.834901357 -0600
 @@ -52,7 +52,7 @@ public:
   * Macro for automatic code generation *
   ***************************************/
@@ -22,9 +20,19 @@ diff -up linbox-1.3.2/interfaces/driver/lb-domain-functor.h.orig linbox-1.3.2/in
  
  
  /*******************************************************************************
-diff -up linbox-1.3.2/interfaces/driver/lb-vector-functor.h.orig linbox-1.3.2/interfaces/driver/lb-vector-functor.h
---- linbox-1.3.2/interfaces/driver/lb-vector-functor.h.orig	2012-07-03 17:49:30.130567691 -0400
-+++ linbox-1.3.2/interfaces/driver/lb-vector-functor.h	2012-07-03 17:49:42.232568167 -0400
+--- ./interfaces/driver/lb-blackbox-functor.h.orig	2012-06-07 02:30:26.000000000 -0600
++++ ./interfaces/driver/lb-blackbox-functor.h	2012-10-02 13:20:53.833905696 -0600
+@@ -53,7 +53,7 @@ public:
+  * Macro for automatic code generation *
+  ***************************************/
+ #define LB_BLACKBOX_VISIT(B)				\
+-void visit(const B &d){apply(d);}
++void visit(const B &d){this->apply(d);}
+ 
+ 
+ /**********************************************************************************
+--- ./interfaces/driver/lb-vector-functor.h.orig	2012-06-07 02:30:26.000000000 -0600
++++ ./interfaces/driver/lb-vector-functor.h	2012-10-02 13:20:53.836892684 -0600
 @@ -54,7 +54,7 @@ public:
   * Macro for automatic code generation *
   ***************************************/
@@ -34,15 +42,3 @@ diff -up linbox-1.3.2/interfaces/driver/lb-vector-functor.h.orig linbox-1.3.2/in
  
  
  /**********************************************************************************
-diff -up linbox-1.3.2/linbox/algorithms/blackbox-container-symmetric.h.orig linbox-1.3.2/linbox/algorithms/blackbox-container-symmetric.h
---- linbox-1.3.2/linbox/algorithms/blackbox-container-symmetric.h.orig	2012-07-03 17:49:56.067568648 -0400
-+++ linbox-1.3.2/linbox/algorithms/blackbox-container-symmetric.h	2012-07-03 17:50:24.032569723 -0400
-@@ -59,7 +59,7 @@ namespace LinBox
- 		template<class Vector>
- 		BlackboxContainerSymmetric (const Blackbox *D, const Field &F, const Vector &u0) :
- 			BlackboxContainerBase<Field, _Blackbox> (D, F)
--		{ init (u0, u0); }
-+		{ this->init (u0, u0); }
- 		BlackboxContainerSymmetric (const Blackbox *D, const Field &F, RandIter &g) :
- 			BlackboxContainerBase<Field, _Blackbox> (D, F)
- 		{ this->init (g); }
diff --git a/linbox-int64.patch b/linbox-int64.patch
index 069a7d5..2b6e720 100644
--- a/linbox-int64.patch
+++ b/linbox-int64.patch
@@ -1,6 +1,5 @@
-diff -up linbox-1.3.2/linbox/field/Modular/modular-int64.h.orig linbox-1.3.2/linbox/field/Modular/modular-int64.h
---- linbox-1.3.2/linbox/field/Modular/modular-int64.h.orig	2012-07-03 17:34:48.498533895 -0400
-+++ linbox-1.3.2/linbox/field/Modular/modular-int64.h	2012-07-03 17:34:51.880534136 -0400
+--- ./linbox/field/Modular/modular-int64.h.orig	2012-06-07 02:30:27.000000000 -0600
++++ ./linbox/field/Modular/modular-int64.h	2012-09-26 11:26:12.483580130 -0600
 @@ -96,7 +96,7 @@ namespace LinBox
  	public:
  		typedef int64_t Element;
diff --git a/linbox-lapack.patch b/linbox-lapack.patch
new file mode 100644
index 0000000..16d202b
--- /dev/null
+++ b/linbox-lapack.patch
@@ -0,0 +1,22 @@
+--- ./macros/lapack-check.m4.orig	2012-06-07 02:30:26.000000000 -0600
++++ ./macros/lapack-check.m4	2012-10-02 15:05:47.051001770 -0600
+@@ -38,7 +38,7 @@ LIBS="${BACKUP_LIBS} ${BLAS_LIBS}"
+ 
+ AC_TRY_RUN(dnl ICC ?
+ [   #include "fflas-ffpack/fflas-ffpack-config.h"
+-	#ifdef __FFLAS_FFPACK_HAVE_LAPACK
++	#ifdef __FFLASFFPACK_HAVE_LAPACK
+ 	   int main() { return 0 ; }
+    #else
+    a pas lapack
+--- ./configure.orig	2012-06-07 15:19:31.000000000 -0600
++++ ./configure	2012-10-02 15:06:07.629005714 -0600
+@@ -18077,7 +18077,7 @@ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+    #include "fflas-ffpack/fflas-ffpack-config.h"
+-	#ifdef __FFLAS_FFPACK_HAVE_LAPACK
++	#ifdef __FFLASFFPACK_HAVE_LAPACK
+ 	   int main() { return 0 ; }
+    #else
+    a pas lapack
diff --git a/linbox-underlink.patch b/linbox-underlink.patch
index 0779bc7..89bda14 100644
--- a/linbox-underlink.patch
+++ b/linbox-underlink.patch
@@ -1,6 +1,5 @@
-diff -up linbox-1.3.2/linbox/Makefile.in.orig linbox-1.3.2/linbox/Makefile.in
---- linbox-1.3.2/linbox/Makefile.in.orig	2012-07-03 20:07:41.470885165 -0400
-+++ linbox-1.3.2/linbox/Makefile.in	2012-07-03 20:08:27.611886923 -0400
+--- ./linbox/Makefile.in.orig	2012-06-07 15:19:27.000000000 -0600
++++ ./linbox/Makefile.in	2012-09-26 11:26:58.091786035 -0600
 @@ -154,7 +154,7 @@ LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM
  CXXLD = $(CXX)
  CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -18,3 +17,25 @@ diff -up linbox-1.3.2/linbox/Makefile.in.orig linbox-1.3.2/linbox/Makefile.in
  
  all: all-recursive
  
+--- ./interfaces/sage/Makefile.in.orig	2012-06-07 15:19:27.000000000 -0600
++++ ./interfaces/sage/Makefile.in	2012-09-26 11:37:52.303447240 -0600
+@@ -334,7 +334,7 @@ top_srcdir = @top_srcdir@
+ #liblinboxsage_la_LIBADD = -llinbox $(BLAS_LIBS)
+ #gentoo's linbox-1.1.6-fix-undefined-symbols.patch
+ @LINBOX_HAVE_SAGE_TRUE at liblinboxsage_la_LIBADD = $(top_builddir)/linbox/liblinbox.la
+- at LINBOX_HAVE_SAGE_TRUE@liblinboxsage_la_LDFLAGS = $(GIVARO_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(MAPLE_LIBS) $(LDFLAGS) -version-info 0:0:0 #-Wl,-zmuldefs
++ at LINBOX_HAVE_SAGE_TRUE@liblinboxsage_la_LDFLAGS = -Wl,--as-needed -L$(libdir)/atlas ../../linbox/liblinbox.la $(GIVARO_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(MAPLE_LIBS) $(LDFLAGS) -version-info 0:0:0 #-Wl,-zmuldefs
+ all: all-am
+ 
+ .SUFFIXES:
+--- ./interfaces/driver/Makefile.in.orig	2012-06-07 15:19:27.000000000 -0600
++++ ./interfaces/driver/Makefile.in	2012-09-26 11:35:50.467638808 -0600
+@@ -370,7 +370,7 @@ top_srcdir = @top_srcdir@
+ 
+ # \
+ #			#  lb-solve.C
+- at LINBOX_COMPILE_DRIVERS_TRUE@liblbdriver_la_LDFLAGS = $(GIVARO_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(LDFLAGS) $(top_srcdir)/linbox/liblinbox.la -Wl,-zmuldefs
++ at LINBOX_COMPILE_DRIVERS_TRUE@liblbdriver_la_LDFLAGS = -Wl,--as-needed -L$(libdir)/atlas $(GIVARO_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(LDFLAGS) $(top_srcdir)/linbox/liblinbox.la -Wl,-zmuldefs
+ @LINBOX_COMPILE_DRIVERS_TRUE at pkginclude_HEADERS = \
+ @LINBOX_COMPILE_DRIVERS_TRUE@		lb-driver.h              \
+ @LINBOX_COMPILE_DRIVERS_TRUE@		lb-blackbox-abstract.h   \
diff --git a/linbox.spec b/linbox.spec
index c86c609..8f949ec 100644
--- a/linbox.spec
+++ b/linbox.spec
@@ -1,18 +1,23 @@
 Name:           linbox
 Version:        1.3.2
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        C++ Library for High-Performance Exact Linear Algebra
 Group:          Development/Libraries
 License:        LGPLv2+
 URL:            http://www.linalg.org/
 Source0:        http://www.linalg.org/%{name}-%{version}.tar.gz
 # Sent upstream 2 Nov 2011.  Fix double frees that crash all tests.
-Patch0:         linbox-destructor.patch
-Patch1:         linbox-gcc47.patch
-# Correct missing semicollon
-Patch2:		linbox-int64.patch
+Patch0:         %{name}-destructor.patch
+# Adapt to changes in C++ scope visibility in GCC 4.7
+Patch1:         %{name}-gcc47.patch
+# Correct missing semicolon
+Patch2:         %{name}-int64.patch
 # Force linkage to mpfr and iml to avoid unresolved symbols
-Patch3:		linbox-underlink.patch
+Patch3:         %{name}-underlink.patch
+# Fix driver compilation, which has bitrotted somewhat
+Patch4:         %{name}-driver.patch
+# Fix detection of LAPACK support in FFLAS-FFPACK
+Patch5:         %{name}-lapack.patch
 
 BuildRequires:  atlas-devel
 BuildRequires:  fflas-ffpack-devel
@@ -58,19 +63,12 @@ Documentation for %{name}.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-
-# Fix up missing and extraneous library linkage
-sed -e "s|\$(GMP_LIBS) \$(NTL_LIBS) \$(BLAS_LIBS)|-L%{_libdir}/atlas \$(NTL_LIBS) -lcblas|" \
-    -i interfaces/driver/Makefile.in
-sed -e "s|\$(GIVARO_LIBS) \$(GMP_LIBS) \$(NTL_LIBS) \$(BLAS_LIBS)|-L%{_libdir}/atlas ../../linbox/liblinbox.la \$(GIVARO_LIBS) \$(NTL_LIBS) -lcblas|" \
-    -i interfaces/sage/Makefile.in
-
-# Fix libtool
-sed -i "s/func_apped/func_append/g" build-aux/ltmain.sh
+%patch0
+%patch1
+%patch2
+%patch3
+%patch4
+%patch5
 
 %build
 CFLAGS="%{optflags}"
@@ -83,8 +81,8 @@ export CXXFLAGS
 CPPFLAGS="$CPPFLAGS -I%{_includedir}/m4rie"
 export CPPFLAGS
 
-%configure --enable-shared --disable-static --enable-sage \
-  --enable-doc --with-ntl
+%configure --enable-shared --disable-static --enable-drivers --enable-sage \
+  --enable-optimization --enable-doc --with-ntl
 
 # Remove hardcoded rpaths
 sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
@@ -135,6 +133,11 @@ LD_LIBRARY_PATH=`pwd`/linbox/.libs make %{?_smp_mflags} check
 
 
 %changelog
+* Tue Oct  2 2012 Jerry James <loganjerry at gmail.com> - 1.3.2-4
+- Rebuild for givaro 3.7.1
+- Fix all linkage problems in the same patch
+- Fix driver compile
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.2-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list