Repository: spack/spack

Issue:
Installation issue: boxlib
`boxlib` build failed.
My environment is:
```
# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
```

The error log is:
```
==> Installing boxlib
==> No binary for boxlib found: installing from source
==> boxlib: Executing phase: 'cmake'
==> [2020-08-19-19:39:39.459269] 'cmake' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:STRING=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq' '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF' '-DCMAKE_INSTALL_RPATH:STRING=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq/lib64;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/hwloc-1.11.11-cqe7ck6odm42awc5x5q2e37bopp6kply/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/libpciaccess-0.13.5-pvvuyugujtydfz3jv5nuvqx6csxvx6dv/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/libxml2-2.9.10-n3yjvwrs62zscl6dgkgf6hxyofhb245h/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/libiconv-1.16-l55npm3aywt3ht3trtormu2flaeejhym/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/xz-5.2.5-n5spgwkq2ixqb3ubruaxdifholuuuefg/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/zlib-1.2.11-r26fdvv4oowwlm4yozeoozfvg6kkkeoa/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/numactl-2.0.12-yde245phiam6ciw7ea7edn6nb7b3kvfr/lib' '-DCMAKE_PREFIX_PATH:STRING=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/cmake-3.18.1-j2xfzqobp2l4vivce4ufzvpdmb6v2xa2;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3' '-DBL_SPACEDIM=3' '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON' '-DENABLE_FBASELIB=ON' '-DCMAKE_C_COMPILER=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpicc' '-DCMAKE_CXX_COMPILER=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpic++' '-DCMAKE_Fortran_COMPILER=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpif90' '/tmp/root/spack-stage/spack-stage-boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq/spack-src'
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpicc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpic++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:62 (set):
  implicitly converting 'INT' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:63 (set):
  implicitly converting 'INT' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:64 (set):
  implicitly converting 'INT' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:65 (set):
  implicitly converting 'INT' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:66 (set):
  implicitly converting 'INT' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:67 (set):
  implicitly converting 'INT' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:68 (set):
  implicitly converting 'INT' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The Fortran compiler identification is GNU 8.2.1
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpif90 - skipped
-- Checking whether /home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpif90 supports Fortran 90
-- Checking whether /home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpif90 supports Fortran 90 - yes
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
-- BoxLib-specific compile settings:
--    Fortran name mangling scheme to UNDERSCORE (lower case, append underscore)
--    BL_SPACEDIM = 3 (INT: 1,2,3)
--    BL_MACHINE = Linux (STRING: <ARCH>)
--    BL_PRECISION = DOUBLE (STRING: "FLOAT", "DOUBLE")
--    ENABLE_MPI = 1 (INT: 0,1)
--    ENABLE_OpenMP = 0 (INT: 0,1)
--    BL_DEBUG = 1 (INT: 0,1)
--    BL_USE_PARTICLES = 0 (INT: 0,1)
--    ENABLE_BACKTRACE = 1 (INT: 0,1)
--    ENABLE_PROFILING = 0 (INT: 0,1)
--    CMAKE_INSTALL_PREFIX = /home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq (STRING: <install location prefix>)
-- Found MPI_C: /home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpicc (found version "3.1")
-- Found MPI_CXX: /home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpic++ (found version "3.1")
-- Found MPI_Fortran: /home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpif90 (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Found Perl: /usr/bin/perl (found version "5.26.3")
-- Writing target file
CMake Warning (dev) at CMakeLists.txt:116 (set):
  implicitly converting 'string' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
CMake Error at Src/C_ParticleLib/CMakeLists.txt:37 (add_library):
  No SOURCES given to target: box_cpart


CMake Generate step failed.  Build files cannot be regenerated correctly.
==> Error: ProcessError: Command exited with status 1:
    'cmake' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:STRING=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq' '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF' '-DCMAKE_INSTALL_RPATH:STRING=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq/lib64;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/hwloc-1.11.11-cqe7ck6odm42awc5x5q2e37bopp6kply/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/libpciaccess-0.13.5-pvvuyugujtydfz3jv5nuvqx6csxvx6dv/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/libxml2-2.9.10-n3yjvwrs62zscl6dgkgf6hxyofhb245h/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/libiconv-1.16-l55npm3aywt3ht3trtormu2flaeejhym/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/xz-5.2.5-n5spgwkq2ixqb3ubruaxdifholuuuefg/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/zlib-1.2.11-r26fdvv4oowwlm4yozeoozfvg6kkkeoa/lib;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/numactl-2.0.12-yde245phiam6ciw7ea7edn6nb7b3kvfr/lib' '-DCMAKE_PREFIX_PATH:STRING=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/cmake-3.18.1-j2xfzqobp2l4vivce4ufzvpdmb6v2xa2;/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3' '-DBL_SPACEDIM=3' '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON' '-DENABLE_FBASELIB=ON' '-DCMAKE_C_COMPILER=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpicc' '-DCMAKE_CXX_COMPILER=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpic++' '-DCMAKE_Fortran_COMPILER=/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/openmpi-3.1.6-gxaljkfiw2x4r57z7cxnxanc3a7lvoa3/bin/mpif90' '/tmp/root/spack-stage/spack-stage-boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq/spack-src'

1 error found in build log:
     68    -- Writing target file
     69    CMake Warning (dev) at CMakeLists.txt:116 (set):
     70      implicitly converting 'string' to 'STRING' type.
     71    This warning is for project developers.  Use -Wno-dev to suppress it.
     72
     73    -- Configuring done
  >> 74    CMake Error at Src/C_ParticleLib/CMakeLists.txt:37 (add_library):
     75      No SOURCES given to target: box_cpart
     76
     77
     78    CMake Generate step failed.  Build files cannot be regenerated correctly.

See build log for details:
  /tmp/root/spack-stage/spack-stage-boxlib-16.12.2-473rsd6bvnnieqbtqpa7olcxyovmkyvq/spack-build-out.txt
```


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/boxlib/package.py b/var/spack/repos/builtin/packages/boxlib/package.py
--- a/var/spack/repos/builtin/packages/boxlib/package.py
+++ b/var/spack/repos/builtin/packages/boxlib/package.py
@@ -32,6 +32,7 @@ def cmake_args(self):
         options.extend(
             [
                 "-DBL_SPACEDIM=%d" % int(spec.variants["dims"].value),
+                "-DBL_USE_PARTICLES=1",
                 "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON",
                 "-DENABLE_FBASELIB=ON",
                 "-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,


Test patch: