package/lapack: enable unconditionally complex matrices support
PATCH 1/1 package/lapack: enable unconditionally complex matrices support
In order to avoid build issues when complex matrices support is disabled, we enable it unconditionally.
While working on new runtime tests for python-numpy package, we noticed a build issue whith python-numpy package when BR2_PACKAGE_LAPACK_COMPLEX is not set. The python-numpy package was patched to add the dependency on lapack package instead of clapack.
It failed with the following error:
libcblas.so: undefined reference to `scnrm2_'
libcblas.so: undefined reference to `scasum_'
Indeed, scnrm2 and scasum are added to libblas.so only when BUILD_COMPLEX is enabled.
Also, there is no really important space saving on the target:
| Library name | Without lapack complex | With lapack complex | | liblapack.so | 2,4M | 4,6M | | liblapacke.so | 1,8M | 1,5M | | libcblas.so | 48K | 76K | | libblas.so | 96K | 232K |
(Tested with the ARM external toolchain 2019.03)
Complex matrices support are likeley expected when lapack package is selected.
--- Config.in.legacy | 7 +++++++ package/lapack/Config.in | 7 ------- package/lapack/lapack.mk | 9 ++------- 3 files changed, 9 insertions(+), 14 deletions(-)
Config.in.legacy +7 -0
@@ -146,6 +146,13 @@ endif comment "Legacy options removed in 2019.08" +config BR2_PACKAGE_LAPACK_COMPLEX + bool "Complex/Complex16 option was removed" + select BR2_LEGACY + help + Complex/Complex16 support is now unconditionally enabled in + lapack package. + config BR2_GDB_VERSION_7_12 bool "gdb 7.12.x has been removed" select BR2_LEGACY
package/lapack/Config.in +0 -7
@@ -12,10 +12,3 @@ config BR2_PACKAGE_LAPACK installs two libraries: libblas and liblapack. http://www.netlib.org/lapack/ - -config BR2_PACKAGE_LAPACK_COMPLEX - bool "Complex/Complex16 support" - default y - depends on BR2_PACKAGE_LAPACK - help - Builds support for COMPLEX and COMPLEX16 data types.
package/lapack/lapack.mk +2 -7
@@ -10,12 +10,7 @@ LAPACK_LICENSE_FILES = LICENSE LAPACK_SITE = http://www.netlib.org/lapack LAPACK_INSTALL_STAGING = YES LAPACK_SUPPORTS_IN_SOURCE_BUILD = NO -LAPACK_CONF_OPTS = -DLAPACKE=ON -DCBLAS=ON - -ifeq ($(BR2_PACKAGE_LAPACK_COMPLEX),y) -LAPACK_CONF_OPTS += -DBUILD_COMPLEX=ON -DBUILD_COMPLEX16=ON -else -LAPACK_CONF_OPTS += -DBUILD_COMPLEX=OFF -DBUILD_COMPLEX16=OFF -endif +LAPACK_CONF_OPTS = -DLAPACKE=ON -DCBLAS=ON -DBUILD_COMPLEX=ON \ + -DBUILD_COMPLEX16=ON $(eval $(cmake-package))
Signature · 1 line
2.20.1
PATCH 1/1 package/lapack: enable unconditionally complex matrices support
Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
In order to avoid build issues when complex matrices support is disabled, we enable it unconditionally.
While working on new runtime tests for python-numpy package, we noticed a build issue whith python-numpy package when
BR2_PACKAGE_LAPACK_COMPLEXis not set. The python-numpy package was patched to add the dependency on lapack package instead of clapack.It failed with the following error:
libcblas.so: undefined reference to `scnrm2_'
libcblas.so: undefined reference to `scasum_'Indeed, scnrm2 and scasum are added to libblas.so only when
BUILD_COMPLEXis enabled.Also, there is no really important space saving on the target:
Quoted 7 lines
| Library name | Without lapack complex | With lapack complex | | liblapack.so | 2,4M | 4,6M | | liblapacke.so | 1,8M | 1,5M | | libcblas.so | 48K | 76K | | libblas.so | 96K | 232K |(Tested with the ARM external toolchain 2019.03)
That is quite a big difference, so I think we still need the explicit option.
I've marked the patch as rejected in pw.
Signature · 1 line
Bye, Peter Korsgaard