Accepting request 1064110 from home:StefanBruens:branches:science
- Fix missing symbols for deprecated functions in LAPACK, add Restore_missing_deprecated_prototypes.patch - Add -Wl,--no-undefined when creating shared libraries, to catch missing symbols during build - Test fixes: * Build test binaries during %build, run in %check * Fix incorrect path for test output, to actually catch any test failures - Spec file cleanup: * Do not rename blaslib, it is used for test binaries * Use same commands for building lapacke as for other libs * Remove unused FFLAGS_NOOP for test binaries - Remove unneeded links. These will be taken care of by the update-alternatives. This will bring this package in sync with openblas. - Build deprecated functions again to avoid breaking the ABI. (boo#1207989) - Make library links in the alternatives directory arch dependent. This avoids conflicts when both 32-bit and 64-bit versions are installed (boo#1207563). - Consolidate dummy links for update-alternatives bringing them in sync with openblas. Add alternatives for lapacke. - Add Fix-out-of-bounds-read.patch to fix out of bound reads when user input is not validated properly. (bsc#1193562, CVE-2021-4048) - Rename conflicting MIN.3 and MAX.3 manpages into lapack-{MAX,MIN}.3 - Do not create the dummy files in /etc/alternatives during %install: managed by update-alternatives and packaged as ghost. - stop owning directories provided by filesystem (bsc#1184786) - Update to version 3.9.0: * LAPACK QR-preconditioned QR SVD method - xGESVDQ routines * LAPACK Householder Reconstruction - Add Avoid-out-of-bounds-accesses-in-complex-EIG-tests.patch - Rebase lapack-3.2.2.patch - Drop -std=legacy from fortran flags: * add Fix-MinGW-build-error.patch * add Fix-some-minor-inconsistencies-in-LAPACKE_czgesvdq.patch - Remove pre_checkin.sh, remove lapack-man.changes copy - Build CBLAS from lapack package * update baselibs.conf - Clean up spec file: * remove useless make cleanlib * remove ineffective duplicated 'make ..lib' calls with deviating opts, as the object files are not removed (fortuanately) the existing PIC files are used for the static libraries * remove fortran-only -std=legacy opt from CFLAGS - lapack-man: * Build manpages from same sources as the binaries (3.8.0) instead of old 3.5.0. * Merge blas-man package into lapack-man package. Avoids tedious splitting of the two. * Use fdupes macro instead of trying to deduplicate man pages manually. - Cleanup lapack spec: * Remove conditionals for obsolete distro versions * Only use python3-base instead of python3 * Drop old copy of lapack_testing.py as separate source - Add -std=legacy in order to fix boo#1166619. - Use FAT LTO objects in order to provide proper static library. - Update to version 3.8.0: * Symmetric-indefinite Factorization: Aasen’s tridiagonalization 2 stage. * LAPACKE interfaces. - Static -pic libraries are no longer built. - Package lapack_testing.py from lapack 3.8.0 with adjusted interpreter and adjust BuildRequires to python3. [bnc#1075766] - Correct RPM groups - Build the man pages in a separate .spec file (lapack-man). The resulting rpm names are kept identical. This allows us to drop doxygen out of lapack's main package buildroot, thus eliminating a build cycle. - Fix static libraries list - Add baselibs.conf to sources - Include update-alternatives dependency in subpackages that use it to guarantee it will be available. - Move blas and lapack libraries to subdirectories for fixing update-alternatives [bnc#861081] - Add %posttrans scripts for fixing migration problems. - Update to 3.5.0 * Added Hermitian LDLT factorization routines with rook pivoting algorithm * 2-by-1 CSD to be used for tall and skinny matrix with orthonormal columns * New stopping criteria for balancing * New complex division algorithm * Various improvements - No longer removing files due to license reasons as one file is no longer part of Lapack and the others have been replaced by new ones under the normal LAPACK license - packaged symlinks created by update-alternative as %ghost files - removed quotes from update-alternative command to silence rpmlint warning - Split devel packages into devel and devel-static - add update-alternative support to allow user to easily switch between several blas and lapack libraries - Update to 3.4.2 * Bug fixes - Fix bnc#772628 - update baselibs.conf - build the c interface lapacke - doxygen >= 1.7 is required for building docu - Change obsoletes '<=' for lapack and blas back to '<', there was a version update in between - Remove psfig.tex (bnc#757332) - fixing dependencies for devel-32bit - Update to 3.4.1 * Bug fixes - Undo spec file obfuscation - Fixed building on openSUSE 11.4 by fixing defattr - Made the package groups consistent: Development/Libraries/Parallel - Cleaned up spec file formatting - Made all requires use the new package naming - Adhere to shared library policy, packages containing *.so or *.h files have to be named $FOO-devel, packages containing *.a files either have to be named $FOO-devel-static or provide this name - Set license to 'BSD-3-Clause', according to the file LICENSE and the description on http://www.netlib.org/lapack/ it's not public domain - Package README and LICENSE in library packages - Removed rpmlint filters - Use upstream tarball URL - patch license to follow spdx.org standard - Remove redundant/unwanted tags/section (cf. specfile guidelines) - Use %_smp_mflags for parallel building - Update to 3.4.0 * xGEQRT: QR factorization (improved interface) * xGEQRT3: recursive QR factorization. * xTPQRT: Communication-Avoiding QR sequential kernels. * Bug fixes. * Changes see http://www.netlib.org/lapack/lapack-3.4.0.html - Run BLAS and LAPACK testsuite when building - Update to 3.3.1 [bnc#654560] * New procedures to compute the complete CS decomposition of a partitioned unitary matrix * Level-3 BLAS symmetric indefinite solve (xSYTRS) and symmetric indefinite inversion (xSYTRI) * Bug fixes * Changes see at http://www.netlib.org/lapack/lapack-3.3.1.html and http://www.netlib.org/lapack/lapack-3.3.0.html - Add baselibs. [bnc#630656] - Update to version 3.2.2 * Bug fix release * Changes see at http://www.netlib.org/lapack/lapack-3.2.2.html - package man and blas-man as noarch - Drop -O3 -funroll-all-loops compiler flags, build dcabs1.f with -O0. [bnc#569978] - Update to version 3.2.1 [bnc#504669] * Changes see at http://www.netlib.org/lapack/lapack-3.2.1.html - Update to version 3.2.0. [bnc#456384] * Extra Precise Iterative Refinement * XBLAS * Non-Negative Diagonals from Householder QR * High Performance QR and Householder Reflections on Low-Profile Matrices * New fast and accurate Jacobi SVD * Routines for Rectangular Full Packed format * Pivoted Cholesky * Mixed precision iterative refinement * Some new variants added for the one sided factorization * More robust DQDS algorithm - use versioned requires/obsoletes - %run_ldconfig is deprecated - prefix the patch with the packagename - Update to version 3.1.1. [#265999] - Integrates 3.1.0 errata and missing blas routines. - Provides better gfortran SECOND integration. - Split shared libraries into their own versioned subpackage. - Include fixes for the 3.1.0 errata. - Add missing CSROT, DROTM, DROTMG, DSDOT, SDSDOT, SROTM, SROTMG and ZDROT from blas distribution. [#228824] - Restore missing so symlinks. - Update to version 3.1.0. - Rename blasman to blas-man. - Rename lapack-manpages to lapack-man. - Trim BuildRequires. - Build and package -fPIC static library variants. [#205310] - Fix installing of the libblas.so symlink. - Do not package the matrix testing setup library libtmglib. - Do not package useless README file. - converted neededforbuild to BuildRequires - Add gmp-devel to nfb - fixed all other instances of -fno-f2c, and g77 -> gfortran use. - g77 -> gfortran, -fno-f2c is no more. - Updated manpages (#48784) - remove BuildPrereq, BuildRequires is generated - Fixed permission for manpages (#36340) - add %run_ldconfig - Use $RPM_OPT_FLAGS, so it builds on ppc64. - Fixed manpage conflict - correct library version - use -fPIC for all shared objects - link liblapack with shared libblas (same reason) - fixed %{_lib}-problems for x86_64 - Fixed bug #9925, adding blas to required packages. - Fixed bug #6803 - compile with '-01' for IA64 due to 'internal compiler error' in g77 - Fixed bug of missing objects (#4028) - Applied new patches - Modified group, url and files in spec - Applied new patches - Applied new patched - Moved manpages to /usr/share/man - Update to latest version - Package split lapack + blas - Package split: man pages + libraries - New package: LAPACK Linear Algebra Package (LAPACK) OBS-URL: https://build.opensuse.org/request/show/1064110 OBS-URL: https://build.opensuse.org/package/show/science/lapack?expand=0&rev=33
This commit is contained in:
parent
2e1b97948f
commit
b6bce2eeae
138
Restore_missing_deprecated_prototypes.patch
Normal file
138
Restore_missing_deprecated_prototypes.patch
Normal file
@ -0,0 +1,138 @@
|
||||
From 87536aa3c8bb0af00f66088fb6ac05d87509e011 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@debian.org>
|
||||
Date: Sat, 23 Nov 2019 12:22:20 +0100
|
||||
Subject: [PATCH] Restore missing prototypes for deprecated LAPACK functions
|
||||
|
||||
Some LAPACK functions prototypes were inadvertedly dropped in 3.9.0. As a
|
||||
consequence, LAPACKE has several unresolved symbols.
|
||||
|
||||
Closes #365
|
||||
---
|
||||
LAPACKE/include/lapack.h | 100 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 100 insertions(+)
|
||||
|
||||
diff --git a/LAPACKE/include/lapack.h b/LAPACKE/include/lapack.h
|
||||
index 3f425325f..5c131d844 100644
|
||||
--- a/LAPACKE/include/lapack.h
|
||||
+++ b/LAPACKE/include/lapack.h
|
||||
@@ -1842,6 +1842,28 @@ void LAPACK_zgeqlf(
|
||||
lapack_complex_double* work, lapack_int const* lwork,
|
||||
lapack_int* info );
|
||||
|
||||
+#define LAPACK_sgeqpf LAPACK_GLOBAL(sgeqpf,SGEQPF)
|
||||
+void LAPACK_sgeqpf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,
|
||||
+ lapack_int* jpvt, float* tau, float* work,
|
||||
+ lapack_int *info );
|
||||
+
|
||||
+#define LAPACK_dgeqpf LAPACK_GLOBAL(dgeqpf,DGEQPF)
|
||||
+void LAPACK_dgeqpf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,
|
||||
+ lapack_int* jpvt, double* tau, double* work,
|
||||
+ lapack_int *info );
|
||||
+
|
||||
+#define LAPACK_cgeqpf LAPACK_GLOBAL(cgeqpf,CGEQPF)
|
||||
+void LAPACK_cgeqpf( lapack_int* m, lapack_int* n, lapack_complex_float* a,
|
||||
+ lapack_int* lda, lapack_int* jpvt,
|
||||
+ lapack_complex_float* tau, lapack_complex_float* work,
|
||||
+ float* rwork, lapack_int *info );
|
||||
+
|
||||
+#define LAPACK_zgeqpf LAPACK_GLOBAL(zgeqpf,ZGEQPF)
|
||||
+void LAPACK_zgeqpf( lapack_int* m, lapack_int* n, lapack_complex_double* a,
|
||||
+ lapack_int* lda, lapack_int* jpvt,
|
||||
+ lapack_complex_double* tau, lapack_complex_double* work,
|
||||
+ double* rwork, lapack_int *info );
|
||||
+
|
||||
#define LAPACK_cgeqp3 LAPACK_GLOBAL(cgeqp3,CGEQP3)
|
||||
void LAPACK_cgeqp3(
|
||||
lapack_int const* m, lapack_int const* n,
|
||||
@@ -3617,6 +3639,47 @@ void LAPACK_zggrqf(
|
||||
lapack_complex_double* work, lapack_int const* lwork,
|
||||
lapack_int* info );
|
||||
|
||||
+#define LAPACK_sggsvd LAPACK_GLOBAL(sggsvd,SGGSVD)
|
||||
+lapack_int LAPACKE_sggsvd( int matrix_layout, char jobu, char jobv, char jobq,
|
||||
+ lapack_int m, lapack_int n, lapack_int p,
|
||||
+ lapack_int* k, lapack_int* l, float* a,
|
||||
+ lapack_int lda, float* b, lapack_int ldb,
|
||||
+ float* alpha, float* beta, float* u, lapack_int ldu,
|
||||
+ float* v, lapack_int ldv, float* q, lapack_int ldq,
|
||||
+ lapack_int* iwork );
|
||||
+
|
||||
+#define LAPACK_dggsvd LAPACK_GLOBAL(dggsvd,DGGSVD)
|
||||
+lapack_int LAPACKE_dggsvd( int matrix_layout, char jobu, char jobv, char jobq,
|
||||
+ lapack_int m, lapack_int n, lapack_int p,
|
||||
+ lapack_int* k, lapack_int* l, double* a,
|
||||
+ lapack_int lda, double* b, lapack_int ldb,
|
||||
+ double* alpha, double* beta, double* u,
|
||||
+ lapack_int ldu, double* v, lapack_int ldv, double* q,
|
||||
+ lapack_int ldq, lapack_int* iwork );
|
||||
+
|
||||
+#define LAPACK_cggsvd LAPACK_GLOBAL(cggsvd,CGGSVD)
|
||||
+lapack_int LAPACKE_cggsvd( int matrix_layout, char jobu, char jobv, char jobq,
|
||||
+ lapack_int m, lapack_int n, lapack_int p,
|
||||
+ lapack_int* k, lapack_int* l,
|
||||
+ lapack_complex_float* a, lapack_int lda,
|
||||
+ lapack_complex_float* b, lapack_int ldb,
|
||||
+ float* alpha, float* beta, lapack_complex_float* u,
|
||||
+ lapack_int ldu, lapack_complex_float* v,
|
||||
+ lapack_int ldv, lapack_complex_float* q,
|
||||
+ lapack_int ldq, lapack_int* iwork );
|
||||
+
|
||||
+#define LAPACK_zggsvd LAPACK_GLOBAL(zggsvd,ZGGSVD)
|
||||
+lapack_int LAPACKE_zggsvd( int matrix_layout, char jobu, char jobv, char jobq,
|
||||
+ lapack_int m, lapack_int n, lapack_int p,
|
||||
+ lapack_int* k, lapack_int* l,
|
||||
+ lapack_complex_double* a, lapack_int lda,
|
||||
+ lapack_complex_double* b, lapack_int ldb,
|
||||
+ double* alpha, double* beta,
|
||||
+ lapack_complex_double* u, lapack_int ldu,
|
||||
+ lapack_complex_double* v, lapack_int ldv,
|
||||
+ lapack_complex_double* q, lapack_int ldq,
|
||||
+ lapack_int* iwork );
|
||||
+
|
||||
#define LAPACK_cggsvd3 LAPACK_GLOBAL(cggsvd3,CGGSVD3)
|
||||
void LAPACK_cggsvd3(
|
||||
char const* jobu, char const* jobv, char const* jobq,
|
||||
@@ -3679,6 +3742,43 @@ void LAPACK_zggsvd3(
|
||||
lapack_int* iwork,
|
||||
lapack_int* info );
|
||||
|
||||
+#define LAPACK_sggsvp LAPACK_GLOBAL(sggsvp,SGGSVP)
|
||||
+lapack_int LAPACKE_sggsvp( int matrix_layout, char jobu, char jobv, char jobq,
|
||||
+ lapack_int m, lapack_int p, lapack_int n, float* a,
|
||||
+ lapack_int lda, float* b, lapack_int ldb, float tola,
|
||||
+ float tolb, lapack_int* k, lapack_int* l, float* u,
|
||||
+ lapack_int ldu, float* v, lapack_int ldv, float* q,
|
||||
+ lapack_int ldq );
|
||||
+
|
||||
+#define LAPACK_dggsvp LAPACK_GLOBAL(dggsvp,DGGSVP)
|
||||
+lapack_int LAPACKE_dggsvp( int matrix_layout, char jobu, char jobv, char jobq,
|
||||
+ lapack_int m, lapack_int p, lapack_int n, double* a,
|
||||
+ lapack_int lda, double* b, lapack_int ldb,
|
||||
+ double tola, double tolb, lapack_int* k,
|
||||
+ lapack_int* l, double* u, lapack_int ldu, double* v,
|
||||
+ lapack_int ldv, double* q, lapack_int ldq );
|
||||
+
|
||||
+#define LAPACK_cggsvp LAPACK_GLOBAL(cggsvp,CGGSVP)
|
||||
+lapack_int LAPACKE_cggsvp( int matrix_layout, char jobu, char jobv, char jobq,
|
||||
+ lapack_int m, lapack_int p, lapack_int n,
|
||||
+ lapack_complex_float* a, lapack_int lda,
|
||||
+ lapack_complex_float* b, lapack_int ldb, float tola,
|
||||
+ float tolb, lapack_int* k, lapack_int* l,
|
||||
+ lapack_complex_float* u, lapack_int ldu,
|
||||
+ lapack_complex_float* v, lapack_int ldv,
|
||||
+ lapack_complex_float* q, lapack_int ldq );
|
||||
+
|
||||
+#define LAPACK_zggsvp LAPACK_GLOBAL(zggsvp,ZGGSVP)
|
||||
+lapack_int LAPACKE_zggsvp( int matrix_layout, char jobu, char jobv, char jobq,
|
||||
+ lapack_int m, lapack_int p, lapack_int n,
|
||||
+ lapack_complex_double* a, lapack_int lda,
|
||||
+ lapack_complex_double* b, lapack_int ldb,
|
||||
+ double tola, double tolb, lapack_int* k,
|
||||
+ lapack_int* l, lapack_complex_double* u,
|
||||
+ lapack_int ldu, lapack_complex_double* v,
|
||||
+ lapack_int ldv, lapack_complex_double* q,
|
||||
+ lapack_int ldq );
|
||||
+
|
||||
#define LAPACK_cggsvp3 LAPACK_GLOBAL(cggsvp3,CGGSVP3)
|
||||
void LAPACK_cggsvp3(
|
||||
char const* jobu, char const* jobv, char const* jobq,
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 10 00:32:30 UTC 2023 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Fix missing symbols for deprecated functions in LAPACK, add
|
||||
Restore_missing_deprecated_prototypes.patch
|
||||
- Add -Wl,--no-undefined when creating shared libraries,
|
||||
to catch missing symbols during build
|
||||
- Test fixes:
|
||||
* Build test binaries during %build, run in %check
|
||||
* Fix incorrect path for test output, to actually catch
|
||||
any test failures
|
||||
- Spec file cleanup:
|
||||
* Do not rename blaslib, it is used for test binaries
|
||||
* Use same commands for building lapacke as for other libs
|
||||
* Remove unused FFLAGS_NOOP for test binaries
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 5 19:59:26 UTC 2023 - Egbert Eich <eich@suse.com>
|
||||
|
||||
@ -9,6 +25,7 @@ Sun Feb 5 19:59:26 UTC 2023 - Egbert Eich <eich@suse.com>
|
||||
Thu Feb 2 13:16:02 UTC 2023 - Richard Biener <rguenther@suse.com>
|
||||
|
||||
- Build deprecated functions again to avoid breaking the ABI.
|
||||
(boo#1207989)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 20:47:53 UTC 2023 - Egbert Eich <eich@suse.com>
|
||||
|
125
lapack.spec
125
lapack.spec
@ -22,7 +22,7 @@ Release: 0
|
||||
Summary: Linear Algebra Package
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/Parallel
|
||||
URL: http://www.netlib.org/lapack/
|
||||
URL: https://www.netlib.org/lapack/
|
||||
Source0: https://github.com/Reference-LAPACK/lapack/archive/v%{version}.tar.gz#/lapack-%{version}.tar.gz
|
||||
Source99: baselibs.conf
|
||||
Patch1: lapack-3.2.2.patch
|
||||
@ -34,6 +34,8 @@ Patch3: Fix-some-minor-inconsistencies-in-LAPACKE_czgesvdq.patch
|
||||
Patch4: Avoid-out-of-bounds-accesses-in-complex-EIG-tests.patch
|
||||
# PATCH-FIX-UPSTREAM -- https://github.com/Reference-LAPACK/lapack/commit/38f3eeee3108b18158409ca2a100e6fe03754781
|
||||
Patch5: Fix-out-of-bounds-read.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch6: https://github.com/Reference-LAPACK/lapack/commit/87536aa3c8bb.patch#/Restore_missing_deprecated_prototypes.patch
|
||||
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: python3-base
|
||||
@ -209,72 +211,75 @@ statically, which is highly discouraged.
|
||||
sed -i -e '1 s@env python@python3@' lapack_testing.py
|
||||
|
||||
%build
|
||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||
%global optflags_f %{optflags}
|
||||
%ifarch %{ix86}
|
||||
%global test_precflags "-ffloat-store"
|
||||
%endif
|
||||
|
||||
cp make.inc.example make.inc
|
||||
# for ABI compatibility we need to build the deprecated interfaces
|
||||
echo 'BUILD_DEPRECATED = Yes' >> make.inc
|
||||
|
||||
%make_build cleanlib
|
||||
%make_build blaslib \
|
||||
FFLAGS="%{optflags_f} -fPIC"
|
||||
mkdir tmp
|
||||
( cd tmp; ar x ../librefblas.a )
|
||||
gfortran -shared -Wl,-soname=libblas.so.3 -o libblas.so.%{version} -Wl,--no-undefined tmp/*.o
|
||||
ln -s libblas.so.%{version} libblas.so
|
||||
rm -rf tmp
|
||||
|
||||
%make_build cblaslib \
|
||||
CFLAGS="%{optflags} -fPIC -DADD_ "
|
||||
mkdir tmp
|
||||
( cd tmp; ar x ../libcblas.a )
|
||||
gfortran -shared -Wl,-soname=libcblas.so.3 -o libcblas.so.%{version} -Wl,--no-undefined tmp/*.o -L. -lblas
|
||||
ln -s libcblas.so.%{version} libcblas.so
|
||||
rm -rf tmp
|
||||
|
||||
%make_build lapacklib \
|
||||
FFLAGS="%{optflags_f} -fPIC"
|
||||
mkdir tmp
|
||||
( cd tmp; ar x ../liblapack.a )
|
||||
gfortran -shared -Wl,-soname=liblapack.so.3 -o liblapack.so.%{version} -Wl,--no-undefined tmp/*.o -L. -lblas
|
||||
ln -s liblapack.so.%{version} liblapack.so
|
||||
rm -rf tmp
|
||||
|
||||
make %{?_smp_mflags} lapackelib \
|
||||
CFLAGS="%{optflags} -fPIC -DADD_ -DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE"
|
||||
mkdir tmp
|
||||
( cd tmp; ar x ../liblapacke.a )
|
||||
gfortran -shared -Wl,-soname=liblapacke.so.3 -o liblapacke.so.%{version} -Wl,--no-undefined tmp/*.o -L. -llapack
|
||||
ln -s liblapacke.so.%{version} liblapacke.so
|
||||
rm -rf tmp
|
||||
|
||||
# Build test binaries - blas
|
||||
%make_build -C BLAS/TESTING FFLAGS="%{optflags_f} %{?test_precflags}"
|
||||
# Build test binaries - cblas
|
||||
%make_build -C CBLAS/testing FFLAGS="%{optflags_f} %{?test_precflags}"
|
||||
# Build test binaries - lapack
|
||||
%make_build -C TESTING/MATGEN FFLAGS="%{optflags_f} %{?test_precflags}"
|
||||
%make_build -C TESTING/LIN FFLAGS="%{optflags_f} %{?test_precflags}"
|
||||
%make_build -C TESTING/EIG FFLAGS="%{optflags_f} %{?test_precflags}"
|
||||
|
||||
%check
|
||||
# Increase stack size, required for xeigtstz, see
|
||||
# https://github.com/Reference-LAPACK/lapack/issues/335
|
||||
# Remove for lapack > 3.9
|
||||
ulimit -s 16384
|
||||
|
||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||
%global optflags_f %{optflags}
|
||||
case "$RPM_ARCH" in
|
||||
i[0-9]86) PRECFLAGS="-ffloat-store" ;;
|
||||
*) PRECFLAGS="" ;;
|
||||
esac
|
||||
export PRECFLAGS
|
||||
cp make.inc.example make.inc
|
||||
# for ABI compatibility we need to build the deprecated interfaces
|
||||
echo 'BUILD_DEPRECATED = Yes' >> make.inc
|
||||
|
||||
make cleanlib %{?_smp_mflags}
|
||||
make %{?_smp_mflags} blaslib \
|
||||
FFLAGS="%{optflags_f} -fPIC"
|
||||
mkdir tmp
|
||||
( cd tmp; ar x ../librefblas.a )
|
||||
gfortran -shared -Wl,-soname=libblas.so.3 -o libblas.so.%{version} tmp/*.o
|
||||
ln -s libblas.so.%{version} libblas.so
|
||||
rm -rf tmp
|
||||
|
||||
make blas_testing \
|
||||
FFLAGS="%{optflags_f} $PRECFLAGS" \
|
||||
FFLAGS_NOOPT="%{optflags_f} $PRECFLAGS -O0"
|
||||
if grep -B15 -A15 FAIL BLAS/*.out; then
|
||||
%make_build blas_testing FFLAGS="%{optflags_f} %{?test_precflags}"
|
||||
if grep -B15 -A15 FAIL BLAS/TESTING/*.out; then
|
||||
echo
|
||||
echo "blas_testing FAILED"
|
||||
false
|
||||
fi
|
||||
mv librefblas.a libblas.a
|
||||
|
||||
make %{?_smp_mflags} cblaslib \
|
||||
CFLAGS="%{optflags} -fPIC -DADD_ "
|
||||
mkdir tmp
|
||||
( cd tmp; ar x ../libcblas.a )
|
||||
gfortran -shared -Wl,-soname=libcblas.so.3 -o libcblas.so.%{version} tmp/*.o -L. -lblas
|
||||
ln -s libcblas.so.%{version} libcblas.so
|
||||
rm -rf tmp
|
||||
make %{?_smp_mflags} cblas_testing \
|
||||
CFLAGS="%{optflags} -fPIC"
|
||||
grep -B15 -A15 FAIL TESTING/*.out && false
|
||||
%make_build cblas_testing CFLAGS="%{optflags} -fPIC"
|
||||
grep -B15 -A15 FAIL CBLAS/testing/*.out && false
|
||||
|
||||
make %{?_smp_mflags} lapacklib \
|
||||
FFLAGS="%{optflags_f} -fPIC"
|
||||
mkdir tmp
|
||||
( cd tmp; ar x ../liblapack.a )
|
||||
gfortran -shared -Wl,-soname=liblapack.so.3 -o liblapack.so.%{version} tmp/*.o -L. -lblas
|
||||
ln -s liblapack.so.%{version} liblapack.so
|
||||
rm -rf tmp
|
||||
|
||||
cd LAPACKE
|
||||
make %{?_smp_mflags} lapacke \
|
||||
CFLAGS="%{optflags} -fPIC -DADD_ -DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE"
|
||||
mkdir tmp
|
||||
( cd tmp; ar x ../../liblapacke.a )
|
||||
gfortran -shared -Wl,-soname=liblapacke.so.3 -o liblapacke.so.%{version} tmp/*.o -L.. -llapack
|
||||
ln -s liblapacke.so.%{version} liblapacke.so
|
||||
rm -rf tmp
|
||||
cd ..
|
||||
|
||||
make lapack_testing \
|
||||
FFLAGS="%{optflags_f} $PRECFLAGS"
|
||||
%make_build lapack_testing FFLAGS="%{optflags_f} %{?test_precflags}"
|
||||
if grep -B15 -A15 FAIL TESTING/*.out; then
|
||||
echo
|
||||
echo "lapack_testing FAILED"
|
||||
@ -287,7 +292,7 @@ install -d %{buildroot}/%{_sysconfdir}/alternatives
|
||||
install -d %{buildroot}/%{_includedir}
|
||||
## BLAS
|
||||
install -d %{buildroot}/%{_libdir}/blas
|
||||
install -m 644 libblas.a %{buildroot}/%{_libdir}
|
||||
install -m 644 librefblas.a %{buildroot}/%{_libdir}/libblas.a
|
||||
install -m 755 libblas.so.%{version} %{buildroot}/%{_libdir}/blas
|
||||
ln -s libblas.so.%{version} %{buildroot}/%{_libdir}/blas/libblas.so.3
|
||||
ln -s blas/libblas.so.%{version} %{buildroot}/%{_libdir}/libblas.so
|
||||
@ -304,13 +309,11 @@ install -m 755 liblapack.so.%{version} %{buildroot}/%{_libdir}/lapack
|
||||
ln -s liblapack.so.%{version} %{buildroot}/%{_libdir}/lapack/liblapack.so.3
|
||||
ln -s lapack/liblapack.so.%{version} %{buildroot}/%{_libdir}/liblapack.so
|
||||
## LAPACKE
|
||||
cd LAPACKE
|
||||
install -m 644 include/*.h %{buildroot}/%{_includedir}
|
||||
install -m 644 ../liblapacke.a %{buildroot}/%{_libdir}
|
||||
install -m 644 LAPACKE/include/*.h %{buildroot}/%{_includedir}
|
||||
install -m 644 liblapacke.a %{buildroot}/%{_libdir}
|
||||
install -m 755 liblapacke.so.%{version} %{buildroot}/%{_libdir}/lapack
|
||||
ln -s liblapacke.so.%{version} %{buildroot}/%{_libdir}/lapack/liblapacke.so.3
|
||||
ln -s lapack/liblapacke.so.%{version} %{buildroot}/%{_libdir}/liblapacke.so
|
||||
cd ..
|
||||
|
||||
%post -n libblas3
|
||||
%{_sbindir}/update-alternatives --install \
|
||||
|
Loading…
Reference in New Issue
Block a user