Repository: spack/spack

Issue:
Installation issue: dla-future
### Steps to reproduce the issue

```console
$ spack spec -I dla-future +rocm+scalapack+hdf5 amdgpu_t
arget=gfx906 ^umpire/ki2
Input spec
--------------------------------
 -   dla-future+hdf5+rocm+scalapack amdgpu_target=gfx906
 -       ^umpire/ki2

Concretized
--------------------------------
 -   dla-future@0.3.1%gcc@13.1.0~cuda~doc+hdf5~ipo~miniapps+rocm+scalapack+shared amdgpu_target=gfx906 build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[+]      ^amdscalapack@4.1%gcc@13.1.0~ilp64+ipo~pic+shared build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[+]      ^blaspp@2023.08.25%gcc@13.1.0~cuda~ipo+openmp~rocm+shared~sycl build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[e]      ^cmake@3.25.0%gcc@13.1.0~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=linux-ubuntu22.04-zen3
[e]      ^gmake@4.3%gcc@13.1.0~guile build_system=autotools patches=599f134 arch=linux-ubuntu22.04-zen3
[+]      ^hdf5@1.14.3%gcc@13.1.0+cxx~fortran~hl~ipo~java~map+mpi+shared~subfiling~szip+threadsafe+tools api=default build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[e]          ^pkg-config@0.29.2%gcc@13.1.0+internal_glib build_system=autotools arch=linux-ubuntu22.04-zen3
[+]          ^zlib@1.2.13%gcc@13.1.0+optimize+pic+shared build_system=makefile arch=linux-ubuntu22.04-zen3
[e]      ^hip@5.7.0%gcc@13.1.0~cuda+rocm build_system=cmake build_type=Release generator=make patches=aee7249,c2ee21c,e73e91b arch=linux-ubuntu22.04-zen3
[e]      ^hsa-rocr-dev@5.7.0%gcc@13.1.0+image+shared build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[+]      ^lapackpp@2023.08.25%gcc@13.1.0~cuda~ipo~rocm+shared~sycl build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[e]      ^llvm-amdgpu@5.7.0%gcc@13.1.0~link_llvm_dylib~llvm_dylib~openmp+rocm-device-libs build_system=cmake build_type=Release generator=ninja patches=b66529f arch=linux-ubuntu22.04-zen3
[+]      ^openblas@0.3.23%gcc@13.1.0~bignuma~consistent_fpcsr+fortran~ilp64+locking+pic+shared build_system=makefile symbol_suffix=none threads=openmp arch=linux-ubuntu22.04-zen3
[+]          ^perl@5.38.0%gcc@13.1.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-ubuntu22.04-zen3
[+]              ^berkeley-db@18.1.40%gcc@13.1.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu22.04-zen3
[+]              ^bzip2@1.0.8%gcc@13.1.0~debug~pic+shared build_system=generic arch=linux-ubuntu22.04-zen3
[e]                  ^diffutils@3.8%gcc@13.1.0 build_system=autotools arch=linux-ubuntu22.04-zen3
[+]              ^gdbm@1.23%gcc@13.1.0 build_system=autotools arch=linux-ubuntu22.04-zen3
[+]                  ^readline@8.2%gcc@13.1.0 build_system=autotools patches=bbf97f1 arch=linux-ubuntu22.04-zen3
[+]      ^openmpi@4.1.5%gcc@13.1.0~atomics~cuda~cxx~cxx_exceptions~gpfs~internal-hwloc~internal-pmix~java~legacylaunchers~lustre~memchecker~openshmem~orterunprefix+romio+rsh~singularity+static+vt+wrapper-rpath build_system=autotools fabrics=none schedulers=none arch=linux-ubuntu22.04-zen3
[+]          ^hwloc@2.9.1%gcc@13.1.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-ubuntu22.04-zen3
[+]              ^libpciaccess@0.17%gcc@13.1.0 build_system=autotools arch=linux-ubuntu22.04-zen3
[+]                  ^util-macros@1.19.3%gcc@13.1.0 build_system=autotools arch=linux-ubuntu22.04-zen3
[+]              ^libxml2@2.10.3%gcc@13.1.0~python build_system=autotools arch=linux-ubuntu22.04-zen3
[+]                  ^libiconv@1.17%gcc@13.1.0 build_system=autotools libs=shared,static arch=linux-ubuntu22.04-zen3
[+]                  ^xz@5.4.1%gcc@13.1.0~pic build_system=autotools libs=shared,static arch=linux-ubuntu22.04-zen3
[+]              ^ncurses@6.4%gcc@13.1.0~symlinks+termlib abi=none build_system=autotools arch=linux-ubuntu22.04-zen3
[+]          ^numactl@2.0.14%gcc@13.1.0 build_system=autotools patches=4e1d78c,62fc8a8,ff37630 arch=linux-ubuntu22.04-zen3
[e]              ^autoconf@2.71%gcc@13.1.0 build_system=autotools arch=linux-ubuntu22.04-zen3
[e]              ^automake@1.16.5%gcc@13.1.0 build_system=autotools arch=linux-ubuntu22.04-zen3
[e]              ^libtool@2.4.6%gcc@13.1.0 build_system=autotools arch=linux-ubuntu22.04-zen3
[e]              ^m4@1.4.18%gcc@13.1.0+sigsegv build_system=autotools patches=3877ab5,fc9b616 arch=linux-ubuntu22.04-zen3
[e]          ^openssh@8.9p1%gcc@13.1.0+gssapi build_system=autotools arch=linux-ubuntu22.04-zen3
[+]          ^pmix@4.2.4%gcc@13.1.0~docs+pmi_backwards_compatibility~python~restful build_system=autotools arch=linux-ubuntu22.04-zen3
[+]              ^libevent@2.1.12%gcc@13.1.0+openssl build_system=autotools arch=linux-ubuntu22.04-zen3
[+]                  ^openssl@3.1.1%gcc@13.1.0~docs~shared build_system=generic certs=mozilla arch=linux-ubuntu22.04-zen3
[+]                      ^ca-certificates-mozilla@2023-05-30%gcc@13.1.0 build_system=generic arch=linux-ubuntu22.04-zen3
[+]      ^pika@0.20.0%gcc@13.1.0~apex~cuda~examples~generic_coroutines~ipo+mpi+rocm~stdexec~tracy amdgpu_target=gfx906 build_system=cmake build_type=Release cxxstd=17 generator=ninja malloc=mimalloc arch=linux-ubuntu22.04-zen3
[+]          ^boost@1.83.0%gcc@13.1.0~atomic~chrono~clanglibcpp~container~context~contract~coroutine~date_time~debug~exception~fiber~filesystem~graph~graph_parallel~icu~iostreams~json~locale~log~math~mpi+multithreaded~nowide~numpy~pic~program_options~python~random~regex~serialization+shared~signals~singlethreaded~stacktrace~system~taggedlayout~test~thread~timer~type_erasure~versionedlayout~wave build_system=generic cxxstd=17 patches=a440f96 visibility=hidden arch=linux-ubuntu22.04-zen3
[+]          ^fmt@10.1.1%gcc@13.1.0~ipo+pic~shared build_system=cmake build_type=Release cxxstd=17 generator=make arch=linux-ubuntu22.04-zen3
[e]          ^git@2.34.1%gcc@13.1.0+man+nls+perl+subtree~svn~tcltk build_system=autotools arch=linux-ubuntu22.04-zen3
[+]          ^mimalloc@2.1.2%gcc@13.1.0~build_tests~debug_full~ipo~local_dynamic_tls+override+padding~secure~see_asm~show_errors~skip_collect_on_exit~use_cxx~xmalloc build_system=cmake build_type=Release generator=make libs=object,shared,static arch=linux-ubuntu22.04-zen3
[e]          ^ninja@1.11.1.git.kitware.jobserver-1%gcc@13.1.0+re2c build_system=generic arch=linux-ubuntu22.04-zen3
[e]      ^rocblas@5.7.0%gcc@13.1.0+tensile amdgpu_target=gfx906 build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[e]      ^rocprim@5.7.0%gcc@13.1.0 amdgpu_target=gfx906 build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[e]      ^rocsolver@5.7.0%gcc@13.1.0+optimal amdgpu_target=gfx906 build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[e]      ^rocthrust@5.7.0%gcc@13.1.0 amdgpu_target=gfx906 build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[+]      ^umpire@2022.10.0%gcc@13.1.0+c~cuda+device_alloc+deviceconst~examples+fortran~ipo+numa+openmp+rocm~shared amdgpu_target=gfx906 build_system=cmake build_type=Release generator=make patches=0f43cad,7ed5d2c tests=none arch=linux-ubuntu22.04-zen3
[+]          ^blt@0.5.3%gcc@13.1.0 build_system=generic arch=linux-ubuntu22.04-zen3
[+]          ^camp@2022.10.1%gcc@13.1.0~cuda+ipo+openmp+rocm~tests amdgpu_target=gfx906 build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
[+]      ^whip@0.2.0%gcc@13.1.0~cuda~ipo+rocm amdgpu_target=gfx906 build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-zen3
```


### Error message

<details><summary>Error message</summary>

<pre>
==> Installing dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno [36/36]
==> No binary for dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno found: installing from source
==> Using cached archive: /home/yizeyi18/soft/spack/var/spack/cache/_source-cache/archive/35/350a7fd216790182aa52639a3d574990a9d57843e02b92d87b854912f4812bfe.tar.gz
==> No patches needed for dla-future
==> dla-future: Executing phase: 'cmake'
==> dla-future: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j12'

9 errors found in build log:
     191    [ 70%] Building HIP object src/CMakeFiles/dlaf.core_object.dir/lapack/gpu/add.cu.o
     192    cd /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-build-4bbrapb/src && /opt/rocm/llvm/bin/clang++ -DCAMP_HAVE_HIP -DDLAF_ASSERT_ENABLE -DDLAF_FUNCTIO
            N_NAME=__PRETTY_FUNCTION__ -DDLAF_WITH_GPU -DDLAF_WITH_HDF5 -DDLAF_WITH_HIP -DDLAF_WITH_OPENMP -DDLAF_WITH_SCALAPACK -DH5_BUILT_AS_DYNAMIC_LIB -DROCM_MATHLIBS_API_USE_HIP_COMPLEX -DWHIP_HIP -D_FIL
            E_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -D__HIP_PLATFORM_AMD__=1 -D__HIP_PLATFORM_HCC__=1 -D__HIP_ROCclr__=1 -I/tmp/yizeyi18/spack-stage/
            spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include -I/tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-build-4bbrapb/includ
            e -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/openmpi-4.1.5-wtajzbikckprkfytzm7eakiebknu6bkf/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.
            04-zen3/gcc-13.1.0/pika-0.20.0-bognl4fxi7krcc43jisgv25ckhgorxdq/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/fmt-10.1.1-sddzl7xrcgvivlhfjqkyajf2p55uwxze/i
            nclude -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/whip-0.2.0-27ceucomntdo3bo3xkqdck6ivldk4zef/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu2
            2.04-zen3/gcc-13.1.0/boost-1.83.0-ddjswkitcyuniehjtsd22ft2vjeumzkl/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/hwloc-2.9.1-mboh5p42o4mumeq7mnxky42xq457eh
            bi/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/mimalloc-2.1.2-qhncbojkzcc33uo7ioqedrv27t6aogab/include/mimalloc-2.1 -isystem /home/yizeyi18/soft/spack/op
            t/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/lapackpp-2023.08.25-lba743a2jefbxihz6uoxmohjeegklbvm/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/blaspp-2023.08
            .25-fmfjil6ei663tm4vxr7fzjsed77vpxjx/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/camp-2022.10.1-vr5ywozmir7cshow4mtzd35mhp44itbq/include -isystem /home/y
            izeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/umpire-2022.10.0-ki2axefepdfjxw6kj2ipsna5s63i7sie/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.
            1.0/umpire-2022.10.0-ki2axefepdfjxw6kj2ipsna5s63i7sie/include/umpire -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/hdf5-1.14.3-6rh23k5dbbhvxltbwmtbm7bfhdcp3bks/inc
            lude -O3 -DNDEBUG -std=c++17 --offload-arch=gfx906 -fPIC -Wall -Wextra -Wunused -Wunused-local-typedefs -Wdangling-else -Wswitch-enum -Wsign-conversion -Wfloat-conversion -pedantic -mllvm -amdgpu-
            early-inline-all=true -mllvm -amdgpu-function-calls=false -fopenmp -gz -o CMakeFiles/dlaf.core_object.dir/lapack/gpu/add.cu.o -x hip -c /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbra
            pbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu
     193    [ 71%] Building HIP object src/CMakeFiles/dlaf.core_object.dir/lapack/gpu/lacpy.cu.o
     194    cd /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-build-4bbrapb/src && /opt/rocm/llvm/bin/clang++ -DCAMP_HAVE_HIP -DDLAF_ASSERT_ENABLE -DDLAF_FUNCTIO
            N_NAME=__PRETTY_FUNCTION__ -DDLAF_WITH_GPU -DDLAF_WITH_HDF5 -DDLAF_WITH_HIP -DDLAF_WITH_OPENMP -DDLAF_WITH_SCALAPACK -DH5_BUILT_AS_DYNAMIC_LIB -DROCM_MATHLIBS_API_USE_HIP_COMPLEX -DWHIP_HIP -D_FIL
            E_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -D__HIP_PLATFORM_AMD__=1 -D__HIP_PLATFORM_HCC__=1 -D__HIP_ROCclr__=1 -I/tmp/yizeyi18/spack-stage/
            spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include -I/tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-build-4bbrapb/includ
            e -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/openmpi-4.1.5-wtajzbikckprkfytzm7eakiebknu6bkf/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.
            04-zen3/gcc-13.1.0/pika-0.20.0-bognl4fxi7krcc43jisgv25ckhgorxdq/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/fmt-10.1.1-sddzl7xrcgvivlhfjqkyajf2p55uwxze/i
            nclude -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/whip-0.2.0-27ceucomntdo3bo3xkqdck6ivldk4zef/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu2
            2.04-zen3/gcc-13.1.0/boost-1.83.0-ddjswkitcyuniehjtsd22ft2vjeumzkl/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/hwloc-2.9.1-mboh5p42o4mumeq7mnxky42xq457eh
            bi/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/mimalloc-2.1.2-qhncbojkzcc33uo7ioqedrv27t6aogab/include/mimalloc-2.1 -isystem /home/yizeyi18/soft/spack/op
            t/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/lapackpp-2023.08.25-lba743a2jefbxihz6uoxmohjeegklbvm/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/blaspp-2023.08
            .25-fmfjil6ei663tm4vxr7fzjsed77vpxjx/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/camp-2022.10.1-vr5ywozmir7cshow4mtzd35mhp44itbq/include -isystem /home/y
            izeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/umpire-2022.10.0-ki2axefepdfjxw6kj2ipsna5s63i7sie/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.
            1.0/umpire-2022.10.0-ki2axefepdfjxw6kj2ipsna5s63i7sie/include/umpire -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/hdf5-1.14.3-6rh23k5dbbhvxltbwmtbm7bfhdcp3bks/inc
            lude -O3 -DNDEBUG -std=c++17 --offload-arch=gfx906 -fPIC -Wall -Wextra -Wunused -Wunused-local-typedefs -Wdangling-else -Wswitch-enum -Wsign-conversion -Wfloat-conversion -pedantic -mllvm -amdgpu-
            early-inline-all=true -mllvm -amdgpu-function-calls=false -fopenmp -gz -o CMakeFiles/dlaf.core_object.dir/lapack/gpu/lacpy.cu.o -x hip -c /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bb
            rapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/lacpy.cu
     195    [ 72%] Building HIP object src/CMakeFiles/dlaf.core_object.dir/lapack/gpu/laset.cu.o
     196    cd /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-build-4bbrapb/src && /opt/rocm/llvm/bin/clang++ -DCAMP_HAVE_HIP -DDLAF_ASSERT_ENABLE -DDLAF_FUNCTIO
            N_NAME=__PRETTY_FUNCTION__ -DDLAF_WITH_GPU -DDLAF_WITH_HDF5 -DDLAF_WITH_HIP -DDLAF_WITH_OPENMP -DDLAF_WITH_SCALAPACK -DH5_BUILT_AS_DYNAMIC_LIB -DROCM_MATHLIBS_API_USE_HIP_COMPLEX -DWHIP_HIP -D_FIL
            E_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -D__HIP_PLATFORM_AMD__=1 -D__HIP_PLATFORM_HCC__=1 -D__HIP_ROCclr__=1 -I/tmp/yizeyi18/spack-stage/
            spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include -I/tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-build-4bbrapb/includ
            e -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/openmpi-4.1.5-wtajzbikckprkfytzm7eakiebknu6bkf/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.
            04-zen3/gcc-13.1.0/pika-0.20.0-bognl4fxi7krcc43jisgv25ckhgorxdq/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/fmt-10.1.1-sddzl7xrcgvivlhfjqkyajf2p55uwxze/i
            nclude -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/whip-0.2.0-27ceucomntdo3bo3xkqdck6ivldk4zef/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu2
            2.04-zen3/gcc-13.1.0/boost-1.83.0-ddjswkitcyuniehjtsd22ft2vjeumzkl/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/hwloc-2.9.1-mboh5p42o4mumeq7mnxky42xq457eh
            bi/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/mimalloc-2.1.2-qhncbojkzcc33uo7ioqedrv27t6aogab/include/mimalloc-2.1 -isystem /home/yizeyi18/soft/spack/op
            t/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/lapackpp-2023.08.25-lba743a2jefbxihz6uoxmohjeegklbvm/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/blaspp-2023.08
            .25-fmfjil6ei663tm4vxr7fzjsed77vpxjx/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/camp-2022.10.1-vr5ywozmir7cshow4mtzd35mhp44itbq/include -isystem /home/y
            izeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/umpire-2022.10.0-ki2axefepdfjxw6kj2ipsna5s63i7sie/include -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.
            1.0/umpire-2022.10.0-ki2axefepdfjxw6kj2ipsna5s63i7sie/include/umpire -isystem /home/yizeyi18/soft/spack/opt/spack/linux-ubuntu22.04-zen3/gcc-13.1.0/hdf5-1.14.3-6rh23k5dbbhvxltbwmtbm7bfhdcp3bks/inc
            lude -O3 -DNDEBUG -std=c++17 --offload-arch=gfx906 -fPIC -Wall -Wextra -Wunused -Wunused-local-typedefs -Wdangling-else -Wswitch-enum -Wsign-conversion -Wfloat-conversion -pedantic -mllvm -amdgpu-
            early-inline-all=true -mllvm -amdgpu-function-calls=false -fopenmp -gz -o CMakeFiles/dlaf.core_object.dir/lapack/gpu/laset.cu.o -x hip -c /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bb
            rapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/laset.cu
  >> 197    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:32:17: error: use of overloaded operator '*' is ambiguous (with operand type
            s 'const HIP_vector_type<float, 2>' and 'const HIP_vector_type<float, 2>')
     198      b = b + alpha * a;
     199              ~~~~~ ^ ~
     200    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:101:30: note: in instantiation of function template specialization 'dlaf::gp
            ulapack::kernels::addAlpha<HIP_vector_type<float, 2>>' requested here
     201        addDiagInternal<comp, T, addAlpha>(m, n, alpha, a, lda, b, ldb);
     202                                 ^
     203    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:126:9: note: in instantiation of function template specialization 'dlaf::gpu
            lapack::kernels::addDiag<&dlaf::util::isLower, HIP_vector_type<float, 2>>' requested here

     ...

     212    /opt/rocm/include/hip/amd_detail/amd_hip_complex.h:237:1: note: candidate function
     213    COMPLEX_MUL_OP_OVERLOAD(hipFloatComplex)
     214    ^
     215    /opt/rocm/include/hip/amd_detail/amd_hip_complex.h:78:40: note: expanded from macro 'COMPLEX_MUL_OP_OVERLOAD'
     216        __HOST_DEVICE__ static inline type operator*(const type& lhs, const type& rhs) {           \
     217                                           ^
  >> 218    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:71:5: error: no matching function for call to 'addAllInternal'
     219        addAllInternal<T, addAlpha>(m, n, alpha, a, lda, b, ldb);
     220        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     221    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:128:9: note: in instantiation of function template specialization 'dlaf::gpu
            lapack::kernels::addAll<HIP_vector_type<float, 2>>' requested here
     222            addAll(m, n, alpha, a, lda, b, ldb);
     223            ^
     224    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:161:12: note: in instantiation of function template specialization 'dlaf::gp
            ulapack::kernels::add<HIP_vector_type<float, 2>>' requested here
     225      kernels::add<<<nr_blocks, nr_threads, 0, stream>>>(util::blasToCublas(uplo), um, un,
     226               ^
     227    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:46:17: note: candidate template ignored: invalid explicitly-specified argume
            nt for template parameter 'add'
     228    __device__ void addAllInternal(const unsigned m, const unsigned n, const T& alpha, const T* a,
     229                    ^
  >> 230    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:101:5: error: no matching function for call to 'addDiagInternal'
     231        addDiagInternal<comp, T, addAlpha>(m, n, alpha, a, lda, b, ldb);
     232        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     233    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:132:9: note: in instantiation of function template specialization 'dlaf::gpu
            lapack::kernels::addDiag<&dlaf::util::isUpper, HIP_vector_type<float, 2>>' requested here
     234            addDiag<dlaf::util::isUpper>(m, n, alpha, a, lda, b, ldb);
     235            ^
     236    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:161:12: note: in instantiation of function template specialization 'dlaf::gp
            ulapack::kernels::add<HIP_vector_type<float, 2>>' requested here
     237      kernels::add<<<nr_blocks, nr_threads, 0, stream>>>(util::blasToCublas(uplo), um, un,
     238               ^
     239    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:75:17: note: candidate template ignored: invalid explicitly-specified argume
            nt for template parameter 'add'
     240    __device__ void addDiagInternal(const unsigned m, const unsigned n, const T& alpha, const T* a,
     241                    ^
  >> 242    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:32:17: error: use of overloaded operator '*' is ambiguous (with operand type
            s 'const HIP_vector_type<double, 2>' and 'const HIP_vector_type<double, 2>')
     243      b = b + alpha * a;
     244              ~~~~~ ^ ~
     245    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:101:30: note: in instantiation of function template specialization 'dlaf::gp
            ulapack::kernels::addAlpha<HIP_vector_type<double, 2>>' requested here
     246        addDiagInternal<comp, T, addAlpha>(m, n, alpha, a, lda, b, ldb);
     247                                 ^
     248    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:126:9: note: in instantiation of function template specialization 'dlaf::gpu
            lapack::kernels::addDiag<&dlaf::util::isLower, HIP_vector_type<double, 2>>' requested here

     ...

     257    /opt/rocm/include/hip/amd_detail/amd_hip_complex.h:259:1: note: candidate function
     258    COMPLEX_MUL_OP_OVERLOAD(hipDoubleComplex)
     259    ^
     260    /opt/rocm/include/hip/amd_detail/amd_hip_complex.h:78:40: note: expanded from macro 'COMPLEX_MUL_OP_OVERLOAD'
     261        __HOST_DEVICE__ static inline type operator*(const type& lhs, const type& rhs) {           \
     262                                           ^
  >> 263    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:71:5: error: no matching function for call to 'addAllInternal'
     264        addAllInternal<T, addAlpha>(m, n, alpha, a, lda, b, ldb);
     265        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     266    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:128:9: note: in instantiation of function template specialization 'dlaf::gpu
            lapack::kernels::addAll<HIP_vector_type<double, 2>>' requested here
     267            addAll(m, n, alpha, a, lda, b, ldb);
     268            ^
     269    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:161:12: note: in instantiation of function template specialization 'dlaf::gp
            ulapack::kernels::add<HIP_vector_type<double, 2>>' requested here
     270      kernels::add<<<nr_blocks, nr_threads, 0, stream>>>(util::blasToCublas(uplo), um, un,
     271               ^
     272    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:46:17: note: candidate template ignored: invalid explicitly-specified argume
            nt for template parameter 'add'
     273    __device__ void addAllInternal(const unsigned m, const unsigned n, const T& alpha, const T* a,
     274                    ^
  >> 275    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:101:5: error: no matching function for call to 'addDiagInternal'
     276        addDiagInternal<comp, T, addAlpha>(m, n, alpha, a, lda, b, ldb);
     277        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     278    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:132:9: note: in instantiation of function template specialization 'dlaf::gpu
            lapack::kernels::addDiag<&dlaf::util::isUpper, HIP_vector_type<double, 2>>' requested here
     279            addDiag<dlaf::util::isUpper>(m, n, alpha, a, lda, b, ldb);
     280            ^
     281    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:161:12: note: in instantiation of function template specialization 'dlaf::gp
            ulapack::kernels::add<HIP_vector_type<double, 2>>' requested here
     282      kernels::add<<<nr_blocks, nr_threads, 0, stream>>>(util::blasToCublas(uplo), um, un,
     283               ^
     284    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/src/lapack/gpu/add.cu:75:17: note: candidate template ignored: invalid explicitly-specified argume
            nt for template parameter 'add'
     285    __device__ void addDiagInternal(const unsigned m, const unsigned n, const T& alpha, const T* a,
     286                    ^
     287    6 errors generated when compiling for gfx906.
  >> 288    make[2]: *** [src/CMakeFiles/dlaf.core_object.dir/build.make:385: src/CMakeFiles/dlaf.core_object.dir/lapack/gpu/add.cu.o] Error 1
     289    make[2]: *** Waiting for unfinished jobs....
     290    In file included from /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include/dlaf/gpu/lapack/error.h:19,
     291                     from /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include/dlaf/lapack/tile.h:44,
     292                     from /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include/dlaf/matrix/copy_tile.h:22,
     293                     from /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include/dlaf/matrix/copy.h:22,
     294                     from /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include/dlaf/matrix/matrix_mirror.h:18,

     ...

     322    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include/dlaf/gpu/rocblas/error.h: In function 'std::string dlaf::gpublas::rocblas::internal::getEr
            rorString(rocblas_status)':
     323    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include/dlaf/gpu/rocblas/error.h:23:10: warning: enumeration value 'rocblas_status_excluded_from_b
            uild' not handled in switch [-Wswitch]
     324       23 |   switch (st) {
     325          |          ^
     326    /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-src/include/dlaf/gpu/rocblas/error.h:23:10: warning: enumeration value 'rocblas_status_arch_mismatch'
            not handled in switch [-Wswitch]
     327    make[2]: Leaving directory '/tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-build-4bbrapb'
  >> 328    make[1]: *** [CMakeFiles/Makefile2:995: src/CMakeFiles/dlaf.core_object.dir/all] Error 2
     329    make[1]: Leaving directory '/tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-build-4bbrapb'
  >> 330    make: *** [Makefile:149: all] Error 2

See build log for details:
  /tmp/yizeyi18/spack-stage/spack-stage-dla-future-0.3.1-4bbrapbxtsh6sefh7fhgqet5kimevtno/spack-build-out.txt
</pre></details>


### Information on your system

* **Spack:** 0.22.0.dev0 (a9c2221a360677f982cfc2b71740bb99e85e310b)
* **Python:** 3.10.12
* **Platform:** linux-ubuntu22.04-zen3
* **Concretizer:** clingo

### Additional information

@albestro  @aurianer  @msimberg  @rasolca
ROCm-5.7.0 compiler get hipFloatComplex/hipDoubleComplex obscured with HIP_vector_type<float, 2>/HIP_vector_type<double, 2>, which makes operator '*' ambiguous.
I manually instantiated the function and made it compile but that should not be a right way to solve it. Considering rocm-5.7.0 is the last version supports gfx906, I have to stay at here; is there any solution better?

[spack-build-out.txt](https://github.com/spack/spack/files/13615489/spack-build-out.txt)
[spack-build-env.txt](https://github.com/spack/spack/files/13615490/spack-build-env.txt)
[CMakeCache.txt](https://github.com/spack/spack/files/13615492/CMakeCache.txt)
[try.patch](https://github.com/spack/spack/files/13615524/try.patch)


### General information

- [X] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [X] I have run `spack maintainers <name-of-the-package>` and **@mentioned** any maintainers
- [X] I have uploaded the build log and environment files
- [X] I have searched the issues of this repo and believe this is not a duplicate


Discussion:
Thanks @yizeyi18 for the report! We've so far successfully used ROCm 5.2-4. We haven't tested 5.5, and 5.6 we know is broken (at least on some systems, see https://github.com/eth-cscs/DLA-Future/issues/1049). We haven't tested 5.7 either yet.

This looks like a HIP issue, but I don't exclude that we're doing something silly in DLA-Future. I'd accept a PR to add a conflict with ROCm 5.7 in DLA-Future for the moment until we understand what is actually going on here.

By the way, don't be afraid to open issues like these directly on the DLA-Future repo. We'll happily look into these and apply fixes on both the DLA-Future side and here, but opening the issue there takes a bit of noise away from core spack issues. The important thing is of course reporting it somewhere though, so I appreciate you reporting it here as well.
@msimberg I suppose the issue faults by HIP too, but solving it in dla-future also makes sense: some supercomputers, like the MI50 in my hand, relies on ROCm-5.7.0 and would never get new release to fix it; they still runs. 
I apologize in ignoring original dla-future repo while writing this issue. That's only because I tries to install dlaf from spack, and I should realize it should be a dlaf issue. Thanks for your reply.
> @msimberg I suppose the issue faults by HIP too, but solving it in dla-future also makes sense: some supercomputers, like the MI50 in my hand, relies on ROCm-5.7.0 and would never get new release to fix it; they still runs.

Absolutely, if we can find a workaround we'll definitely include that in DLA-Future itself as well. I'm just not sure yet what the problem is, much less what the workaround looks like.

> I apologize in ignoring original dla-future repo while writing this issue. That's only because I tries to install dlaf from spack, and I should realize it should be a dlaf issue. Thanks for your reply.

No need to apologize, I fully understand why you're opening it here and appreciate it either way.
@yizeyi18 I've created an issue on the HIP repository with a reproducer of the problem independently of DLA-Future: https://github.com/ROCm/HIP/issues/3377. I can't see a straightforward way to patch DLA-Future to work around this issue. I think if/when there is an upstream fix we can try to patch HIP 5.7 in spack, but for now I would add a conflict. Do you need 5.7 specifically, or would an older version of HIP work for you as well (since it seems like this is a new problem in 5.7)?

@msimberg Actually I use HIP-5.7.0 only because I upgraded it in apt XwX
As the bug only occurs in HIP-5.7.0, I think it's OK to mark a conflict if older versions still works; I made no test yet, instead using a test patch in the main floor.
The try.patch(see Additional information) is one patch work on the issue, with manual instantiate on addAlpha here; seeing ROCm/HIP#3377 , this seems not a very bad practice?
> @msimberg Actually I use HIP-5.7.0 only because I upgraded it in apt XwX As the bug only occurs in HIP-5.7.0, I think it's OK to mark a conflict if older versions still works;

Ok, that's good to hear. As I mentioned earlier 5.2-5.4 are the only relatively well tested versions for the moment, so if you can stick to those your chances of success will be higher. 5.5 is unknown and 5.6 is also known to be somewhat broken. 5.7 is obviously broken as you've found out.

> I made no test yet, instead using a test patch in the main floor. The try.patch(see Additional information) is one patch work on the issue, with manual instantiate on addAlpha here; seeing [ROCm/HIP#3377](https://github.com/ROCm/HIP/issues/3377) , this seems not a very bad practice?

I'm not sure I understand what you mean. Do you have a patch for DLA-Future to not use `operator*`? A PR on DLA-Future is obviously more than welcome!
> I'm not sure I understand what you mean. Do you have a patch for DLA-Future to not use `operator*`? A PR on DLA-Future is obviously more than welcome!

[try.patch](https://github.com/spack/spack/files/13615524/try.patch)
I meant this patch. I used this patch to pass compile; no further test were performed. 
Unfortunatly I got no time to test it now; I have to prepare for kaoyan (an enterance exam for graduate in china) in the next 2 weeks. Maybe I could test the patch later and make a PR, or hand it to you?
> I meant this patch. I used this patch to pass compile; no further test were performed. Unfortunatly I got no time to test it now; I have to prepare for kaoyan (an enterance exam for graduate in china) in the next 2 weeks. Maybe I could test the patch later and make a PR, or hand it to you?

Ah, perfect! I think we can take it from here and turn that into a PR for you. I can't promise that it'll still happen this year, but latest early next year we should have time to deal with this. Thank you for investigating!

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py
--- a/var/spack/repos/builtin/packages/dla-future/package.py
+++ b/var/spack/repos/builtin/packages/dla-future/package.py
@@ -128,6 +128,8 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
         sha256="7f382c872d89f22da1ad499e85ffe9881cc7404c8465e42877a210a09382e2ea",
         when="@:0.3 %gcc@13:",
     )
+    # https://github.com/spack/spack/issues/41511
+    patch("hip_complex_operator_overloads.patch", when="+rocm")
 
     def cmake_args(self):
         spec = self.spec


Test patch: