The package fails in src_test with TEST 26/27 potrf:bug_695 [OK] TEST 27/27 kernel_regress:skx_avx At line 211 of file dgesvd.f Fortran runtime error: Actual string length is shorter than the declared one for dummy argument 'jobu' (-4631464875401412608/1) make[1]: *** [Makefile:45: run_test] Error 2 make[1]: Leaving directory '/var/tmp/portage/sci-libs/openblas-0.3.9/work/openblas-0.3.9/utest' make: *** [Makefile:126: tests] Error 2 When looking at the ebuild, I noticed the file is missing a RESTRICT="!test? ( test )" statement. The attached patch solved this issue for me. It also adds test to IUSE and fixes some minor pkgcheck issues. Reproducible: Always Build log and emerge info as attachments.
Created attachment 642896 [details] openblas-0.3.9:20200531-132847.log.bz2 build log, compressed due to size
Created attachment 642898 [details] emerge-info-openblas-0.3.9.txt output of emerge --info openblas
Created attachment 642900 [details, diff] 0001-sci-libs-openblas-don-t-run-tests-by-default.patch patch against openblas-0.3.9.ebuild to fix the issue.
Comment on attachment 642900 [details, diff] 0001-sci-libs-openblas-don-t-run-tests-by-default.patch Thanks for reporting! >From ac070df4b2f25de399d6935f4b739582a3e7561f Mon Sep 17 00:00:00 2001 >From: Bernd Waibel <waebbl@gmail.com> >Date: Sun, 31 May 2020 19:31:05 +0200 >Subject: [PATCH] sci-libs/openblas: don't run tests by default > >Add test USE flag, RESTRICT and src_prepare, so tests are only run >when appropriate. >Fix some minor issues reported by pkgcheck. > >Closes: https://bugs.gentoo.org/726474 >Package-Manager: Portage-2.3.100, Repoman-2.3.22 >Signed-off-by: Bernd Waibel <waebbl@gmail.com> >--- > sci-libs/openblas/openblas-0.3.9.ebuild | 18 ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) > >diff --git a/sci-libs/openblas/openblas-0.3.9.ebuild b/sci-libs/openblas/openblas-0.3.9.ebuild >index 9aa17003313d..9aef7e449cd8 100644 >--- a/sci-libs/openblas/openblas-0.3.9.ebuild >+++ b/sci-libs/openblas/openblas-0.3.9.ebuild >@@ -6,12 +6,13 @@ inherit fortran-2 toolchain-funcs > > DESCRIPTION="Optimized BLAS library based on GotoBLAS2" > HOMEPAGE="http://xianyi.github.com/OpenBLAS/" >-SRC_URI="https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz" >+SRC_URI="https://github.com/xianyi/OpenBLAS/archive/v${PV}.tar.gz -> ${P}.tar.gz" > > LICENSE="BSD" > SLOT="0" > KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" >-IUSE="dynamic eselect-ldso index-64bit openmp pthread" >+IUSE="dynamic eselect-ldso index-64bit openmp pthread test" >+RESTRICT="!test? ( test )" > REQUIRED_USE="?? ( openmp pthread )" > > RDEPEND=" >@@ -53,6 +54,17 @@ src_unpack() { > fi > } > >+src_prepare() { >+ default >+ # avoid tests target to be run during compile >+ sed -e 's/all :: libs netlib $(RELA) tests shared/all :: libs netlib $(RELA) shared/' \ >+ -i "${S}"/Makefile || die OK, good. >+ if use index-64bit; then >+ sed -e 's/all :: libs netlib $(RELA) tests shared/all :: libs netlib $(RELA) shared/' \ >+ -i "${S}-index-64bit"/Makefile || die >+ fi Is this related to this bug? >+} >+ > src_compile() { > emake > emake -Cinterface shared-blas-lapack >@@ -71,14 +83,12 @@ src_install() { > dodoc GotoBLAS_*.txt *.md Changelog.txt > > if use eselect-ldso; then >- dodir /usr/$(get_libdir)/blas/openblas/ Please explain why. > insinto /usr/$(get_libdir)/blas/openblas/ > doins interface/libblas.so.3 > dosym libblas.so.3 usr/$(get_libdir)/blas/openblas/libblas.so > doins interface/libcblas.so.3 > dosym libcblas.so.3 usr/$(get_libdir)/blas/openblas/libcblas.so > >- dodir /usr/$(get_libdir)/lapack/openblas/ And here. > insinto /usr/$(get_libdir)/lapack/openblas/ > doins interface/liblapack.so.3 > dosym liblapack.so.3 usr/$(get_libdir)/lapack/openblas/liblapack.so >-- >2.26.2 >
(In reply to Benda Xu from comment #4) > Comment on attachment 642900 [details, diff] [details, diff] > >+ if use index-64bit; then > >+ sed -e 's/all :: libs netlib $(RELA) tests shared/all :: libs netlib $(RELA) shared/' \ > >+ -i "${S}-index-64bit"/Makefile || die > >+ fi > > Is this related to this bug? It's related to the "emake -C${S}-index-64bit INTERFACE=1 LIBPREFIX=libopenblas64" call in src_compile. The ${S}-index-64bit dir is copied verbatim in src_unpack and not modified further, so calling make will include the tests target as well. That's why I patched this in addition to the sources in ${S}. TBH, I haven't verified whether it's strictly necessary. > > >+} > >+ > > src_compile() { > > emake > > emake -Cinterface shared-blas-lapack > >@@ -71,14 +83,12 @@ src_install() { > > dodoc GotoBLAS_*.txt *.md Changelog.txt > > > > if use eselect-ldso; then > >- dodir /usr/$(get_libdir)/blas/openblas/ > > Please explain why. According to pkgcheck scan, the call is redundant. Insinto takes care of creating the directory, so this isn't necessary. See the warning for the 0.3.7 versions: RedundantDodir: version 0.3.7: dodir called before insinto, line 74: dodir /usr/$(get_libdir)/blas/openblas/ > > > insinto /usr/$(get_libdir)/blas/openblas/ > > doins interface/libblas.so.3 > > dosym libblas.so.3 usr/$(get_libdir)/blas/openblas/libblas.so > > doins interface/libcblas.so.3 > > dosym libcblas.so.3 usr/$(get_libdir)/blas/openblas/libcblas.so > > > >- dodir /usr/$(get_libdir)/lapack/openblas/ > > And here. dito RedundantDodir: version 0.3.7: dodir called before insinto, line 81: dodir /usr/$(get_libdir)/lapack/openblas/ > > > insinto /usr/$(get_libdir)/lapack/openblas/
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d1f73843cfa098305c04f5aab4b6f608af00455 commit 6d1f73843cfa098305c04f5aab4b6f608af00455 Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2020-06-10 20:51:25 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2020-06-10 20:57:30 +0000 sci-libs/openblas: remove redundant dodirs in the latest version. Bernd noticed this while working on bug 726474. This part of the changeset is obviously correct, so let's get it out of the way. Bug: https://bugs.gentoo.org/726474 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> sci-libs/openblas/openblas-0.3.9.ebuild | 2 -- 1 file changed, 2 deletions(-)
I was able to track this down, it's reproducible with -fbounds-check in your fortran flags: https://github.com/xianyi/OpenBLAS/issues/2657 I'll fix it by filtering that flag out for now.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57e2be19d17640729372235c4c73171e069d2cca commit 57e2be19d17640729372235c4c73171e069d2cca Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2020-06-11 02:29:20 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2020-06-11 02:45:00 +0000 sci-libs/openblas: fix tests with fortran bounds checking enabled. One OpenBLAS test fails when you enable bounds checks in your fortran compiler via e.g. either "-fbounds-check" or "-fcheck=bounds" with gfortran. This was reported upstream at https://github.com/xianyi/OpenBLAS/issues/2657 but in the meantime the easiest thing to do for *our* users is to filter out those flags when USE=test is set. Thanks to Bernd for reporting the problem on bug 726474. Closes: https://bugs.gentoo.org/726474 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> sci-libs/openblas/openblas-0.3.9.ebuild | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18d842851da452a7c6acaa3ea9fc61158bb6bb50 commit 18d842851da452a7c6acaa3ea9fc61158bb6bb50 Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2020-06-11 22:59:06 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2020-06-11 23:25:16 +0000 sci-libs/openblas: disable -fcheck=all as well. We already had to disable -fcheck-bounds, but -fcheck=all enables the bounds checks in addition to whatever else it enables, so we have to filter that flag too. Bug: https://bugs.gentoo.org/726474 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> sci-libs/openblas/openblas-0.3.9-r1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03f1689aa0d72075183bd999192a363994c41195 commit 03f1689aa0d72075183bd999192a363994c41195 Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2022-11-12 11:53:59 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2022-11-12 12:05:19 +0000 sci-libs/openblas: add 0.3.21 I had to rebase the loongarch patch, and removed an old workaround for FFLAGS="-fcheck=bounds" in the test suite, but other than that a standard update. Bug: https://bugs.gentoo.org/726474 Closes: https://bugs.gentoo.org/878883 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> sci-libs/openblas/Manifest | 1 + .../openblas/files/openblas-0.3.21-fix-loong.patch | 237 +++++++++++++++++++++ sci-libs/openblas/openblas-0.3.21.ebuild | 196 +++++++++++++++++ 3 files changed, 434 insertions(+)