[PATCH] gnu: lapack: Update to 3.9.0.

DoneSubmitted by Konrad Hinsen.
Details
3 participants
  • Konrad Hinsen
  • Ludovic Courtès
  • Ludovic Courtès
Owner
unassigned
Severity
normal
K
K
Konrad Hinsen wrote on 28 Nov 2019 22:11
(address . guix-patches@gnu.org)
m1y2vv1785.fsf@ordinateur-de-catherine--konrad.home
* gnu/packages/maths.scm (lapack): Update to 3.9.0.--- gnu/packages/maths.scm | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
Toggle diff (46 lines)diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scmindex 16e070eeff..de45bdfed3 100644--- a/gnu/packages/maths.scm+++ b/gnu/packages/maths.scm@@ -544,7 +544,7 @@ large scale eigenvalue problems.") (define-public lapack (package (name "lapack")- (version "3.7.1")+ (version "3.9.0") (source (origin (method url-fetch)@@ -552,26 +552,18 @@ large scale eigenvalue problems.") version ".tgz")) (sha256 (base32- "1j51r7n5w4k7r3lrvy7710xrpkg40wf4rqnmngfz6ck9ypckzign"))))+ "1155qixp26c12yrxc76z9mlfw2h3xxymxxv5znpgzh5gaykpndgj")))) (build-system cmake-build-system) (home-page "http://www.netlib.org/lapack/") (inputs `(("fortran" ,gfortran)- ("python" ,python-2)))+ ("python" ,python-wrapper))) (arguments `(#:configure-flags (list "-DBUILD_SHARED_LIBS:BOOL=YES" "-DLAPACKE=ON"- ;; Build the 'LAPACKE_clatms' functions.- "-DLAPACKE_WITH_TMG=ON")- #:phases- (modify-phases %standard-phases- (add-before 'check 'patch-python- (lambda* (#:key inputs #:allow-other-keys)- (let ((python (assoc-ref inputs "python")))- (substitute* "lapack_testing.py"- (("/usr/bin/env python") python)))- #t)))))+ "-DLAPACKE_WITH_TMG=ON"+ "-DBUILD_TESTING=ON"))) (synopsis "Library for numerical linear algebra") (description "LAPACK is a Fortran 90 library for solving the most commonly occurring-- 2.24.0
L
L
Ludovic Courtès wrote on 9 Dec 2019 18:31
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 38454@debbugs.gnu.org)
87blshbe2x.fsf@gnu.org
Hi Konrad,
Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:
Toggle quote (2 lines)> * gnu/packages/maths.scm (lapack): Update to 3.9.0.
Unfortunately this fails to build on armhf-linux (tested viaqemu-binfmt):
Toggle snippet (66 lines)starting phase `configure'source directory: "/tmp/guix-build-lapack-3.9.0.drv-0/lapack-3.9.0" (relative from build: "../lapack-3.9.0")build directory: "/tmp/guix-build-lapack-3.9.0.drv-0/build"running 'cmake' with arguments ("../lapack-3.9.0" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapack-3.9.0" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapack-3.9.0/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DBUILD_SHARED_LIBS:BOOL=YES" "-DLAPACKE=ON" "-DLAPACKE_WITH_TMG=ON" "-DBUILD_TESTING=ON")-- The Fortran compiler identification is unknownCMake Error at /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeCompilerIdDetection.cmake:26 (list): list sub-command REMOVE_ITEM requires two or more arguments.Call Stack (most recent call first): /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection) /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE) /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:3 (project)
[… repeated several times…]
-- The C compiler identification is unknown-- Check for working Fortran compiler: /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gfortran-- Check for working Fortran compiler: /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gfortran -- works-- Detecting Fortran compiler ABI info-- Detecting Fortran compiler ABI info - done-- Checking whether /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gfortran supports Fortran 90-- Checking whether /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gfortran supports Fortran 90 -- yes-- Check for working C compiler: /gnu/store/pkx3kcvj1mbkkgzxi1w57c1vfvhwzxh7-gcc-7.4.0/bin/gcc-- Check for working C compiler: /gnu/store/pkx3kcvj1mbkkgzxi1w57c1vfvhwzxh7-gcc-7.4.0/bin/gcc -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Detecting C compile features-- Detecting C compile features - done-- Checking if build type is 'Coverage'-- Checking if build type is 'Coverage': 0-- Build tests: ON-- Looking for Python >= 2.7 needed for summary tests-- Looking for Python >= 2.7 needed for summary tests - found (3.7.4)-- Reducing RELEASE optimization level to O2-- Looking for Fortran NONE - found-- Looking for Fortran INT_CPU_TIME - found-- Looking for Fortran EXT_ETIME - not found-- Looking for Fortran EXT_ETIME_ - not found-- Looking for Fortran INT_ETIME - found-- --> Will use second_INT_ETIME.f and dsecnd_INT_ETIME.f as timing function.-- Build deprecated routines: OFF-- Build single precision real: ON-- Build double precision real: ON-- Build single precision complex: ON-- Build double precision complex: ON-- Using supplied NETLIB BLAS implementation-- Using supplied NETLIB LAPACK implementation-- Running Summary-- LAPACKE enable-- Detecting Fortran/C Interface-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling-- Verifying Fortran/C Compiler Compatibility-- Verifying Fortran/C Compiler Compatibility - Success-- Build LAPACKE single precision real: ON-- Build LAPACKE double precision real: ON-- Build LAPACKE single precision complex: ON-- Build LAPACKE double precision complex: ON-- Configuring incomplete, errors occurred!See also "/tmp/guix-build-lapack-3.9.0.drv-0/build/CMakeFiles/CMakeOutput.log".See also "/tmp/guix-build-lapack-3.9.0.drv-0/build/CMakeFiles/CMakeError.log".command "cmake" "../lapack-3.9.0" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapack-3.9.0" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapack-3.9.0/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DBUILD_SHARED_LIBS:BOOL=YES" "-DLAPACKE=ON" "-DLAPACKE_WITH_TMG=ON" "-DBUILD_TESTING=ON" failed with status 1builder for `/gnu/store/hib5k6rq3kdgd0gf6rnfpj9v9d31xfv7-lapack-3.9.0.drv' failed with exit code 1@ build-failed /gnu/store/hib5k6rq3kdgd0gf6rnfpj9v9d31xfv7-lapack-3.9.0.drv - 1 builder for `/gnu/store/hib5k6rq3kdgd0gf6rnfpj9v9d31xfv7-lapack-3.9.0.drv' failed with exit code 1
Could you check if the intertubes have fixes for that? :-)
Thanks!
Ludo’.
K
K
Konrad Hinsen wrote on 10 Dec 2019 18:00
(name . Ludovic Courtès)(address . ludovic.courtes@inria.fr)(address . 38454@debbugs.gnu.org)
m1o8wgw1xv.fsf@ordinateur-de-catherine--konrad.home
Hi Ludo,
Toggle quote (2 lines)> Unfortunately this fails to build on armhf-linux (tested via> qemu-binfmt):
...
Toggle quote (2 lines)> Could you check if the intertubes have fixes for that? :-)
I didn't find anything. As far as I can tell from the error message,this bug is not related to LAPACK, but to the interplay of CMake andgfortran. More precisely, CMake cannot figure out that the Fortrancompiler being used is gfortran, because some file required for doingthe check is not in the right place. The best person to investigatethis would be a CMake expert.
What I don't understand is why the current version of LAPACK doesn'tsuffer from the same problem!
Cheers, Konrad.
L
L
Ludovic Courtès wrote on 7 Jan 11:20 +0100
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)
871rsblg9v.fsf@gnu.org
Hi Konrad,
(Mathieu, Danny: see below for qemu-binfmt concerns. :-))
Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
Toggle quote (23 lines)> Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:>>> * gnu/packages/maths.scm (lapack): Update to 3.9.0.>> Unfortunately this fails to build on armhf-linux (tested via> qemu-binfmt):>> starting phase `configure'> source directory: "/tmp/guix-build-lapack-3.9.0.drv-0/lapack-3.9.0" (relative from build: "../lapack-3.9.0")> build directory: "/tmp/guix-build-lapack-3.9.0.drv-0/build"> running 'cmake' with arguments ("../lapack-3.9.0" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapack-3.9.0" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapack-3.9.0/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DBUILD_SHARED_LIBS:BOOL=YES" "-DLAPACKE=ON" "-DLAPACKE_WITH_TMG=ON" "-DBUILD_TESTING=ON")> -- The Fortran compiler identification is unknown> CMake Error at /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeCompilerIdDetection.cmake:26 (list):> list sub-command REMOVE_ITEM requires two or more arguments.> Call Stack (most recent call first):> /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)> /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)> /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)> /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/cmake-3.15/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)> CMakeLists.txt:3 (project)>> [… repeated several times…]
This turned out to be a side effect of building through qemu-binfmt;building on real hardware succeeds. So, patch committed, at last—sorryfor the delay!
Toggle snippet (22 lines)starting phase `configure'source directory: "/tmp/guix-build-lapack-3.9.0.drv-0/lapack-3.9.0" (relative from build: "../lapack-3.9.0")build directory: "/tmp/guix-build-lapack-3.9.0.drv-0/build"running 'cmake' with arguments ("../lapack-3.9.0" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapack-3.9.0" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapack-3.9.0/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DBUILD_SHARED_LIBS:BOOL=YES" "-DLAPACKE=ON" "-DLAPACKE_WITH_TMG=ON" "-DBUILD_TESTING=ON")-- The Fortran compiler identification is GNU 7.4.0-- The C compiler identification is GNU 7.4.0-- Check for working Fortran compiler: /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gfortran-- Check for working Fortran compiler: /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gfortran -- works-- Detecting Fortran compiler ABI info-- Detecting Fortran compiler ABI info - done-- Checking whether /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gfortran supports Fortran 90-- Checking whether /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gfortran supports Fortran 90 -- yes-- Check for working C compiler: /gnu/store/pkx3kcvj1mbkkgzxi1w57c1vfvhwzxh7-gcc-7.4.0/bin/gcc-- Check for working C compiler: /gnu/store/pkx3kcvj1mbkkgzxi1w57c1vfvhwzxh7-gcc-7.4.0/bin/gcc -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done

So, what’s going on under qemu-binfmt?
When doing a qemu-binfmt build, ‘CMakeOutput.log’ contains severalinstances of:
Toggle snippet (7 lines)The system is: Linux - 5.4.8-gnu - armv7lCompiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded.Compiler: /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gfortran Build flags: Id flags: -v
Yet ‘CMakeError.log’ reads:
Toggle snippet (3 lines)Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" did not produce an executable in "/tmp/guix-build-lapack-3.9.0.drv-0/build/CMakeFiles/3.15.1/CompilerIdFortran".
I do see an ‘a.out’ file in there, though.
The code for that is in ‘CMakeDetermineCompilerId.cmake’:
Toggle snippet (35 lines) # Find the executable produced by the compiler, try all files in the # binary dir. string(REGEX REPLACE "([][])" "[\\1]" _glob_id_dir "${CMAKE_${lang}_COMPILER_ID_DIR}") file(GLOB files RELATIVE ${CMAKE_${lang}_COMPILER_ID_DIR}
# normal case ${_glob_id_dir}/*
# com.apple.package-type.bundle.unit-test ${_glob_id_dir}/*.xctest/*
# com.apple.product-type.framework ${_glob_id_dir}/*.framework/* ) list(REMOVE_ITEM files "${src}") set(COMPILER_${lang}_PRODUCED_FILES "") foreach(file ${files}) if(NOT IS_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}/${file}) list(APPEND COMPILER_${lang}_PRODUCED_FILES ${file}) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Compilation of the ${lang} compiler identification source \"" "${src}\" produced \"${file}\"\n\n") endif() endforeach()
if(NOT COMPILER_${lang}_PRODUCED_FILES) # No executable was found. file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Compilation of the ${lang} compiler identification source \"" "${src}\" did not produce an executable in \"" "${CMAKE_${lang}_COMPILER_ID_DIR}\".\n\n") endif()
Why would that fail? Mystery…
There’s some code in CMake that looks at /proc/cpuinfo, so that couldsomehow make the wrong decision, but I don’t see how. Also, why wouldit affect emulation of ARMv7 but not emulation of AArch64, as seems tobe the case?
Ideas, people?
Thanks,Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 38454@debbugs.gnu.org