diff options
author | Piotr Luszczek <luszczek@icl.utk.edu> | 2019-02-07 21:58:27 -0500 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2019-02-07 20:58:27 -0600 |
commit | f093515002f84dc8dde273b386b3dc7667864958 (patch) | |
tree | 4de28ca6a87579a915d02072ff022e63213a0d80 /var/spack/repos/builtin/packages/netlib-scalapack | |
parent | ec6de8326e1884307dc167395b128645397596ba (diff) | |
download | spack-f093515002f84dc8dde273b386b3dc7667864958.tar.gz spack-f093515002f84dc8dde273b386b3dc7667864958.tar.bz2 spack-f093515002f84dc8dde273b386b3dc7667864958.tar.xz spack-f093515002f84dc8dde273b386b3dc7667864958.zip |
netlib-scalapack package: add CMake test patch (#10452)
Add patch to fix Fortran mangling in CMake test
This is a fix for builds with GCC 6/7/8 and CMake 2/3. It includes
a link to the issue where this is reported. For now, the Spack
package applies the patch to all releases >= 2.0.2
Diffstat (limited to 'var/spack/repos/builtin/packages/netlib-scalapack')
-rw-r--r-- | var/spack/repos/builtin/packages/netlib-scalapack/cmake_fortran_mangle.patch | 43 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/netlib-scalapack/package.py | 3 |
2 files changed, 46 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/cmake_fortran_mangle.patch b/var/spack/repos/builtin/packages/netlib-scalapack/cmake_fortran_mangle.patch new file mode 100644 index 0000000000..81cfa5ccea --- /dev/null +++ b/var/spack/repos/builtin/packages/netlib-scalapack/cmake_fortran_mangle.patch @@ -0,0 +1,43 @@ +--- old/CMAKE/FortranMangling.cmake 2019-01-25 21:50:50.619858036 -0500 ++++ new/CMAKE/FortranMangling.cmake 2019-01-25 22:01:47.716985334 -0500 +@@ -19,25 +19,27 @@ + "-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}" +- "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" ++ "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" "${PROJECT_SOURCE_DIR}//BLACS/INSTALL" + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/BLACS/INSTALL/ +- RESULT_VARIABLE RESVAR OUTPUT_VARIABLE LOG1 ERROR_VARIABLE LOG1 ++ RESULT_VARIABLE RESVAR OUTPUT_VARIABLE LOG1_OUT ERROR_VARIABLE LOG1_ERR + ) + if(RESVAR EQUAL 0) + MESSAGE(STATUS "Configure in the INSTALL directory successful") + else() ++ MESSAGE(STATUS " Build Output:\n ${LOG1_OUT}") ++ MESSAGE(STATUS " Error Output:\n ${LOG1_ERR}") + MESSAGE(FATAL_ERROR " Configure in the BLACS INSTALL directory FAILED") +- MESSAGE(FATAL_ERROR " Output Build:\n ${LOG1}") + endif() + + # Build: + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} --build + ${PROJECT_SOURCE_DIR}/BLACS/INSTALL/ +- RESULT_VARIABLE RESVAR OUTPUT_VARIABLE LOG2 ERROR_VARIABLE LOG2 ++ RESULT_VARIABLE RESVAR OUTPUT_VARIABLE LOG2_OUT ERROR_VARIABLE LOG2_ERR + ) + if(RESVAR EQUAL 0) + MESSAGE(STATUS "Build in the BLACS INSTALL directory successful") + else() ++ MESSAGE(STATUS " Build Output:\n ${LOG2_OUT}") ++ MESSAGE(STATUS " Error Output:\n ${LOG2_ERR}") + MESSAGE(FATAL_ERROR " Build in the BLACS INSTALL directory FAILED") +- MESSAGE(FATAL_ERROR " Output Build:\n ${LOG2}") + endif() + # Clean up: + FILE(REMOVE_RECURSE ${PROJECT_SOURCE_DIR}/BLACS/INSTALL/CMakeCache.txt) +@@ -62,6 +64,7 @@ + MESSAGE(STATUS "CDEFS set to ${xintface_OUT}") + SET(CDEFS ${xintface_OUT} CACHE STRING "Fortran Mangling" FORCE) + else() ++ MESSAGE(STATUS " xintface Output:\n ${xintface_OUT}") + MESSAGE(FATAL_ERROR "FORTRAN_MANGLING:ERROR ${xintface_ERR}") + endif() + endmacro(FORTRAN_MANGLING) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index e1f52fc5b8..1a5c1a8e40 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -39,6 +39,9 @@ class NetlibScalapack(CMakePackage): depends_on('blas') depends_on('cmake', when='@2.0.0:', type='build') + # See: https://github.com/Reference-ScaLAPACK/scalapack/issues/9 + patch("cmake_fortran_mangle.patch", when='@2.0.2:') + @property def libs(self): # Note that the default will be to search |