From abdc6a8cdf799423770989b84d5e18385224dbf2 Mon Sep 17 00:00:00 2001 From: Iñaki Úcar Date: Jan 27 2022 10:08:55 +0000 Subject: simplify BuildRequires section, add a few more details to the configuration --- diff --git a/guidelines/modules/ROOT/pages/BLAS_LAPACK.adoc b/guidelines/modules/ROOT/pages/BLAS_LAPACK.adoc index 3951ed0..757dcb7 100644 --- a/guidelines/modules/ROOT/pages/BLAS_LAPACK.adoc +++ b/guidelines/modules/ROOT/pages/BLAS_LAPACK.adoc @@ -72,30 +72,22 @@ First, only FlexiBLAS's development package MUST be listed in `BuildRequires`: BuildRequires: flexiblas-devel .... -Alternatively, packages using `pkg-config` SHOULD express this dependency as +which brings all the necessary development files, +both for the 32-bit (the most common) and the 64-bit integer interface. -.... -BuildRequires: pkgconfig(flexiblas) -.... - -if the package requires the 32-bit interface (this is the most common case), -or a conditional `BuildRequires` such as - -.... -%if 0%{?__isa_bits} == 64 -BuildRequires: pkgconfig(flexiblas64) -%else -BuildRequires: pkgconfig(flexiblas) -%endif -.... - -if the package uses the 64-bit interface when available. -However, note that if the package '''only''' supports this 64-bit interface, -then 32-bit architectures MUST be excluded. +[IMPORTANT] +==== +If the package *only* supports the interface for 64-bit integers, +then 32-bit architectures MUST be excluded +(see xref:index.adoc#_arch_specific_runtime_and_build_time_dependencies[Arch-Specific Runtime and Build-Time Dependencies]). +==== === Configuration -Packages using `pkg-config` will automatically obtain the proper paths to the headers and libraries. +The packager MUST specify `flexiblas` or `flexiblas64` +(for the 32-bit or 64-bit interface respectively) +as both the BLAS and LAPACK library names where applicable, +and packages using `pkg-config` will automatically obtain the proper flags for the headers and libraries. Similarly, CMake-based projects using `FindBLAS` will automatically detect and configure the proper flags for FlexiBLAS (since CMake v3.19), and no further action will be required from the packager. @@ -103,7 +95,9 @@ and no further action will be required from the packager. Unfortunately, many upstream projects present heterogeneous ways of accessing these APIs. In a best-case scenario, the building framework may define specific options to explicitly set the BLAS and/or LAPACK libraries. More commonly, the packager MUST ensure that `+%{_includedir}/flexiblas+` and `+%{_libdir}/flexiblas+` -are injected as header and library locations in the proper flags and configuration files. +(or `+%{_includedir}/flexiblas64+` and `+%{_libdir}/flexiblas64+`) +are injected as header and library locations in the proper flags and configuration files, +and/or `-lflexiblas` (or `-lflexiblas64`) is provided to the linker. In rare occasions, hardcoded paths in source files MUST be modified, and patches MAY be required. The packager SHOULD work with upstream to standardize the way in which these libraries are detected and configured.