From 9f78bb124bc6c896b5042d7bcd75de535cc50577d0c6c9cd09b67197cc79a5a3 Mon Sep 17 00:00:00 2001 From: Dmitry Roshchin Date: Mon, 4 Nov 2024 12:45:03 +0000 Subject: [PATCH] - Add -ffp-contract=off flag for aarch64 to avoid precision issues https://github.com/scipy/scipy/issues/21475#issuecomment-2454203196 OBS-URL: https://build.opensuse.org/package/show/science/lapack?expand=0&rev=52 --- .gitattributes | 23 ++ .gitignore | 1 + _multibuild | 4 + baselibs.conf | 49 ++++ fix-lapack-testing.patch | 13 + lapack-3.12.0.tar.gz | 3 + lapack.changes | 594 +++++++++++++++++++++++++++++++++++++++ lapack.rpmlintrc | 3 + lapack.spec | 506 +++++++++++++++++++++++++++++++++ 9 files changed, 1196 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 baselibs.conf create mode 100644 fix-lapack-testing.patch create mode 100644 lapack-3.12.0.tar.gz create mode 100644 lapack.changes create mode 100644 lapack.rpmlintrc create mode 100644 lapack.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..e8e66d9 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + static + + diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..89098fd --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,49 @@ +libblas3 + -/usr/lib(64)?/libblas.so.3 + requires "update-alternatives" + postin "ln -sf /etc/alternatives/libblas.so.3_ /usr/%_lib/libblas.so.3" + postin "/usr/sbin/update-alternatives --force --install /usr/%_lib/libblas.so.3 libblas.so.3_ /usr/%_lib/blas/libblas.so.3 50" + postun "/usr/sbin/update-alternatives --remove libblas.so.3_ /usr/%_lib/blas/libblas.so.3" + +libcblas3 + -/usr/lib(64)?/libcblas.so.3 + requires "update-alternatives" + postin "ln -sf /etc/alternatives/libcblas.so.3_ /usr/%_lib/libcblas.so.3" + postin "/usr/sbin/update-alternatives --force --install /usr/%_lib/libcblas.so.3 libcblas.so.3_ /usr/%_lib/blas/libcblas.so.3 50" + postun "/usr/sbin/update-alternatives --remove libcblas.so.3_ /usr/%_lib/blas/libcblas.so.3" + +liblapack3 + -/usr/lib(64)?/liblapack.so.3 + requires "update-alternatives" + postin "ln -sf /etc/alternatives/liblapack.so.3_ /usr/%_lib/liblapack.so.3" + postin "/usr/sbin/update-alternatives --force --install /usr/%_lib/liblapack.so.3 liblapack.so.3_ /usr/%_lib/lapack/liblapack.so.3 50" + postun "/usr/sbin/update-alternatives --remove liblapack.so.3_ /usr/%_lib/lapack/liblapack.so.3" + +liblapacke3 + -/usr/lib(64)?/liblapacke.so.3 + requires "update-alternatives" + postin "ln -sf /etc/alternatives/liblapacke.so.3_ /usr/%_lib/liblapacke.so.3" + postin "/usr/sbin/update-alternatives --force --install /usr/%_lib/liblapacke.so.3 liblapacke.so.3_ /usr/%_lib/lapack/liblapacke.so.3 50" + postun "/usr/sbin/update-alternatives --remove liblapacke.so.3_ /usr/%_lib/lapack/liblapacke.so.3" + +# Do not package pkgconfig files for devel packages as they lead to "choice" +# issues between -devel and -32bit-devel when using pkgconfig(FOO) based deps +blas-devel + -/usr/lib(64)?/pkgconfig/blas.pc + requires "blas-devel- = " + requires "libblas3- = " + +cblas-devel + -/usr/lib(64)?/pkgconfig/cblas.pc + requires "blas-devel- = " + requires "libcblas3- = " + +lapack-devel + -/usr/lib(64)?/pkgconfig/lapack.pc + requires "blas-devel- = " + requires "liblapack3- = " + +lapacke-devel + -/usr/lib(64)?/pkgconfig/lapacke.pc + requires "lapack-devel- = " + requires "liblapacke3- = " diff --git a/fix-lapack-testing.patch b/fix-lapack-testing.patch new file mode 100644 index 0000000..6a32e86 --- /dev/null +++ b/fix-lapack-testing.patch @@ -0,0 +1,13 @@ +diff --git a/lapack_testing.py b/lapack_testing.py +index ae59926b88..96fbeb2a68 100755 +--- a/lapack_testing.py ++++ b/lapack_testing.py +@@ -136,7 +136,7 @@ def run_summary_test( f, cmdline, short_summary): + for line in pipe.readlines(): + f.write(str(line)) + words_in_line=line.split() +- if (line.find("run")!=-1): ++ if (line.find("run)")!=-1): + # print line + whereisrun=words_in_line.index("run)") + nb_test_run+=int(words_in_line[whereisrun-2]) diff --git a/lapack-3.12.0.tar.gz b/lapack-3.12.0.tar.gz new file mode 100644 index 0000000..b4e46a0 --- /dev/null +++ b/lapack-3.12.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eac9570f8e0ad6f30ce4b963f4f033f0f643e7c3912fc9ee6cd99120675ad48b +size 7933607 diff --git a/lapack.changes b/lapack.changes new file mode 100644 index 0000000..6ce55e3 --- /dev/null +++ b/lapack.changes @@ -0,0 +1,594 @@ +------------------------------------------------------------------- +Mon Nov 4 09:42:18 UTC 2024 - Guillaume GARDET + +- Add -ffp-contract=off flag for aarch64 to avoid precision issues + https://github.com/scipy/scipy/issues/21475#issuecomment-2454203196 + +------------------------------------------------------------------- +Thu Jul 4 11:54:08 UTC 2024 - Daniel Garcia + +- Add fix-lapack-testing.patch to fix tests + gh#Reference-LAPACK/lapack@5b0687f429cf + +------------------------------------------------------------------- +Fri Jun 14 03:09:33 UTC 2024 - Atri Bhattacharya + +- Rename isnan man file to avoid conflict with libm's isnan (from + package man-pages). + +------------------------------------------------------------------- +Sat May 4 20:55:24 UTC 2024 - Atri Bhattacharya + +- Update to version 3.12.0 (boo#1223783): + * Long list of changes, see + . +- Drop all upstreamed or otherwise fixed patches: + * lapack-3.2.2.patch + * Fix-MinGW-build-error.patch + * Fix-some-minor-inconsistencies-in-LAPACKE_czgesvdq.patch + * Avoid-out-of-bounds-accesses-in-complex-EIG-tests.patch + * Fix-out-of-bounds-read.patch + * Restore_missing_deprecated_prototypes.patch + * Fix-testing-input.patch +- Use cmake for configure and ninja for build. +- Package pkgconf and cmake scripts for -devel pkgs. +- Drop multibuild flavour for man files. +- Add multibuild flavour for static libs (also used to build man + files). +- Build man files using doxygen instead of using pre-built files. +- Explicitly symlink library to relocated shared libs in + baselibs.conf (boo#1207563). +- Recommend lapack-man package from + {blas,lapack,lapacke,cblas}-devel packages. + +------------------------------------------------------------------- +Mon Mar 11 11:42:31 UTC 2024 - Richard Biener + +- Add Fix-testing-input.patch to remove stray ';' in the input data + for TESTING/dgebal.in now rejected with the GFortran 14 runtime. + +------------------------------------------------------------------- +Thu May 4 11:11:20 UTC 2023 - Dominique Leuenberger + +- Add _multibuild to define 2nd spec file as additional flavor. + Eliminates the need for source package links in OBS. + +------------------------------------------------------------------- +Thu Feb 23 16:58:25 UTC 2023 - Egbert Eich + +- Set -mfpmath=sse for the entire build for ix86 platforms + on SLE/Leap. Since we build for x86_64, we know that sse + is available. + This helps to avoid effects from excess precision that + can be seen in the test suite. + On Factory we leave -ffloat-store for the test suite + only as this option comes at a performance penalty. + We may see precision related issues in the test suite + with future compilers regardless. + +------------------------------------------------------------------- +Wed Feb 15 08:51:06 UTC 2023 - Egbert Eich + +- As a configurable option add tmglib code to the LAPACK librarly + and enable TMG in LAPACKE as the header files provide its API + (boo#1207989 & bsc#1087426). +- Fix update-alternatives for lapacke (bsc#1207358). +- Restore generic link for update-alternatives. This is usually + set by the update-alternatives and it is '%ghost'ed but rpmlint + complains. +- Move update-alternatives --remove to %%postun to stop rpmlint + from complaining. +- Removed useless - because never executed - %%postrans scriptlets. +- Added missing _%%{_arch} to update-alternative names. +- rpmlint complains anyway - this time about alternative-link-missing + - as it does not understand the _%%{_arch} endings: muffle with + rpmlintrc. +- Make arch-dependent generic names conditional. + +------------------------------------------------------------------- +Fri Feb 10 00:32:30 UTC 2023 - Stefan Brüns + +- 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 + +- Remove unneeded links. These will be taken care of by the + update-alternatives. This will bring this package in sync + with openblas. + +------------------------------------------------------------------- +Thu Feb 2 13:16:02 UTC 2023 - Richard Biener + +- Build deprecated functions again to avoid breaking the ABI. + (boo#1207989) + +------------------------------------------------------------------- +Wed Jan 25 20:47:53 UTC 2023 - Egbert Eich + +- Make library links in the alternatives directory arch dependent. + This avoids conflicts when both 32-bit and 64-bit versions are + installed (boo#1207563). + +------------------------------------------------------------------- +Tue Mar 15 14:20:50 UTC 2022 - Egbert Eich + +- Consolidate dummy links for update-alternatives bringing them + in sync with openblas. Add alternatives for lapacke. + +------------------------------------------------------------------- +Mon Jan 3 08:34:37 UTC 2022 - Richard Biener + +- 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) + +------------------------------------------------------------------- +Mon Jul 19 08:24:18 UTC 2021 - Ismail Dönmez + +- Rename conflicting MIN.3 and MAX.3 manpages into lapack-{MAX,MIN}.3 + +------------------------------------------------------------------- +Wed Jul 14 11:12:25 UTC 2021 - Dominique Leuenberger + +- Do not create the dummy files in /etc/alternatives during + %install: managed by update-alternatives and packaged as ghost. + +------------------------------------------------------------------- +Mon May 10 14:25:33 UTC 2021 - Dirk Müller + +- stop owning directories provided by filesystem (bsc#1184786) + +------------------------------------------------------------------- +Mon Oct 12 16:48:38 UTC 2020 - Stefan Brüns + +- 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 + +------------------------------------------------------------------- +Fri Oct 9 21:00:30 UTC 2020 - Stefan Brüns + +- 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 + +------------------------------------------------------------------- +Fri Oct 9 17:28:03 UTC 2020 - Stefan Brüns + +- 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 + +------------------------------------------------------------------- +Fri Mar 13 14:58:33 UTC 2020 - Martin Liška + +- Add -std=legacy in order to fix boo#1166619. + +------------------------------------------------------------------- +Fri Aug 2 07:03:54 UTC 2019 - Martin Liška + +- Use FAT LTO objects in order to provide proper static library. + +------------------------------------------------------------------- +Thu Mar 29 13:11:32 UTC 2018 - badshah400@gmail.com + +- Update to version 3.8.0: + * Symmetric-indefinite Factorization: Aasen’s tridiagonalization + 2 stage. + * LAPACKE interfaces. +- Static -pic libraries are no longer built. + +------------------------------------------------------------------- +Fri Jan 12 14:29:36 UTC 2018 - rguenther@suse.com + +- Package lapack_testing.py from lapack 3.8.0 with adjusted interpreter + and adjust BuildRequires to python3. [bnc#1075766] + +------------------------------------------------------------------- +Wed May 31 21:39:51 UTC 2017 - jengelh@inai.de + +- Correct RPM groups + +------------------------------------------------------------------- +Wed May 17 22:59:46 UTC 2017 - dimstar@opensuse.org + +- 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. + +------------------------------------------------------------------- +Fri May 8 20:20:52 UTC 2015 - dmitry_r@opensuse.org + +- Fix static libraries list + +------------------------------------------------------------------- +Wed Jul 16 08:39:20 UTC 2014 - idonmez@suse.com + +- Add baselibs.conf to sources + +------------------------------------------------------------------- +Mon Jul 14 16:38:58 UTC 2014 - toddrme2178@gmail.com + +- Include update-alternatives dependency in subpackages that use it + to guarantee it will be available. + +------------------------------------------------------------------- +Wed Jun 18 08:15:19 UTC 2014 - dmitry_r@opensuse.org + +- Move blas and lapack libraries to subdirectories for fixing + update-alternatives [bnc#861081] +- Add %posttrans scripts for fixing migration problems. + +------------------------------------------------------------------- +Thu Nov 21 20:52:18 UTC 2013 - burnus@net-b.de + +- 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 + +------------------------------------------------------------------- +Tue Oct 29 12:53:29 UTC 2013 - lnt-sysadmin@lists.lrz.de + +- packaged symlinks created by update-alternative as %ghost files +- removed quotes from update-alternative command to silence rpmlint warning + +------------------------------------------------------------------- +Fri Mar 15 18:53:22 UTC 2013 - dmitry_r@opensuse.org + +- Split devel packages into devel and devel-static + +------------------------------------------------------------------- +Sun Jan 13 00:04:56 UTC 2013 - scorot@free.fr + +- add update-alternative support to allow user to easily switch + between several blas and lapack libraries + +------------------------------------------------------------------- +Tue Nov 6 10:10:53 UTC 2012 - burnus@net-b.de + +- Update to 3.4.2 + * Bug fixes + +------------------------------------------------------------------- +Wed Jul 25 14:30:36 UTC 2012 - idonmez@suse.com + +- Fix bnc#772628 + +------------------------------------------------------------------- +Thu Jul 19 20:44:04 UTC 2012 - scorot@free.fr + +- update baselibs.conf + +------------------------------------------------------------------- +Sun Jul 15 18:47:19 UTC 2012 - scorot@free.fr + +- build the c interface lapacke + +------------------------------------------------------------------- +Thu May 31 13:52:43 CEST 2012 - kukuk@suse.de + +- doxygen >= 1.7 is required for building docu + +------------------------------------------------------------------- +Mon May 21 14:40:18 UTC 2012 - saschpe@suse.de + +- Change obsoletes '<=' for lapack and blas back to '<', there was a + version update in between +- Remove psfig.tex (bnc#757332) + +------------------------------------------------------------------- +Wed May 9 13:04:08 UTC 2012 - coolo@suse.com + +- fixing dependencies for devel-32bit + +------------------------------------------------------------------- +Fri May 4 13:44:58 UTC 2012 - burnus@net-b.de + +- Update to 3.4.1 + * Bug fixes + +------------------------------------------------------------------- +Mon Apr 2 11:47:20 UTC 2012 - rguenther@suse.com + +- Undo spec file obfuscation + +------------------------------------------------------------------- +Fri Mar 30 14:11:58 UTC 2012 - toddrme2178@gmail.com + +- 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 + +------------------------------------------------------------------- +Wed Mar 14 12:31:13 UTC 2012 - saschpe@suse.de + +- 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 + +------------------------------------------------------------------- +Mon Feb 13 10:48:17 UTC 2012 - coolo@suse.com + +- patch license to follow spdx.org standard + +------------------------------------------------------------------- +Wed Nov 23 14:04:54 UTC 2011 - jengelh@medozas.de + +- Remove redundant/unwanted tags/section (cf. specfile guidelines) +- Use %_smp_mflags for parallel building + +------------------------------------------------------------------- +Wed Nov 16 21:03:58 UTC 2011 - burnus@net-b.de + +- 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 + +------------------------------------------------------------------- +Fri Sep 9 13:58:10 UTC 2011 - burnus@net-b.de + +- Run BLAS and LAPACK testsuite when building + +------------------------------------------------------------------- +Thu May 12 07:12:55 UTC 2011 - burnus@net-b.de + +- 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 + +------------------------------------------------------------------- +Thu Aug 12 13:52:25 UTC 2010 - rguenther@novell.com + +- Add baselibs. [bnc#630656] + +------------------------------------------------------------------- +Thu Jul 8 14:36:20 UTC 2010 - burnus@net-b.de + +- Update to version 3.2.2 + * Bug fix release + * Changes see at http://www.netlib.org/lapack/lapack-3.2.2.html + +------------------------------------------------------------------- +Tue Feb 9 18:56:59 CET 2010 - prusnak@suse.cz + +- package man and blas-man as noarch + +------------------------------------------------------------------- +Wed Jan 13 13:15:58 CET 2010 - rguenther@suse.de + +- Drop -O3 -funroll-all-loops compiler flags, build dcabs1.f with -O0. + [bnc#569978] + +------------------------------------------------------------------- +Mon May 18 15:26:56 CEST 2009 - dominique-obs@leuenberger.net + +- Update to version 3.2.1 [bnc#504669] + * Changes see at http://www.netlib.org/lapack/lapack-3.2.1.html + +------------------------------------------------------------------- +Wed Jan 28 13:22:03 CET 2009 - rguenther@suse.de + +- 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 + +------------------------------------------------------------------- +Sun May 11 14:21:24 CEST 2008 - lrupp@suse.de + +- use versioned requires/obsoletes +- %run_ldconfig is deprecated +- prefix the patch with the packagename + +------------------------------------------------------------------- +Fri Apr 27 14:17:41 CEST 2007 - rguenther@suse.de + +- 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. + +------------------------------------------------------------------- +Fri Jan 19 11:35:01 CET 2007 - rguenther@suse.de + +- Include fixes for the 3.1.0 errata. +- Add missing CSROT, DROTM, DROTMG, DSDOT, SDSDOT, SROTM, SROTMG + and ZDROT from blas distribution. [#228824] + +------------------------------------------------------------------- +Thu Dec 14 12:57:12 CET 2006 - rguenther@suse.de + +- Restore missing so symlinks. + +------------------------------------------------------------------- +Tue Nov 14 17:26:52 CET 2006 - rguenther@suse.de + +- Update to version 3.1.0. +- Rename blasman to blas-man. +- Rename lapack-manpages to lapack-man. + +------------------------------------------------------------------- +Tue Oct 31 15:48:05 CET 2006 - rguenther@suse.de + +- 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. + +------------------------------------------------------------------- +Wed Jan 25 21:37:18 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Sat Jan 14 13:26:51 CET 2006 - kukuk@suse.de + +- Add gmp-devel to nfb + +------------------------------------------------------------------- +Fri Apr 22 10:40:54 CEST 2005 - meissner@suse.de + +- fixed all other instances of -fno-f2c, and g77 -> gfortran use. + +------------------------------------------------------------------- +Thu Apr 21 17:33:58 CEST 2005 - meissner@suse.de + +- g77 -> gfortran, -fno-f2c is no more. + +------------------------------------------------------------------- +Sat Jan 29 22:25:13 CET 2005 - nashif@suse.de + +- Updated manpages (#48784) + +------------------------------------------------------------------- +Thu Jan 20 01:22:36 CET 2005 - ro@suse.de + +- remove BuildPrereq, BuildRequires is generated + +------------------------------------------------------------------- +Thu Mar 18 05:17:48 CET 2004 - nashif@suse.de + +- Fixed permission for manpages (#36340) + +------------------------------------------------------------------- +Sat Jan 10 10:04:03 CET 2004 - adrian@suse.de + +- add %run_ldconfig + +------------------------------------------------------------------- +Mon Feb 3 14:10:13 CET 2003 - meissner@suse.de + +- Use $RPM_OPT_FLAGS, so it builds on ppc64. + +------------------------------------------------------------------- +Mon Aug 26 19:26:23 CEST 2002 - nashif@suse.de + +- Fixed manpage conflict +- correct library version + +------------------------------------------------------------------- +Mon Jul 1 11:02:05 CEST 2002 - ro@suse.de + +- use -fPIC for all shared objects +- link liblapack with shared libblas (same reason) + +------------------------------------------------------------------- +Thu May 2 15:16:43 CEST 2002 - sf@suse.de + +- fixed %{_lib}-problems for x86_64 + +------------------------------------------------------------------- +Mon Sep 17 17:08:04 CEST 2001 - nashif@suse.de + +- Fixed bug #9925, adding blas to required packages. + +------------------------------------------------------------------- +Tue May 8 12:53:04 CEST 2001 - nashif@suse.de + +- Fixed bug #6803 + +------------------------------------------------------------------- +Thu Feb 8 12:12:06 CET 2001 - sf@suse.de + +- compile with '-01' for IA64 due to 'internal compiler error' in g77 + +------------------------------------------------------------------- +Mon Nov 6 06:36:15 MET 2000 - nashif@suse.de + +- Fixed bug of missing objects (#4028) + +------------------------------------------------------------------- +Sat Apr 22 01:22:23 CEST 2000 - nashif@suse.de + +- Applied new patches +- Modified group, url and files in spec + +------------------------------------------------------------------- +Mon Feb 21 13:55:15 CET 2000 - nashif@suse.de + +- Applied new patches + +------------------------------------------------------------------- +Tue Jan 18 23:22:56 CET 2000 - nashif@suse.de + +- Applied new patched +- Moved manpages to /usr/share/man + +------------------------------------------------------------------- +Thu Dec 23 19:37:04 CET 1999 - nashif@suse.de + +- Update to latest version +- Package split lapack + blas + +------------------------------------------------------------------- +Thu Oct 7 11:17:15 CEST 1999 - nashif@suse.de + + - Package split: man pages + libraries + +------------------------------------------------------------------- +Wed Sep 22 21:21:06 CEST 1999 - nashif@suse.de + + - New package: LAPACK + Linear Algebra Package (LAPACK) + diff --git a/lapack.rpmlintrc b/lapack.rpmlintrc new file mode 100644 index 0000000..4072e3e --- /dev/null +++ b/lapack.rpmlintrc @@ -0,0 +1,3 @@ +# rpmlint get update-alternatives generic names wrong consistently +# as it doesn't understand the _%{_arch} extensions. +addFilter(".* alternative-link-missing.*") diff --git a/lapack.spec b/lapack.spec new file mode 100644 index 0000000..8bb391c --- /dev/null +++ b/lapack.spec @@ -0,0 +1,506 @@ +# +# spec file for package lapack +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%global pname lapack +%if "%{flavor}" == "static" +%define psuffix -static +%bcond_with shared +# Generate man files for the static flavour to avoid additional deps/build time +# for main flavour +%bcond_without man +%else +%define psuffix %{nil} +%bcond_without shared +%bcond_with man +%endif +%define __builder ninja +%define so_ver 3 +%bcond_without tmg + +# For Leap 15.X, we do not need arch dependent symlink names because no baselibs are generated +%if 0%{?suse_version} >= 1500 +%define a_x _%{_arch} +%endif +Name: %{pname}%{?psuffix} +Version: 3.12.0 +Release: 0 +Summary: Linear Algebra PACKage +License: BSD-3-Clause +URL: https://www.netlib.org/lapack/ +Source0: https://github.com/Reference-LAPACK/lapack/archive/v%{version}.tar.gz#/%{pname}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix-lapack-testing.patch gh#Reference-LAPACK/lapack@5b0687f429cf +Patch1: fix-lapack-testing.patch +Source98: lapack.rpmlintrc +Source99: baselibs.conf +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: gcc-fortran +BuildRequires: ninja +BuildRequires: python-rpm-macros +BuildRequires: python3-base +# SECTION Requirements for MAN files +%if %{with man} +BuildRequires: doxygen +BuildRequires: graphviz +%endif +# /SECTION + +%description +LAPACK provides routines for solving systems of simultaneous linear +equations, least-squares solutions of linear systems of equations, +eigenvalue problems, and singular value problems. The associated matrix +factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are +also provided, as are related computations such as reordering of the +Schur factorizations and estimating condition numbers. Dense and banded +matrices are handled, but not general sparse matrices. In all areas, +similar functionality is provided for real and complex matrices, in +both single and double precision. + + +# LAPACK +%package -n liblapack%{so_ver} +Summary: Linear Algebra PACKage: Shared Library +Requires(post): update-alternatives +Requires(postun): update-alternatives + +%description -n liblapack%{so_ver} +LAPACK provides routines for solving systems of simultaneous linear +equations, least-squares solutions of linear systems of equations, +eigenvalue problems, and singular value problems. The associated matrix +factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are +also provided, as are related computations such as reordering of the +Schur factorizations and estimating condition numbers. Dense and banded +matrices are handled, but not general sparse matrices. In all areas, +similar functionality is provided for real and complex matrices, in +both single and double precision. + +This package provides the shared library for LAPACK. + +%package -n %{pname}-devel +Summary: Linear Algebra PACKage: headers and source files for development +Requires: blas-devel = %{version} +Requires: liblapack%{so_ver} = %{version} +Recommends: lapack-man = %{version} +Provides: lapack = %{version} +Obsoletes: lapack < %{version} + +%description -n %{pname}-devel +LAPACK provides routines for solving systems of simultaneous linear +equations, least-squares solutions of linear systems of equations, +eigenvalue problems, and singular value problems. The associated matrix +factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are +also provided, as are related computations such as reordering of the +Schur factorizations and estimating condition numbers. Dense and banded +matrices are handled, but not general sparse matrices. In all areas, +similar functionality is provided for real and complex matrices, in +both single and double precision. + +%package -n %{pname}-devel-static +Summary: Linear Algebra PACKage - static libraries +Requires: lapack-devel = %{version} + +%description -n %{pname}-devel-static +LAPACK provides routines for solving systems of simultaneous linear +equations, least-squares solutions of linear systems of equations, +eigenvalue problems, and singular value problems. The associated matrix +factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are +also provided, as are related computations such as reordering of the +Schur factorizations and estimating condition numbers. Dense and banded +matrices are handled, but not general sparse matrices. In all areas, +similar functionality is provided for real and complex matrices, in +both single and double precision. + +This package provides the static library for LAPACK. + + +# BLAS +%package -n libblas%{so_ver} +Summary: Basic Linear Algebra Subprograms: Shared Library +Requires(post): update-alternatives +Requires(postun): update-alternatives + +%description -n libblas%{so_ver} +BLAS (Basic Linear Algebra Subprograms) is a standard library for +numerical algebra. BLAS provides a number of basic algorithms for +linear algebra. + +This package provides the shared library for BLAS. + +%package -n blas-devel +Summary: Basic Linear Algebra Subprograms: headers and sources for development +Requires: libblas%{so_ver} = %{version} +Recommends: lapack-man = %{version} +Provides: blas = %{version} +Obsoletes: blas < %{version} + +%description -n blas-devel +BLAS (Basic Linear Algebra Subprograms) is a standard library for +numerical algebra. BLAS provides a number of basic algorithms for +linear algebra. BLAS is fast and well-tested, was written in FORTRAN 77 +and built with gfortran. BLAS manual pages are available in the +blas-man package. + +%package -n blas-devel-static +Summary: Basic Linear Algebra Subprograms: static library +Requires: blas-devel = %{version} + +%description -n blas-devel-static +BLAS (Basic Linear Algebra Subprograms) is a standard library for +numerical algebra. BLAS provides a number of basic algorithms for +linear algebra. BLAS is fast and well-tested, was written in FORTRAN 77 +and built with gfortran. BLAS manual pages are available in the +blas-man package. + +This package provides the static library for BLAS. + + +# LAPACKE +%package -n liblapacke%{so_ver} +Summary: Native C Interface to LAPACK: shared library +Requires(post): update-alternatives +Requires(postun): update-alternatives + +%description -n liblapacke%{so_ver} +This library provides a native C interface to LAPACK routines available +at www.netlib.org/lapack to facilitate usage of LAPACK functionality +for C programmers. + +%package -n lapacke-devel +Summary: Native C Interface to LAPACK: headers and sources for development +Requires: liblapacke%{so_ver} = %{version} +Recommends: lapack-man = %{version} +Provides: lapacke = %{version} + +%description -n lapacke-devel +LAPACKE provides a native C interface to LAPACK routines available +at www.netlib.org/lapack to facilitate usage of LAPACK functionality +for C programmers. + +This package provides LAPACKE headers and development files. + +%package -n lapacke-devel-static +Summary: Native C Interface to LAPACK: static library +Requires: lapacke-devel = %{version} + +%description -n lapacke-devel-static +LAPACKE provides a native C interface to LAPACK routines available +at www.netlib.org/lapack to facilitate usage of LAPACK functionality +for C programmers. + +This package provides the static library for LAPACKE. + + +# CBLAS +%package -n libcblas%{so_ver} +Summary: Native C interface to BLAS: Shared Library +Requires(post): update-alternatives +Requires(postun): update-alternatives + +%description -n libcblas%{so_ver} +This library provides a native C interface to BLAS routines available +at www.netlib.org/blas to facilitate usage of BLAS functionality +for C programmers. + +%package -n cblas-devel +Summary: Native C interface to BLAS: headers and sources for development +Requires: libcblas%{so_ver} = %{version} +Recommends: lapack-man = %{version} +Provides: cblas = %{version} + +%description -n cblas-devel +This library provides a native C interface to BLAS routines available +at www.netlib.org/blas to facilitate usage of BLAS functionality +for C programmers. + +This package provides the cblas headers and development files. + +%package -n cblas-devel-static +Summary: Native C interface to BLAS: static library +Requires: cblas-devel = %{version} + +%description -n cblas-devel-static +This library provides a native C interface to BLAS routines available +at www.netlib.org/blas to facilitate usage of BLAS functionality +for C programmers. + +This package contains the CBLAS static libraries. + + +# TMGLIB +%package -n libtmglib%{so_ver} +Summary: Test Matrix Generator Library: shared library + +%description -n libtmglib%{so_ver} +This package provides the shared library for tmglib, the Test Matrix Generator +Library. + +%package -n tmglib-devel +Summary: Test Matrix Generator Library: headers and sources for development +Requires: libtmglib%{so_ver} = %{version} + +%description -n tmglib-devel +This package provides the headers and sources needed to develop against tmglib, +the Test Matrix Generator Library. + +%package -n tmglib-devel-static +Summary: Test Matrix Generator Library: static library +Requires: tmglib-devel + +%description -n tmglib-devel-static +This package provides the headers and sources needed to develop against the +tmglib as a static library. + + +# MAN Pages +%package -n lapack-man +Summary: Man pages for BLAS, CBLAS, and LAPACK + +%description -n lapack-man +This package provides the man pages for BLAS, CBLAS, and LAPACK. + +%prep +%autosetup -p1 -n %{pname}-%{version} +sed -i -E '1{s@#!/usr/bin/env python[0-9]*@#!%{_bindir}/python%{python3_version}@}' lapack_testing.py + +%build +%ifarch aarch64 +# https://github.com/scipy/scipy/issues/21475#issuecomment-2454203196 +%global optflags %{optflags} "-ffp-contract=off" +%endif +%ifarch %{ix86} +%if 0%{?sle_version:%sle_version} >= 150000 +%global precflags "-mfpmath=sse" +%global test_precflags %{precflags} +%else +%global test_precflags "-ffloat-store" +%endif +%endif + +%if %{without shared} +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects +%endif +%global optflags_f %{optflags} + +%cmake \ + -DBUILD_SHARED_LIBS=%{?with_shared:ON}%{!?with_shared:OFF} \ + -DBLAS++=OFF \ + -DLAPACK++=OFF \ + -DCBLAS=ON \ + -DLAPACKE=ON \ + -DLAPACKE_WITH_TMG=%{?with_tmglib:ON}%{!?with_tmglib:OFF} \ + -DBUILD_DEPRECATED=ON \ + -DBUILD_MAN_DOCUMENTATION=%{?with_man:ON}%{!?with_man:OFF} \ + -DBUILD_TESTING=ON \ + %{nil} +%cmake_build + +%if %{with man} +doxygen Doxyfile.man +%endif + +%install +%cmake_install + +%if %{with shared} +# Prepare for update-alternatives +install -d %{buildroot}%{_sysconfdir}/alternatives +install -d %{buildroot}%{_libdir}/{lapack,blas} +mv %{buildroot}%{_libdir}/liblapack{,e}.so.* %{buildroot}%{_libdir}/lapack/ +mv %{buildroot}%{_libdir}/lib{,c}blas.so.* %{buildroot}%{_libdir}/blas/ + +# Create the symlinks +for t in blas cblas lapack lapacke +do + ln -s %{_sysconfdir}/alternatives/lib${t}.so.%{so_ver}%{?a_x} %{buildroot}%{_libdir}/lib${t}.so.%{so_ver} +done + +%else +# Remove headers and script files for static flavour to avoid file conflicts +rm -fr %{buildroot}%{_includedir}/*.h \ + %{buildroot}%{_libdir}/cmake \ + %{buildroot}%{_libdir}/pkgconfig +%endif + +%if %{with man} +# Delete weirdly named man files +rm %{__builddir}/DOCS/man/man3/_*_.3 +# Rename isnan to avoid conflict with libm's isnan man file (package man-pages) +mv %{__builddir}/DOCS/man/man3/isnan{,-lapack}.3 +# Install man pages +mkdir -p %{buildroot}%{_mandir} +cp -r %{__builddir}/DOCS/man/man3 %{buildroot}%{_mandir}/ +%endif + +%check +%ctest + +%if %{with shared} +%ldconfig_scriptlets -n libtmglib%{so_ver} + +# BLAS +%post -n libblas%{so_ver} +%{_sbindir}/update-alternatives --install \ + %{_libdir}/libblas.so.%{so_ver} libblas.so.%{so_ver}%{?a_x} %{_libdir}/blas/libblas.so.%{so_ver} 50 +/sbin/ldconfig + +%postun -n libblas%{so_ver} +/sbin/ldconfig +if [ ! %{_libdir}/blas/libblas.so.%{so_ver} ] ; then + %{_sbindir}/update-alternatives --remove libblas.so.%{so_ver}%{?a_x} %{_libdir}/blas/libblas.so.%{so_ver} +fi +# /BLAS + +# LAPACK +%post -n liblapack%{so_ver} +%{_sbindir}/update-alternatives --install \ + %{_libdir}/liblapack.so.%{so_ver} liblapack.so.%{so_ver}%{?a_x} %{_libdir}/lapack/liblapack.so.%{so_ver} 50 +/sbin/ldconfig + +%postun -n liblapack%{so_ver} +/sbin/ldconfig +if [ ! -f %{_libdir}/lapack/liblapack.so.%{so_ver} ] ; then + %{_sbindir}/update-alternatives --remove liblapack.so.%{so_ver}%{?a_x} %{_libdir}/lapack/liblapack.so.%{so_ver} +fi +# /LAPACK + +# CBLAS +%post -n libcblas%{so_ver} +%{_sbindir}/update-alternatives --install \ + %{_libdir}/libcblas.so.%{so_ver} libcblas.so.%{so_ver}%{?a_x} %{_libdir}/blas/libcblas.so.%{so_ver} 50 +/sbin/ldconfig + +%postun -n libcblas%{so_ver} +/sbin/ldconfig +if [ ! -f %{_libdir}/blas/libcblas.so.%{so_ver} ] ; then + %{_sbindir}/update-alternatives --remove libcblas.so.%{so_ver}%{?a_x} %{_libdir}/blas/libcblas.so.%{so_ver} +fi +# /CBLAS + +# LAPACKE +%post -n liblapacke%{so_ver} +%{_sbindir}/update-alternatives --install \ + %{_libdir}/liblapacke.so.%{so_ver} liblapacke.so.%{so_ver}%{?a_x} %{_libdir}/lapack/liblapacke.so.%{so_ver} 50 +/sbin/ldconfig + +%postun -n liblapacke%{so_ver} +/sbin/ldconfig +if [ ! -f %{_libdir}/lapack/liblapacke.so.%{so_ver} ] ; then + %{_sbindir}/update-alternatives --remove liblapacke.so.%{so_ver}%{?a_x} %{_libdir}/lapack/liblapacke.so.%{so_ver} +fi +# /LAPACKE +%endif + +# SECTION main vs static flavour packages +%if %{with shared} +%files -n liblapack%{so_ver} +%doc README.md +%license LICENSE +%dir %{_libdir}/lapack +%{_libdir}/lapack/liblapack.so.* +%ghost %{_libdir}/liblapack.so.%{so_ver} +%ghost %{_sysconfdir}/alternatives/liblapack.so.%{so_ver}%{?a_x} + +%files -n libblas%{so_ver} +%doc README.md +%license LICENSE +%dir %{_libdir}/blas +%{_libdir}/blas/libblas.so.* +%ghost %{_libdir}/libblas.so.%{so_ver} +%ghost %{_sysconfdir}/alternatives/libblas.so.%{so_ver}%{?a_x} + +%files -n liblapacke%{so_ver} +%dir %{_libdir}/lapack +%{_libdir}/lapack/liblapacke.so.* +%ghost %{_libdir}/liblapacke.so.%{so_ver} +%ghost %{_sysconfdir}/alternatives/liblapacke.so.%{so_ver}%{?a_x} + +%files -n libcblas%{so_ver} +%doc README.md +%license LICENSE +%dir %{_libdir}/blas +%{_libdir}/blas/libcblas.so.* +%ghost %{_libdir}/libcblas.so.%{so_ver} +%ghost %{_sysconfdir}/alternatives/libcblas.so.%{so_ver}%{?a_x} + +%files -n libtmglib%{so_ver} +%license LICENSE +%{_libdir}/libtmglib.so.%{so_ver}* + +%files -n tmglib-devel +%license LICENSE +%{_libdir}/libtmglib.so + +%files -n %{pname}-devel +%{_libdir}/liblapack.so +%{_includedir}/lapack.h +%{_libdir}/cmake/lapack-%{version}/ +%{_libdir}/pkgconfig/lapack.pc + +%files -n blas-devel +%{_libdir}/libblas.so +%{_libdir}/pkgconfig/blas.pc + +%files -n lapacke-devel +%doc LAPACKE/README +%license LAPACKE/LICENSE +%{_libdir}/liblapacke.so +%{_includedir}/lapacke*.h +%{_libdir}/cmake/lapacke-%{version}/ +%{_libdir}/pkgconfig/lapacke.pc + +%files -n cblas-devel +%doc CBLAS/README +%{_libdir}/libcblas.so +%{_includedir}/cblas*.h +%{_libdir}/cmake/cblas-%{version}/ +%{_libdir}/pkgconfig/cblas.pc + +# End of packages built for main flavour +%else + +# Start of static flavour +%files -n %{pname}-devel-static +%license LICENSE +%{_libdir}/liblapack.a + +%files -n cblas-devel-static +%license LICENSE +%{_libdir}/libcblas.a + +%files -n blas-devel-static +%license LICENSE +%{_libdir}/libblas.a + +%files -n lapacke-devel-static +%license LICENSE +%{_libdir}/liblapacke.a + +%files -n tmglib-devel-static +%license LICENSE +%{_libdir}/libtmglib.a + +%endif +# /SECTION main vs static flavour pkgs + +%if %{with man} +%files -n lapack-man +%{_mandir}/man3/*.3%{?ext_man} +%endif + +%changelog