* [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation
@ 2025-09-12 19:18 Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 1/6] sci-libs/lapack: Introduce USE=flexiblas for sys flexiblas use Michał Górny
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Michał Górny @ 2025-09-12 19:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Hello,
Here's my "second approximation" to the idea of using sci-libs/flexiblas
as the system LAPACK provider. It is USE flag based rather than
unconditional to make it possible to test it without immediately
removing the existing system.
For the rationale, see:
https://public-inbox.gentoo.org/gentoo-dev/17e9b61bf86ed96abb806685140c9749554d48b1.camel@gentoo.org/T/#t
The implementation follows the following principles:
- top-level BLAS/LAPACK libraries and pkg-config files are replaced by
symlinks to the flexiblas library/pkg-config file, installed by
sci-libs/flexiblas[system-blas]
- sci-libs/lapack[flexiblas] renames installed libraries, pkg-config
files and CMake files by adding a `-reference` suffix to them (to make
place for flexiblas symlinks)
- virtuals get a [flexiblas] flag to pull
sci-libs/flexiblas[system-blas] setup in place of the eselect-based
system
- sci-libs/flexiblas[system-blas] blocks the eselect packages,
and removes their config upon install, so that their ld.so.conf bits
do not interfere
I've done some initial testing and have had no issues. More feedback
and testing welcome.
Note that the diffs for virtuals ended up weird because of
--find-copies-harder. That's because all the virtuals are very similar,
so the differences between different virtuals are smaller than between
the revbumps.
Also available as a pull request on the LLM Torment Nexus:
https://github.com/gentoo/gentoo/pull/43755
--
Best regards,
Michał Górny
Michał Górny (6):
sci-libs/lapack: Introduce USE=flexiblas for sys flexiblas use
sci-libs/flexiblas: Support installing as a system BLAS/LAPACK
virtual/blas: Add flexiblas support
virtual/cblas: Add flexiblas support
virtual/lapack: Add flexiblas support
virtual/lapacke: Add flexiblas support
...4.82.ebuild => flexiblas-3.4.82-r1.ebuild} | 57 +++++++++++++++++--
sci-libs/flexiblas/metadata.xml | 4 ++
...12.1-r1.ebuild => lapack-3.12.1-r2.ebuild} | 22 ++++++-
sci-libs/lapack/metadata.xml | 3 +
virtual/blas/blas-3.8-r1.ebuild | 27 +++++++++
virtual/blas/metadata.xml | 1 +
virtual/cblas/cblas-3.8-r1.ebuild | 27 +++++++++
virtual/cblas/metadata.xml | 1 +
virtual/lapack/lapack-3.10-r1.ebuild | 26 +++++++++
virtual/lapack/metadata.xml | 1 +
virtual/lapacke/lapacke-3.8-r2.ebuild | 26 +++++++++
virtual/lapacke/metadata.xml | 1 +
12 files changed, 191 insertions(+), 5 deletions(-)
copy sci-libs/flexiblas/{flexiblas-3.4.82.ebuild => flexiblas-3.4.82-r1.ebuild} (73%)
copy sci-libs/lapack/{lapack-3.12.1-r1.ebuild => lapack-3.12.1-r2.ebuild} (88%)
create mode 100644 virtual/blas/blas-3.8-r1.ebuild
create mode 100644 virtual/cblas/cblas-3.8-r1.ebuild
create mode 100644 virtual/lapack/lapack-3.10-r1.ebuild
create mode 100644 virtual/lapacke/lapacke-3.8-r2.ebuild
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH 1/6] sci-libs/lapack: Introduce USE=flexiblas for sys flexiblas use
2025-09-12 19:18 [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
@ 2025-09-12 19:18 ` Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 2/6] sci-libs/flexiblas: Support installing as a system BLAS/LAPACK Michał Górny
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2025-09-12 19:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Introduce a USE=flexiblas that adds a "-reference" suffix to all
the libraries, and moves the headers into a "lapack-reference"
subdirectory. This is meant to make it possible to symlink the system
BLAS/LAPACK libraries into sci-libs/flexiblas instead.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
...12.1-r1.ebuild => lapack-3.12.1-r2.ebuild} | 22 ++++++++++++++++++-
sci-libs/lapack/metadata.xml | 3 +++
2 files changed, 24 insertions(+), 1 deletion(-)
copy sci-libs/lapack/{lapack-3.12.1-r1.ebuild => lapack-3.12.1-r2.ebuild} (88%)
diff --git a/sci-libs/lapack/lapack-3.12.1-r1.ebuild b/sci-libs/lapack/lapack-3.12.1-r2.ebuild
similarity index 88%
copy from sci-libs/lapack/lapack-3.12.1-r1.ebuild
copy to sci-libs/lapack/lapack-3.12.1-r2.ebuild
index 9799c01c0f29..af0ace5b1338 100644
--- a/sci-libs/lapack/lapack-3.12.1-r1.ebuild
+++ b/sci-libs/lapack/lapack-3.12.1-r2.ebuild
@@ -15,7 +15,8 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
# TODO: static-libs 64bit-index
-IUSE="lapacke deprecated doc eselect-ldso test"
+IUSE="flexiblas lapacke deprecated doc eselect-ldso test"
+REQUIRED_USE="flexiblas? ( deprecated !eselect-ldso )"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -32,6 +33,11 @@ BDEPEND="
virtual/pkgconfig
test? ( ${PYTHON_DEPS} )
"
+PDEPEND="
+ flexiblas? (
+ sci-libs/flexiblas[system-blas(-)]
+ )
+"
PATCHES=(
"${FILESDIR}"/${PN}-3.12.1-broken-flow.patch
@@ -44,6 +50,15 @@ pkg_setup() {
use test && python-any-r1_pkg_setup
}
+src_prepare() {
+ cmake_src_prepare
+
+ if use flexiblas; then
+ # install libraries renamed to '*-reference'
+ sed -i -e '/set([A-Z]*LIB/s:"):-reference"):' CMakeLists.txt || die
+ fi
+}
+
src_configure() {
# bug #878891
filter-lto
@@ -58,6 +73,11 @@ src_configure() {
# Breaks cross
-DTEST_FORTRAN_COMPILER=OFF
)
+ if use flexiblas; then
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_INCLUDEDIR=include/lapack-reference
+ )
+ fi
cmake_src_configure
}
diff --git a/sci-libs/lapack/metadata.xml b/sci-libs/lapack/metadata.xml
index e9670e6df2cf..bcf87bcf1e52 100644
--- a/sci-libs/lapack/metadata.xml
+++ b/sci-libs/lapack/metadata.xml
@@ -24,6 +24,9 @@ This package installs the reference FORTRAN 77 implementation from Netlib.
</longdescription>
<use>
<flag name="deprecated">Also build deprecated functions</flag>
+ <flag name="flexiblas">
+ Install renamed, for system FlexiBLAS compatibility.
+ </flag>
<flag name="lapacke">Build LAPACKE</flag>
<flag name="eselect-ldso">Enable runtime library switching by
eselect and ld.so.</flag>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH 2/6] sci-libs/flexiblas: Support installing as a system BLAS/LAPACK
2025-09-12 19:18 [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 1/6] sci-libs/lapack: Introduce USE=flexiblas for sys flexiblas use Michał Górny
@ 2025-09-12 19:18 ` Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 3/6] virtual/blas: Add flexiblas support Michał Górny
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2025-09-12 19:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Add a system-blas flag that installs symlinks to make FlexiBLAS
the provider for libblas, libcblas, liblapack and liblapacke.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
...4.82.ebuild => flexiblas-3.4.82-r1.ebuild} | 57 +++++++++++++++++--
sci-libs/flexiblas/metadata.xml | 4 ++
2 files changed, 57 insertions(+), 4 deletions(-)
copy sci-libs/flexiblas/{flexiblas-3.4.82.ebuild => flexiblas-3.4.82-r1.ebuild} (73%)
diff --git a/sci-libs/flexiblas/flexiblas-3.4.82.ebuild b/sci-libs/flexiblas/flexiblas-3.4.82-r1.ebuild
similarity index 73%
copy from sci-libs/flexiblas/flexiblas-3.4.82.ebuild
copy to sci-libs/flexiblas/flexiblas-3.4.82-r1.ebuild
index 015a92dfda1f..fe94017e3776 100644
--- a/sci-libs/flexiblas/flexiblas-3.4.82.ebuild
+++ b/sci-libs/flexiblas/flexiblas-3.4.82-r1.ebuild
@@ -20,7 +20,7 @@ S=${WORKDIR}/${MY_P}
LICENSE="LGPL-3+ BSD"
SLOT="0"
# TODO: 64bit-index
-IUSE="blis mkl openblas openmp tbb test"
+IUSE="blis mkl openblas openmp system-blas tbb test"
RESTRICT="!test? ( test )"
# flexiblas only supports gnu-openmp using clang/gcc
@@ -32,9 +32,15 @@ DEPEND="
openmp? ( sci-libs/mkl[gnu-openmp] )
)
openblas? ( sci-libs/openblas:= )
+ system-blas? ( sci-libs/lapack[flexiblas] )
"
RDEPEND="
${DEPEND}
+ system-blas? (
+ !app-eselect/eselect-blas
+ !app-eselect/eselect-cblas
+ !app-eselect/eselect-lapack
+ )
"
pkg_pretend() {
@@ -91,14 +97,25 @@ src_configure() {
-DEXTRA="${extra// /;}"
# respect CFLAGS
-DLTO=OFF
- # use system sci-libs/lapack
- -DSYS_BLAS_LIBRARY="${libdir}/libblas.so"
- -DSYS_LAPACK_LIBRARY="${libdir}/liblapack.so"
# these are used only with -DEXTRA
-Dblis_LIBRARY="${libdir}/libblis.so"
-Dopenblas_LIBRARY="${libdir}/libopenblas.so"
)
+ # use system sci-libs/lapack
+ if use system-blas; then
+ # this is sci-libs/lapack[flexiblas] install
+ mycmakeargs+=(
+ -DSYS_BLAS_LIBRARY="${libdir}/libblas-reference.so"
+ -DSYS_LAPACK_LIBRARY="${libdir}/liblapack-reference.so"
+ )
+ else
+ mycmakeargs+=(
+ -DSYS_BLAS_LIBRARY="${libdir}/libblas.so"
+ -DSYS_LAPACK_LIBRARY="${libdir}/liblapack.so"
+ )
+ fi
+
cmake_src_configure
BACKENDS+=( netlib )
@@ -160,4 +177,36 @@ src_install() {
if [[ ${missing[@]} ]]; then
die "Not all requested backends built. Missing: ${missing[*]}"
fi
+
+ # Install symlinks for system BLAS / LAPACK use.
+ if use system-blas; then
+ local libdir="/usr/$(get_libdir)"
+ local fn
+ for fn in cblas.h lapack.h lapacke{,_config,_mangling,_utils}.h; do
+ dosym "flexiblas/${fn}" "/usr/include/${fn}"
+ done
+
+ for fn in blas cblas lapack lapacke; do
+ dosym libflexiblas.so.3 "${libdir}/lib${fn}.so.3"
+ dosym libflexiblas.so "${libdir}/lib${fn}.so"
+ dosym flexiblas.pc "${libdir}/pkgconfig/${fn}.pc"
+ done
+ fi
+}
+
+pkg_postinst() {
+ if use system-blas; then
+ # eselect-{blas,lapack} doesn't clean up its configs
+ local prev_opt=$(shopt -p nullglob)
+ shopt -s nullglob
+ local files=(
+ "${EROOT}"/etc/ld.so.conf.d/81-blas-*.conf
+ "${EROOT}"/etc/ld.so.conf.d/82-lapack-*.conf
+ )
+ ${prev_opt}
+
+ if [[ ${files[@]} ]]; then
+ rm -v "${files[@]}"
+ fi
+ fi
}
diff --git a/sci-libs/flexiblas/metadata.xml b/sci-libs/flexiblas/metadata.xml
index 5d259655d445..ec9d9350ed6d 100644
--- a/sci-libs/flexiblas/metadata.xml
+++ b/sci-libs/flexiblas/metadata.xml
@@ -9,6 +9,10 @@
<flag name="blis">Support <pkg>sci-libs/blis</pkg> provider</flag>
<flag name="mkl">Support <pkg>sci-libs/mkl</pkg> provider</flag>
<flag name="openblas">Support <pkg>sci-libs/openblas</pkg> provider</flag>
+ <flag name="system-lapack">
+ Install symlinks to use FlexiBLAS as the system BLAS / LAPACK
+ provider.
+ </flag>
<flag name="tbb">
Support <pkg>sci-libs/mkl</pkg> with <pkg>dev-cpp/tbb</pkg>
threading.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH 3/6] virtual/blas: Add flexiblas support
2025-09-12 19:18 [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 1/6] sci-libs/lapack: Introduce USE=flexiblas for sys flexiblas use Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 2/6] sci-libs/flexiblas: Support installing as a system BLAS/LAPACK Michał Górny
@ 2025-09-12 19:18 ` Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 4/6] virtual/cblas: " Michał Górny
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2025-09-12 19:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
virtual/blas/blas-3.8-r1.ebuild | 27 +++++++++++++++++++++++++++
virtual/blas/metadata.xml | 1 +
2 files changed, 28 insertions(+)
create mode 100644 virtual/blas/blas-3.8-r1.ebuild
diff --git a/virtual/blas/blas-3.8-r1.ebuild b/virtual/blas/blas-3.8-r1.ebuild
new file mode 100644
index 000000000000..dafb93417b24
--- /dev/null
+++ b/virtual/blas/blas-3.8-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+DESCRIPTION="Virtual for FORTRAN 77 BLAS implementation"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="eselect-ldso flexiblas"
+REQUIRED_USE="?? ( eselect-ldso flexiblas )"
+
+RDEPEND="
+ flexiblas? (
+ sci-libs/flexiblas[system-blas(-)]
+ )
+ !flexiblas? (
+ >=sci-libs/lapack-3.8[eselect-ldso?]
+ eselect-ldso? (
+ || (
+ >=sci-libs/lapack-3.8[eselect-ldso]
+ sci-libs/openblas[eselect-ldso]
+ sci-libs/blis[eselect-ldso]
+ )
+ )
+ )
+"
+DEPEND="${RDEPEND}"
diff --git a/virtual/blas/metadata.xml b/virtual/blas/metadata.xml
index e6d517932cad..36f9b695c1d1 100644
--- a/virtual/blas/metadata.xml
+++ b/virtual/blas/metadata.xml
@@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="eselect-ldso">Enable runtime library switching by eselect and ld.so.</flag>
+ <flag name="flexiblas">Use <pkg>sci-libs/flexiblas</pkg> as the provider.</flag>
</use>
<stabilize-allarches/>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH 4/6] virtual/cblas: Add flexiblas support
2025-09-12 19:18 [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
` (2 preceding siblings ...)
2025-09-12 19:18 ` [gentoo-dev] [PATCH 3/6] virtual/blas: Add flexiblas support Michał Górny
@ 2025-09-12 19:18 ` Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 5/6] virtual/lapack: " Michał Górny
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2025-09-12 19:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
virtual/{blas/blas-3.8-r1.ebuild => cblas/cblas-3.8-r1.ebuild} | 2 +-
virtual/cblas/metadata.xml | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
copy virtual/{blas/blas-3.8-r1.ebuild => cblas/cblas-3.8-r1.ebuild} (91%)
diff --git a/virtual/blas/blas-3.8-r1.ebuild b/virtual/cblas/cblas-3.8-r1.ebuild
similarity index 91%
copy from virtual/blas/blas-3.8-r1.ebuild
copy to virtual/cblas/cblas-3.8-r1.ebuild
index dafb93417b24..93b280d3b6c5 100644
--- a/virtual/blas/blas-3.8-r1.ebuild
+++ b/virtual/cblas/cblas-3.8-r1.ebuild
@@ -3,7 +3,7 @@
EAPI="8"
-DESCRIPTION="Virtual for FORTRAN 77 BLAS implementation"
+DESCRIPTION="Virtual for BLAS C implementation"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
IUSE="eselect-ldso flexiblas"
diff --git a/virtual/cblas/metadata.xml b/virtual/cblas/metadata.xml
index e6d517932cad..36f9b695c1d1 100644
--- a/virtual/cblas/metadata.xml
+++ b/virtual/cblas/metadata.xml
@@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="eselect-ldso">Enable runtime library switching by eselect and ld.so.</flag>
+ <flag name="flexiblas">Use <pkg>sci-libs/flexiblas</pkg> as the provider.</flag>
</use>
<stabilize-allarches/>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH 5/6] virtual/lapack: Add flexiblas support
2025-09-12 19:18 [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
` (3 preceding siblings ...)
2025-09-12 19:18 ` [gentoo-dev] [PATCH 4/6] virtual/cblas: " Michał Górny
@ 2025-09-12 19:18 ` Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 6/6] virtual/lapacke: " Michał Górny
2025-09-13 7:54 ` [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2025-09-12 19:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
.../blas-3.8-r1.ebuild => lapack/lapack-3.10-r1.ebuild} | 7 +++----
virtual/lapack/metadata.xml | 1 +
2 files changed, 4 insertions(+), 4 deletions(-)
copy virtual/{blas/blas-3.8-r1.ebuild => lapack/lapack-3.10-r1.ebuild} (75%)
diff --git a/virtual/blas/blas-3.8-r1.ebuild b/virtual/lapack/lapack-3.10-r1.ebuild
similarity index 75%
copy from virtual/blas/blas-3.8-r1.ebuild
copy to virtual/lapack/lapack-3.10-r1.ebuild
index dafb93417b24..7787a7f33559 100644
--- a/virtual/blas/blas-3.8-r1.ebuild
+++ b/virtual/lapack/lapack-3.10-r1.ebuild
@@ -3,7 +3,7 @@
EAPI="8"
-DESCRIPTION="Virtual for FORTRAN 77 BLAS implementation"
+DESCRIPTION="Virtual for Linear Algebra Package FORTRAN 77 (LAPACK) implementation"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
IUSE="eselect-ldso flexiblas"
@@ -14,12 +14,11 @@ RDEPEND="
sci-libs/flexiblas[system-blas(-)]
)
!flexiblas? (
- >=sci-libs/lapack-3.8[eselect-ldso?]
+ >=sci-libs/lapack-3.10.0[eselect-ldso?]
eselect-ldso? (
|| (
- >=sci-libs/lapack-3.8[eselect-ldso]
+ >=sci-libs/lapack-3.10.0[eselect-ldso]
sci-libs/openblas[eselect-ldso]
- sci-libs/blis[eselect-ldso]
)
)
)
diff --git a/virtual/lapack/metadata.xml b/virtual/lapack/metadata.xml
index e6d517932cad..36f9b695c1d1 100644
--- a/virtual/lapack/metadata.xml
+++ b/virtual/lapack/metadata.xml
@@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="eselect-ldso">Enable runtime library switching by eselect and ld.so.</flag>
+ <flag name="flexiblas">Use <pkg>sci-libs/flexiblas</pkg> as the provider.</flag>
</use>
<stabilize-allarches/>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH 6/6] virtual/lapacke: Add flexiblas support
2025-09-12 19:18 [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
` (4 preceding siblings ...)
2025-09-12 19:18 ` [gentoo-dev] [PATCH 5/6] virtual/lapack: " Michał Górny
@ 2025-09-12 19:18 ` Michał Górny
2025-09-13 7:54 ` [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2025-09-12 19:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
.../lapacke-3.8-r2.ebuild} | 11 +++++------
virtual/lapacke/metadata.xml | 1 +
2 files changed, 6 insertions(+), 6 deletions(-)
copy virtual/{cblas/cblas-3.8-r1.ebuild => lapacke/lapacke-3.8-r2.ebuild} (58%)
diff --git a/virtual/cblas/cblas-3.8-r1.ebuild b/virtual/lapacke/lapacke-3.8-r2.ebuild
similarity index 58%
copy from virtual/cblas/cblas-3.8-r1.ebuild
copy to virtual/lapacke/lapacke-3.8-r2.ebuild
index 93b280d3b6c5..3cc69c44b20c 100644
--- a/virtual/cblas/cblas-3.8-r1.ebuild
+++ b/virtual/lapacke/lapacke-3.8-r2.ebuild
@@ -3,9 +3,9 @@
EAPI="8"
-DESCRIPTION="Virtual for BLAS C implementation"
+DESCRIPTION="Virtual for LAPACK C implementation"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
IUSE="eselect-ldso flexiblas"
REQUIRED_USE="?? ( eselect-ldso flexiblas )"
@@ -14,12 +14,11 @@ RDEPEND="
sci-libs/flexiblas[system-blas(-)]
)
!flexiblas? (
- >=sci-libs/lapack-3.8[eselect-ldso?]
+ >=sci-libs/lapack-3.8.0[lapacke,eselect-ldso?]
eselect-ldso? (
|| (
- >=sci-libs/lapack-3.8[eselect-ldso]
- sci-libs/openblas[eselect-ldso]
- sci-libs/blis[eselect-ldso]
+ >=sci-libs/lapack-3.8.0[lapacke,eselect-ldso]
+ >=sci-libs/openblas-0.3.10[eselect-ldso]
)
)
)
diff --git a/virtual/lapacke/metadata.xml b/virtual/lapacke/metadata.xml
index e6d517932cad..36f9b695c1d1 100644
--- a/virtual/lapacke/metadata.xml
+++ b/virtual/lapacke/metadata.xml
@@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="eselect-ldso">Enable runtime library switching by eselect and ld.so.</flag>
+ <flag name="flexiblas">Use <pkg>sci-libs/flexiblas</pkg> as the provider.</flag>
</use>
<stabilize-allarches/>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation
2025-09-12 19:18 [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
` (5 preceding siblings ...)
2025-09-12 19:18 ` [gentoo-dev] [PATCH 6/6] virtual/lapacke: " Michał Górny
@ 2025-09-13 7:54 ` Michał Górny
6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2025-09-13 7:54 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]
On Fri, 2025-09-12 at 21:18 +0200, Michał Górny wrote:
> Here's my "second approximation" to the idea of using sci-libs/flexiblas
> as the system LAPACK provider. It is USE flag based rather than
> unconditional to make it possible to test it without immediately
> removing the existing system.
One more note: the limitation of this approximation is that packages end
up with libflexiblas.so.3 in DT_NEEDED. In other words, you can switch
from eselect-ldso to flexiblas without breaking anything, but anything
built after the switch will need to rebuilt after switching back.
This is not a problem for the final switch, but it is annoyance for
the testing / transition period. Not sure if it's worth fixing though.
My gut feeling is that in order to fix this we'd also have to create
a bunch of libblas.so.3, liblapack.so.3, etc. libraries that reexport
specific sets of symbols from libflexiblas. We'd have to be precise
about which symbols belong to which library, as otherwise packages would
end up underlinking.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-09-13 7:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12 19:18 [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 1/6] sci-libs/lapack: Introduce USE=flexiblas for sys flexiblas use Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 2/6] sci-libs/flexiblas: Support installing as a system BLAS/LAPACK Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 3/6] virtual/blas: Add flexiblas support Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 4/6] virtual/cblas: " Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 5/6] virtual/lapack: " Michał Górny
2025-09-12 19:18 ` [gentoo-dev] [PATCH 6/6] virtual/lapacke: " Michał Górny
2025-09-13 7:54 ` [gentoo-dev] [PATCH 0/6] sci-libs/flexiblas as system BLAS provider, second approximation Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox