Repository: spack/spack

Issue:
umpire@2022.03.1 (and raja) +rocm build fails: camp.hip_repair_option doesn't work with CachedCMakePackage
### Steps to reproduce the issue

`umpire@2022.03.1 +rocm` build fails because `camp.hip_repair_option` doesn't work with `CachedCMakePackage`

This issue is known and a fix is in progress -- creating a formal description of the issue here to track resolution.

Currently open PRs affected by this include:
* https://github.com/spack/spack/pull/32504
* https://github.com/spack/spack/pull/32506
* https://github.com/spack/spack/pull/32505

Background conversation with maintainer and interested developers here:
* https://github.com/spack/spack/pull/32504#issuecomment-1240978644

The issue can be easily reproduced using Docker container image `ecpe4s/ubuntu22.04-runner-x86_64:2022-10-01` and the following Spack environment:
```
spack:
  view: false
  concretizer:
    reuse: false
    unify: false
  specs:
  - umpire +rocm amdgpu_target=gfx90a
```

<details><summary>Concretization</summary><pre>
 -   dex4mki  umpire@2022.03.1%gcc@11.2.0+c~cuda+device_alloc~deviceconst+examples~fortran~ipo~numa~openmp+rocm+shared amdgpu_target=gfx90a build_type=RelWithDebInfo tests=none arch=linux-ubuntu22.04-cascadelake
 -   xcb4wpa      ^blt@0.5.1%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   ezcgltl          ^cmake@3.20.6%gcc@11.2.0~doc+ncurses+ownlibs~qt build_type=Release arch=linux-ubuntu22.04-cascadelake
 -   kkzjklb              ^ncurses@6.3%gcc@11.2.0~symlinks+termlib abi=none arch=linux-ubuntu22.04-cascadelake
 -   6euhi2d                  ^pkgconf@1.8.0%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   mrie5w7              ^openssl@1.1.1q%gcc@11.2.0~docs~shared certs=mozilla patches=3fdcf2d arch=linux-ubuntu22.04-cascadelake
 -   5riqeac                  ^ca-certificates-mozilla@2022-07-19%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   egfrpbs                  ^perl@5.34.1%gcc@11.2.0+cpanm+shared+threads arch=linux-ubuntu22.04-cascadelake
 -   dgodo7w                      ^berkeley-db@18.1.40%gcc@11.2.0+cxx~docs+stl patches=26090f4,b231fcc arch=linux-ubuntu22.04-cascadelake
 -   ty7ht5e                      ^bzip2@1.0.8%gcc@11.2.0~debug~pic+shared arch=linux-ubuntu22.04-cascadelake
 -   rgyvgya                          ^diffutils@3.8%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   g7viddr                              ^libiconv@1.16%gcc@11.2.0 libs=shared,static arch=linux-ubuntu22.04-cascadelake
 -   36lfy5q                      ^gdbm@1.19%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   6ntlkpi                          ^readline@8.1.2%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   7vt7zzw                      ^zlib@1.2.12%gcc@11.2.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu22.04-cascadelake
 -   lcjzfey      ^camp@2022.03.2%gcc@11.2.0~cuda~ipo~openmp+rocm~tests amdgpu_target=gfx90a build_type=RelWithDebInfo arch=linux-ubuntu22.04-cascadelake
 -   unhizof          ^hip@5.2.3%gcc@11.2.0~ipo build_type=Release patches=7ed1232 arch=linux-ubuntu22.04-cascadelake
 -   lzahtry              ^comgr@5.2.3%gcc@11.2.0~ipo build_type=Release arch=linux-ubuntu22.04-cascadelake
 -   zdvs2c3                  ^llvm-amdgpu@5.2.3%gcc@11.2.0~ipo~link_llvm_dylib~llvm_dylib~openmp+rocm-device-libs build_type=Release patches=a08bbe1 arch=linux-ubuntu22.04-cascadelake
 -   qvvwua2                      ^python@3.9.13%gcc@11.2.0+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib patches=0d98e93,4c24573,f2fd060 arch=linux-ubuntu22.04-cascadelake
 -   7ebs6f4                          ^expat@2.4.8%gcc@11.2.0+libbsd arch=linux-ubuntu22.04-cascadelake
 -   7wmajpp                              ^libbsd@0.11.5%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   t7ec7m2                                  ^libmd@1.0.4%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   qy6kuj5                          ^gettext@0.21%gcc@11.2.0+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-ubuntu22.04-cascadelake
 -   zrmmbt5                              ^libxml2@2.10.1%gcc@11.2.0~python arch=linux-ubuntu22.04-cascadelake
 -   iamrc3w                                  ^xz@5.2.5%gcc@11.2.0~pic libs=shared,static arch=linux-ubuntu22.04-cascadelake
 -   fgcv7jn                              ^tar@1.34%gcc@11.2.0 zip=pigz arch=linux-ubuntu22.04-cascadelake
 -   cktex5n                                  ^pigz@2.7%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   j3qc4p3                                  ^zstd@1.5.2%gcc@11.2.0+programs compression=none libs=shared,static arch=linux-ubuntu22.04-cascadelake
 -   yunzcvr                          ^libffi@3.4.2%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   m5rbkgi                          ^sqlite@3.39.2%gcc@11.2.0+column_metadata+dynamic_extensions+fts~functions+rtree arch=linux-ubuntu22.04-cascadelake
 -   5pclhyf                          ^util-linux-uuid@2.37.4%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   xdc3gwc                      ^z3@4.8.16%gcc@11.2.0~gmp~ipo~python build_type=RelWithDebInfo arch=linux-ubuntu22.04-cascadelake
 -   ekbqqnt                  ^rocm-cmake@5.2.3%gcc@11.2.0~ipo build_type=Release arch=linux-ubuntu22.04-cascadelake
 -   e6vtlkr              ^glx@1.4%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   eigl5zg                  ^mesa@22.1.2%gcc@11.2.0+glx+llvm+opengl~opengles+osmesa~strip buildtype=release default_library=shared patches=ee737d1 arch=linux-ubuntu22.04-cascadelake
 -   p5tar2h                      ^bison@3.8.2%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   nwi7ff6                          ^m4@1.4.19%gcc@11.2.0+sigsegv patches=9dc5fbd,bfdffa7 arch=linux-ubuntu22.04-cascadelake
 -   j4piu5a                              ^libsigsegv@2.13%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   4td67vc                      ^flex@2.6.3%gcc@11.2.0+lex~nls arch=linux-ubuntu22.04-cascadelake
 -   wqh2qfe                          ^findutils@4.9.0%gcc@11.2.0 patches=440b954 arch=linux-ubuntu22.04-cascadelake
 -   zby6wbv                      ^glproto@1.4.17%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   yzh4cf2                          ^util-macros@1.19.3%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   hkht2cq                      ^libunwind@1.6.2%gcc@11.2.0~block_signals~conservative_checks~cxx_exceptions~debug~debug_frame+docs~pic+tests+weak_backtrace~xz~zlib components=none libs=shared,static arch=linux-ubuntu22.04-cascadelake
 -   k5d4q25                      ^libx11@1.7.0%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   ofa5u22                          ^inputproto@2.3.2%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   ea2l5e2                          ^kbproto@1.0.7%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   e2ea2x3                          ^libxcb@1.14%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   qyiceog                              ^libpthread-stubs@0.4%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   gmwxeff                              ^libxau@1.0.8%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   z33ate5                                  ^xproto@7.0.31%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   bsggzn5                              ^libxdmcp@1.1.2%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   loyix5a                              ^xcb-proto@1.14.1%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   57mhx45                          ^xextproto@7.3.0%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   mlrpjeo                          ^xtrans@1.3.5%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   7gfkpp6                      ^libxext@1.3.3%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   rb6rp7n                      ^libxt@1.1.5%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   4wxumyh                          ^libice@1.0.9%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   byvzqk7                          ^libsm@1.2.3%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   zm4kmkb                      ^meson@0.63.2%gcc@11.2.0 patches=9c87472,aa6c50d arch=linux-ubuntu22.04-cascadelake
 -   7q6u72f                          ^ninja@1.11.0%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   nqubh2v                          ^py-pip@22.1.2%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   2kc4cf4                          ^py-setuptools@65.0.0%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   2p2dwm7                          ^py-wheel@0.37.1%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   ic5ombn                      ^py-mako@1.1.6%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   c25quak                          ^py-markupsafe@2.0.1%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   galnbdf                      ^xrandr@1.5.0%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   rkgdxam                          ^libxrandr@1.5.0%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   cgd42xf                              ^libxrender@0.9.10%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   jf23i54                                  ^renderproto@0.11.1%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   mnqmlup                              ^randrproto@1.5.0%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   ozaey6f              ^hsa-rocr-dev@5.2.3%gcc@11.2.0+image~ipo+shared build_type=Release patches=71e6851 arch=linux-ubuntu22.04-cascadelake
 -   hvff3iq                  ^elfutils@0.186%gcc@11.2.0~bzip2~debuginfod+nls~xz arch=linux-ubuntu22.04-cascadelake
 -   axo25xq                  ^hsakmt-roct@5.2.3%gcc@11.2.0~ipo+shared build_type=Release patches=f926273 arch=linux-ubuntu22.04-cascadelake
 -   ad76yug                      ^libdrm@2.4.110%gcc@11.2.0~docs arch=linux-ubuntu22.04-cascadelake
 -   52vt5ki                          ^libpciaccess@0.16%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   vziuwz3                              ^libtool@2.4.7%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   lqlhfdj                      ^numactl@2.0.14%gcc@11.2.0 patches=4e1d78c,62fc8a8,ff37630 arch=linux-ubuntu22.04-cascadelake
 -   4qwgewh                          ^autoconf@2.69%gcc@11.2.0 patches=35c4492,7793209,a49dd5b arch=linux-ubuntu22.04-cascadelake
 -   mvu7jzv                          ^automake@1.16.5%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   jixcsu4                  ^xxd-standalone@8.2.1201%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   xhve2dn              ^perl-file-which@1.22%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   lh3ov6e              ^perl-uri-encode@1.1.1%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   iyz72dc                  ^perl-module-build@0.4224%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
 -   rq2ja5z              ^rocminfo@5.2.3%gcc@11.2.0~ipo build_type=Release arch=linux-ubuntu22.04-cascadelake
 -   majfv6g              ^roctracer-dev-api@5.2.3%gcc@11.2.0 arch=linux-ubuntu22.04-cascadelake
</pre></details>

Error:
```
$> spack -e . install
...
==> Installing umpire-2022.03.1-dex4mkipshq5nv4aljtpzdndhzr72vrp
==> No binary for umpire-2022.03.1-dex4mkipshq5nv4aljtpzdndhzr72vrp found: installing from source
==> Using cached archive: /spack/var/spack/cache/_source-cache/git//LLNL/Umpire.git/v2022.03.1.tar.gz
==> Warning: Fetching from mirror without a checksum!
  This package is normally checked out from a version control system, but it has been archived on a spack mirror.  This means we cannot know a checksum for the tarball in advance. Be sure that your connection to this mirror is secure!
==> No patches needed for umpire
==> umpire: Executing phase: 'initconfig'
==> umpire: Executing phase: 'cmake'
==> Error: ProcessError: Command exited with status 1:
    '/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/cmake-3.20.6-ezcgltl76xce7dijmekrwqp6f56jrf65/bin/cmake' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:STRING=/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/umpire-2022.03.1-dex4mkipshq5nv4aljtpzdndhzr72vrp' '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' '-DBUILD_TESTING:BOOL=OFF' '-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON' '-DCMAKE_INSTALL_RPATH:STRING=/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/umpire-2022.03.1-dex4mkipshq5nv4aljtpzdndhzr72vrp/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/umpire-2022.03.1-dex4mkipshq5nv4aljtpzdndhzr72vrp/lib64;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/camp-2022.03.2-lcjzfeylyzb7mbbacgr4e4oid4i7vkr4/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/hip-5.2.3-unhizofrmbtqv4nvknubhsw4t4wpeqnj/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/comgr-5.2.3-lzahtryck4avqrjd5dx7qrj24flqdjbj/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/llvm-amdgpu-5.2.3-zdvs2c3r4js66tsbp7dudnj2vhth7zxp/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/ncurses-6.3-kkzjklbzvukz2cd3nvj37iyhablt7p73/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/z3-4.8.16-xdc3gwcj5oghp3bslp5exonisaobccrv/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/zlib-1.2.12-7vt7zzwb2s2js4o5jy7axtspzoku3h3m/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/mesa-22.1.2-eigl5zgwerqbhuuubewa2leyyjti73rl/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/expat-2.4.8-7ebs6f4vspvfpqwpktj7xemn7b4go434/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libbsd-0.11.5-7wmajppmxqahn5xoxzpufaxha7pyftjq/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libmd-1.0.4-t7ec7m257w27552hkbpwlk7tmc7q6gkt/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/glproto-1.4.17-zby6wbvqmvrrxt6prk3ckw623mk2vjud/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libunwind-1.6.2-hkht2cqfrhp2y2he2hr5yqimxfrbyx62/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libx11-1.7.0-k5d4q25rdz5pmuym5lgfg75xwz46oemh/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/inputproto-2.3.2-ofa5u22m5r2rlawoej3qffv7bjm64lwj/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/kbproto-1.0.7-ea2l5e2kp43i2b423eotqxseywjvqis6/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxcb-1.14-e2ea2x3zga5xipq5wvcgsw25ilq5yo63/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libpthread-stubs-0.4-qyiceogvcl4k7l7qlyhjb23x5x3ntmuk/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxau-1.0.8-gmwxeffxcbkmxvwawtndhutiwficmxwv/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xproto-7.0.31-z33ate5bew7b7xrpj3pv6nb3towcfimo/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxdmcp-1.1.2-bsggzn5pf6pu5guwbooi3riu5uhaqgee/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xcb-proto-1.14.1-loyix5am4k2nvhsknzz74qk2scwlheht/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xextproto-7.3.0-57mhx45pyhusorbg2tq2c6jjtkbb442s/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxext-1.3.3-7gfkpp643eipjjytdpepzrwds67qrp54/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxt-1.1.5-rb6rp7n5npvvooa6wpkl5im4cw5s3g5d/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libice-1.0.9-4wxumyhuqkfxuwwzwhxxtu3hepwy4hkx/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libsm-1.2.3-byvzqk7czx7chocd65k3ccfvp6p4us5d/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/util-linux-uuid-2.37.4-5pclhyfoi3nunejaainclcoqplbflhar/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxrandr-1.5.0-rkgdxamxn5wfvcxvammm3vtw5p7masjx/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxrender-0.9.10-cgd42xfxdrfe6awn7xyztvnebfop6mlk/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/renderproto-0.11.1-jf23i54ioqrltbvltmqym5d43ve6iepb/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/randrproto-1.5.0-mnqmlup2eynuboip64at5u77peh4wkvx/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/hsa-rocr-dev-5.2.3-ozaey6ffk7wukbe5mpbaqb6ujaallicz/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/elfutils-0.186-hvff3iqt4sglltm5pyylfi3y2olyvqa3/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/gettext-0.21-qy6kuj5badjaw4zhgudutprrhh25fbsj/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/bzip2-1.0.8-ty7ht5efqlfzlgqdedq6dojkjebtvhma/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libiconv-1.16-g7viddrjirp5vklboaulazqr727kjzei/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxml2-2.10.1-zrmmbt5iurzpxlr5ehumoyvs2omwhp7l/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xz-5.2.5-iamrc3wrjezdkblkgndal3zg4zrlbvdz/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/hsakmt-roct-5.2.3-axo25xqohgq4xwf5jkh67mo6r3kiggoq/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libdrm-2.4.110-ad76yugamkpitxs2trmyxycavuumjzji/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libpciaccess-0.16-52vt5kingqpvsjdi2ricbiiqyquah6lp/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/numactl-2.0.14-lqlhfdj4gkldltvjrilk7mrkhhqtfzn2/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/perl-file-which-1.22-xhve2dnwoiz4f65yroeutowndo6h2rsc/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/perl-uri-encode-1.1.1-lh3ov6ejkknhvm3mzosrghdxmk333pps/lib;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/openssl-1.1.1q-mrie5w77stafzqhsabxfir6nm4vakov4/lib' '-DCMAKE_PREFIX_PATH:STRING=/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/camp-2022.03.2-lcjzfeylyzb7mbbacgr4e4oid4i7vkr4;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/hip-5.2.3-unhizofrmbtqv4nvknubhsw4t4wpeqnj;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/roctracer-dev-api-5.2.3-majfv6g7oqfwx22tdtprfuif3zda6h6k;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/rocminfo-5.2.3-rq2ja5zr7z4qdvagy4gijppmaigxirqn;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/perl-uri-encode-1.1.1-lh3ov6ejkknhvm3mzosrghdxmk333pps;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/perl-file-which-1.22-xhve2dnwoiz4f65yroeutowndo6h2rsc;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/hsa-rocr-dev-5.2.3-ozaey6ffk7wukbe5mpbaqb6ujaallicz;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/hsakmt-roct-5.2.3-axo25xqohgq4xwf5jkh67mo6r3kiggoq;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/numactl-2.0.14-lqlhfdj4gkldltvjrilk7mrkhhqtfzn2;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libdrm-2.4.110-ad76yugamkpitxs2trmyxycavuumjzji;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libpciaccess-0.16-52vt5kingqpvsjdi2ricbiiqyquah6lp;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/elfutils-0.186-hvff3iqt4sglltm5pyylfi3y2olyvqa3;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/glx-1.4-e6vtlkrxkbr2tibrzdbmsi2rnjsnqfdd;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/mesa-22.1.2-eigl5zgwerqbhuuubewa2leyyjti73rl;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xrandr-1.5.0-galnbdf7mbqnt4vatcotr456ul5y3bh6;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxrandr-1.5.0-rkgdxamxn5wfvcxvammm3vtw5p7masjx;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/randrproto-1.5.0-mnqmlup2eynuboip64at5u77peh4wkvx;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxrender-0.9.10-cgd42xfxdrfe6awn7xyztvnebfop6mlk;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/renderproto-0.11.1-jf23i54ioqrltbvltmqym5d43ve6iepb;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxt-1.1.5-rb6rp7n5npvvooa6wpkl5im4cw5s3g5d;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libsm-1.2.3-byvzqk7czx7chocd65k3ccfvp6p4us5d;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libice-1.0.9-4wxumyhuqkfxuwwzwhxxtu3hepwy4hkx;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxext-1.3.3-7gfkpp643eipjjytdpepzrwds67qrp54;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libx11-1.7.0-k5d4q25rdz5pmuym5lgfg75xwz46oemh;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xtrans-1.3.5-mlrpjeoqpr3b7fldqtktmjql24zpkpgv;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xextproto-7.3.0-57mhx45pyhusorbg2tq2c6jjtkbb442s;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxcb-1.14-e2ea2x3zga5xipq5wvcgsw25ilq5yo63;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xcb-proto-1.14.1-loyix5am4k2nvhsknzz74qk2scwlheht;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxdmcp-1.1.2-bsggzn5pf6pu5guwbooi3riu5uhaqgee;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxau-1.0.8-gmwxeffxcbkmxvwawtndhutiwficmxwv;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xproto-7.0.31-z33ate5bew7b7xrpj3pv6nb3towcfimo;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libpthread-stubs-0.4-qyiceogvcl4k7l7qlyhjb23x5x3ntmuk;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/kbproto-1.0.7-ea2l5e2kp43i2b423eotqxseywjvqis6;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/inputproto-2.3.2-ofa5u22m5r2rlawoej3qffv7bjm64lwj;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libunwind-1.6.2-hkht2cqfrhp2y2he2hr5yqimxfrbyx62;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/glproto-1.4.17-zby6wbvqmvrrxt6prk3ckw623mk2vjud;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/comgr-5.2.3-lzahtryck4avqrjd5dx7qrj24flqdjbj;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/llvm-amdgpu-5.2.3-zdvs2c3r4js66tsbp7dudnj2vhth7zxp;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/z3-4.8.16-xdc3gwcj5oghp3bslp5exonisaobccrv;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/util-linux-uuid-2.37.4-5pclhyfoi3nunejaainclcoqplbflhar;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/gettext-0.21-qy6kuj5badjaw4zhgudutprrhh25fbsj;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/tar-1.34-fgcv7jnttrmxgk2x75zuj2tdp7qtpxdx;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libxml2-2.10.1-zrmmbt5iurzpxlr5ehumoyvs2omwhp7l;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/xz-5.2.5-iamrc3wrjezdkblkgndal3zg4zrlbvdz;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/expat-2.4.8-7ebs6f4vspvfpqwpktj7xemn7b4go434;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libbsd-0.11.5-7wmajppmxqahn5xoxzpufaxha7pyftjq;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libmd-1.0.4-t7ec7m257w27552hkbpwlk7tmc7q6gkt;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/blt-0.5.1-xcb4wpamrrhi7f2rrzluzf23q3dv7ich;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/cmake-3.20.6-ezcgltl76xce7dijmekrwqp6f56jrf65;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/openssl-1.1.1q-mrie5w77stafzqhsabxfir6nm4vakov4;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/zlib-1.2.12-7vt7zzwb2s2js4o5jy7axtspzoku3h3m;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/bzip2-1.0.8-ty7ht5efqlfzlgqdedq6dojkjebtvhma;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/libiconv-1.16-g7viddrjirp5vklboaulazqr727kjzei;/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/ncurses-6.3-kkzjklbzvukz2cd3nvj37iyhablt7p73' '-C' '/tmp/root/spack-stage/spack-stage-umpire-2022.03.1-dex4mkipshq5nv4aljtpzdndhzr72vrp/spack-src/cd6b37e8862e-linux-ubuntu22.04-cascadelake-gcc@11.2.0.cmake' '/tmp/root/spack-stage/spack-stage-umpire-2022.03.1-dex4mkipshq5nv4aljtpzdndhzr72vrp/spack-src'

2 errors found in build log:
  >> 5     CMake Error at cd6b37e8862e-linux-ubuntu22.04-cascadelake-gcc@@11.2.0.cmake:44:
     6       Parse error.  Expected a command name, got unquoted argument with text
     7       "-DHIP_CLANG_INCLUDE_PATH=/spack/opt/spack/linux-ubuntu22.04-cascadelake/gcc-11.2.0/llvm-amdgpu-5.2.3-zdvs2c3r4js66tsbp7dudnj2vhth7zxp/lib/clang/14.0.0/include".
     8
     9
  >> 10    CMake Error: Error processing file: /tmp/root/spack-stage/spack-stage-umpire-2022.03.1-dex4mkipshq5nv4aljtpzdndhzr72vrp/spack-src/cd6b37e8862e-linux-ubuntu22.04-cascadelak
           e-gcc@@11.2.0.cmake
     11    -- Configuring incomplete, errors occurred!
```

Just as a related note: It looks like even when the `camp.hip_repair_option` issue described here is resolved, there will be other issues to work through:
* https://github.com/spack/spack/pull/32504#issuecomment-1242364691
* https://github.com/spack/spack/pull/32505#issuecomment-1244139561



### Error message

<details><summary>Error message</summary><pre>
... see above
</pre></details>


### Information on your system

* **Spack:** 0.19.0.dev0 (494946d020552cba18ad05008c6a732661203462)
* **Python:** 3.10.6
* **Platform:** linux-ubuntu22.04-cascadelake
* **Concretizer:** clingo

### Additional information

[spack-build-env.txt](https://github.com/spack/spack/files/9649348/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/9649349/spack-build-out.txt)

@davidbeckingsale @wspear @mcfadden8 @trws

### 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:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/camp/package.py b/var/spack/repos/builtin/packages/camp/package.py
--- a/var/spack/repos/builtin/packages/camp/package.py
+++ b/var/spack/repos/builtin/packages/camp/package.py
@@ -16,6 +16,16 @@ def hip_repair_options(options, spec):
     )
 
 
+def hip_repair_cache(options, spec):
+    # there is only one dir like this, but the version component is unknown
+    options.append(
+        cmake_cache_path(
+            "HIP_CLANG_INCLUDE_PATH",
+            glob.glob("{}/lib/clang/*/include".format(spec["llvm-amdgpu"].prefix))[0],
+        )
+    )
+
+
 class Camp(CMakePackage, CudaPackage, ROCmPackage):
     """
     Compiler agnostic metaprogramming library providing concepts,
diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py
--- a/var/spack/repos/builtin/packages/raja/package.py
+++ b/var/spack/repos/builtin/packages/raja/package.py
@@ -6,7 +6,7 @@
 import socket
 
 from spack.package import *
-from spack.pkg.builtin.camp import hip_repair_options
+from spack.pkg.builtin.camp import hip_repair_cache
 
 
 class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
@@ -125,7 +125,7 @@ def initconfig_hardware_entries(self):
         if "+rocm" in spec:
             entries.append(cmake_cache_option("ENABLE_HIP", True))
             entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
-            hip_repair_options(entries, spec)
+            hip_repair_cache(entries, spec)
             archs = self.spec.variants["amdgpu_target"].value
             if archs != "none":
                 arch_str = ",".join(archs)
diff --git a/var/spack/repos/builtin/packages/umpire/package.py b/var/spack/repos/builtin/packages/umpire/package.py
--- a/var/spack/repos/builtin/packages/umpire/package.py
+++ b/var/spack/repos/builtin/packages/umpire/package.py
@@ -9,7 +9,7 @@
 import llnl.util.tty as tty
 
 from spack.package import *
-from spack.pkg.builtin.camp import hip_repair_options
+from spack.pkg.builtin.camp import hip_repair_cache
 
 
 class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
@@ -188,7 +188,7 @@ def initconfig_hardware_entries(self):
         if "+rocm" in spec:
             entries.append(cmake_cache_option("ENABLE_HIP", True))
             entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
-            hip_repair_options(entries, spec)
+            hip_repair_cache(entries, spec)
             archs = self.spec.variants["amdgpu_target"].value
             if archs != "none":
                 arch_str = ",".join(archs)


Test patch: