From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:52856) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iolyy-0003hc-Ul for guix-patches@gnu.org; Tue, 07 Jan 2020 05:21:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iolyx-0003CE-8m for guix-patches@gnu.org; Tue, 07 Jan 2020 05:21:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41354) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iolyx-0003C4-5o for guix-patches@gnu.org; Tue, 07 Jan 2020 05:21:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iolyx-0006B4-20 for guix-patches@gnu.org; Tue, 07 Jan 2020 05:21:03 -0500 Subject: bug#38454: [PATCH] gnu: lapack: Update to 3.9.0. Resent-To: guix-patches@gnu.org Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87blshbe2x.fsf@gnu.org> Date: Tue, 07 Jan 2020 11:20:12 +0100 In-Reply-To: <87blshbe2x.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 09 Dec 2019 18:31:34 +0100") Message-ID: <871rsblg9v.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Konrad Hinsen Cc: Danny Milosavljevic , Mathieu Othacehe , 38454-done@debbugs.gnu.org Hi Konrad, (Mathieu, Danny: see below for qemu-binfmt concerns. :-)) Ludovic Court=C3=A8s skribis: > Konrad Hinsen 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" (rela= tive 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=3DR= elWithDebInfo" "-DCMAKE_INSTALL_PREFIX=3D/gnu/store/ynakjwrsq06j7q75ysqfrmh= p8mhhdxrb-lapack-3.9.0" "-DCMAKE_INSTALL_LIBDIR=3Dlib" "-DCMAKE_INSTALL_RPA= TH_USE_LINK_PATH=3DTRUE" "-DCMAKE_INSTALL_RPATH=3D/gnu/store/ynakjwrsq06j7q= 75ysqfrmhp8mhhdxrb-lapack-3.9.0/lib" "-DCMAKE_VERBOSE_MAKEFILE=3DON" "-DBUI= LD_SHARED_LIBS:BOOL=3DYES" "-DLAPACKE=3DON" "-DLAPACKE_WITH_TMG=3DON" "-DBU= ILD_TESTING=3DON") > -- 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_detectio= n) > /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/= cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMP= ILER_ID_WRITE) > /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/= cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPI= LER_ID_BUILD) > /gnu/store/lxj8wisj7ylwc67x1rshiw24fb5digx5-cmake-minimal-3.15.1/share/= cmake-3.15/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPI= LER_ID) > CMakeLists.txt:3 (project) > > [=E2=80=A6 repeated several times=E2=80=A6] This turned out to be a side effect of building through qemu-binfmt; building on real hardware succeeds. So, patch committed, at last=E2=80=94s= orry for the delay! --8<---------------cut here---------------start------------->8--- starting phase `configure' source directory: "/tmp/guix-build-lapack-3.9.0.drv-0/lapack-3.9.0" (relati= ve 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=3DRel= WithDebInfo" "-DCMAKE_INSTALL_PREFIX=3D/gnu/stor e/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapack-3.9.0" "-DCMAKE_INSTALL_LIBDIR=3D= lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=3DTRUE " "-DCMAKE_INSTALL_RPATH=3D/gnu/store/ynakjwrsq06j7q75ysqfrmhp8mhhdxrb-lapa= ck-3.9.0/lib" "-DCMAKE_VERBOSE_MAKEFILE=3DON" "- DBUILD_SHARED_LIBS:BOOL=3DYES" "-DLAPACKE=3DON" "-DLAPACKE_WITH_TMG=3DON" "= -DBUILD_TESTING=3DON") -- 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/91iyya22d6s055iwlwja3vvlp= c4i8sih-gfortran-7.4.0/bin/gfortran -- Check for working Fortran compiler: /gnu/store/91iyya22d6s055iwlwja3vvlp= c4i8sih-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/pkx3kcvj1mbkkgzxi1w57c1vfvhwzxh= 7-gcc-7.4.0/bin/gcc -- Check for working C compiler: /gnu/store/pkx3kcvj1mbkkgzxi1w57c1vfvhwzxh= 7-gcc-7.4.0/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done --8<---------------cut here---------------end--------------->8--- So, what=E2=80=99s going on under qemu-binfmt? When doing a qemu-binfmt build, =E2=80=98CMakeOutput.log=E2=80=99 contains = several instances of: --8<---------------cut here---------------start------------->8--- The system is: Linux - 5.4.8-gnu - armv7l Compiling the Fortran compiler identification source file "CMakeFortranComp= ilerId.F" succeeded. Compiler: /gnu/store/91iyya22d6s055iwlwja3vvlpc4i8sih-gfortran-7.4.0/bin/gf= ortran=20 Build flags:=20 Id flags: -v=20 --8<---------------cut here---------------end--------------->8--- Yet =E2=80=98CMakeError.log=E2=80=99 reads: --8<---------------cut here---------------start------------->8--- Compilation of the Fortran compiler identification source "CMakeFortranComp= ilerId.F" did not produce an executable in "/tmp/guix-build-lapack-3.9.0.dr= v-0/build/CMakeFiles/3.15.1/CompilerIdFortran". --8<---------------cut here---------------end--------------->8--- I do see an =E2=80=98a.out=E2=80=99 file in there, though. The code for that is in =E2=80=98CMakeDetermineCompilerId.cmake=E2=80=99: --8<---------------cut here---------------start------------->8--- # Find the executable produced by the compiler, try all files in the # binary dir. string(REGEX REPLACE "([][])" "[\\1]" _glob_id_dir "${CMAKE_${lang}_COM= PILER_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() --8<---------------cut here---------------end--------------->8--- Why would that fail? Mystery=E2=80=A6 There=E2=80=99s some code in CMake that looks at /proc/cpuinfo, so that cou= ld somehow make the wrong decision, but I don=E2=80=99t see how. Also, why wo= uld it affect emulation of ARMv7 but not emulation of AArch64, as seems to be the case? Ideas, people? Thanks, Ludo=E2=80=99.