Repository: spack/spack

Issue:
Installation issue: raja@develop camp-related example and tutorial build failures
### Steps to reproduce the issue

RADIUSS Cloud CI is encountering CAMP resource-related failures (building tutorial examples) during the build of `raja@develop%gcc@7.5.0 arch=linux-ubuntu18.04-x86_64`.  See https://cdash.spack.io/viewBuildError.php?buildid=162997 and https://cdash.spack.io/viewBuildError.php?buildid=162993.

```
...
camp::resources::v1::Host; Container = RAJA::TypedRangeSegment<long int>; LoopBody = main(int, char**)::<lambda(int)>; camp::concepts::enable_if_t<camp::resources::v1::EventProxy<Res>, camp::concepts::metalib::negate_t<RAJA::type_traits::is_indexset_policy<ExecutionPolicy> >, camp::concepts::metalib::negate_t<RAJA::type_traits::is_multi_policy<ExecutionPolicy> >, camp::type_traits::is_range<Container> > = camp::resources::v1::EventProxy<camp::resources::v1::Host>]'
/tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/include/RAJA/pattern/forall.hpp:530:51:   required from 'camp::resources::v1::EventProxy<Resource> RAJA::forall(Args&& ...) [with ExecutionPolicy = RAJA::policy::sequential::seq_exec; Args = {RAJA::TypedRangeSegment<long int, long int>, main(int, char**)::<lambda(int)>}; Res = camp::resources::v1::Host]'
/tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/examples/tut_add-vectors.cpp:95:4:   required from here
/tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/include/RAJA/policy/sequential/forall.hpp:68:21: error: no matching function for call to 'camp::resources::v1::EventProxy<camp::resources::v1::Host>::EventProxy(camp::resources::v1::Host&)'
   return resources::EventProxy<Resource>(res);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/include/RAJA/util/camp_aliases.hpp:32:0,
                 from /tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/include/RAJA/RAJA.hpp:33,
                 from /tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/examples/memoryManager.hpp:11,
                 from /tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/examples/tut_add-vectors.cpp:12:
/home/software/radiuss/[padded-to-512-chars]/linux-ubuntu18.04-x86_64/gcc-7.5.0/camp-0.1.0-kblcdklscvi7fnwcght5dhyjq5omzu5v/include/camp/resource.hpp:165:5: note: candidate: camp::resources::v1::EventProxy<Res>::EventProxy(Res*) [with Res = camp::resources::v1::Host]
     EventProxy(Res* r) :
     ^~~~~~~~~~
/home/software/radiuss/[padded-to-512-chars]/linux-ubuntu18.04-x86_64/gcc-7.5.0/camp-0.1.0-kblcdklscvi7fnwcght5dhyjq5omzu5v/include/camp/resource.hpp:165:5: note:   no known conversion for argument 1 from 'camp::resources::v1::Host' to 'camp::resources::v1::Host*'
/home/software/radiuss/[padded-to-512-chars]/linux-ubuntu18.04-x86_64/gcc-7.5.0/camp-0.1.0-kblcdklscvi7fnwcght5dhyjq5omzu5v/include/camp/resource.hpp:160:5: note: candidate: constexpr camp::resources::v1::EventProxy<Res>::EventProxy(camp::resources::v1::EventProxy<Res>&&) [with Res = camp::resources::v1::Host]
     EventProxy(EventProxy &&) = default;
     ^~~~~~~~~~
/home/software/radiuss/[padded-to-512-chars]/linux-ubuntu18.04-x86_64/gcc-7.5.0/camp-0.1.0-kblcdklscvi7fnwcght5dhyjq5omzu5v/include/camp/resource.hpp:160:5: note:   no known conversion for argument 1 from 'camp::resources::v1::Host' to 'camp::resources::v1::EventProxy<camp::resources::v1::Host>&&'
In file included from /tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/include/RAJA/policy/simd.hpp:23:0,
                 from /tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/include/RAJA/RAJA.hpp:62,
                 from /tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/examples/memoryManager.hpp:11,
                 from /tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/examples/tut_add-vectors.cpp:12:
/tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/include/RAJA/policy/simd/forall.hpp: In instantiation of 'camp::resources::v1::EventProxy<camp::resources::v1::Host> RAJA::policy::simd::forall_impl(camp::resources::v1::Host, const RAJA::policy::simd::simd_exec&, Iterable&&, Func&&) [with Iterable = RAJA::TypedRangeSegment<long int>; Func = main(int, char**)::<lambda(int)>]':
/tmp/root/spack-stage/spack-stage-raja-develop-ly4digmkydegejn63eh4za67wgbbzbye/spack-src/include/RAJA/pattern/forall.hpp:163:21:   required from 'camp::concepts::enable_if_t<camp::resources::v1::EventProxy<Res>, camp::concepts::metalib::negate_t<RAJA::type_traits::is_indexset_policy<ExecutionPolicy> >, camp::type_traits::is_range<Container> > RAJA::wrap::forall(Res, ExecutionPolicy&&, Container&&, LoopBody&&) [with Res = camp::resources::v1::Host; ExecutionPolicy = RAJA::policy::simd::simd_exec; Container = RAJA::TypedRangeSegment<long int>; LoopBody = main(int, char**)::<lambda(int)>; 
...
```

### Information on your system

Reporting results from Spack Cloud CI so see above snippets for a bit more information, which ran on the `uo-jupiter` runner. Hopefully the links will stay around a while.

### Additional information

@white238 @davidbeckingsale 

[spack-build-out.txt](https://github.com/spack/spack/files/6958280/spack-build-out.txt)
[raja.yaml.txt](https://github.com/spack/spack/files/6958281/raja.yaml.txt)

Note: I am selecting check boxes in "General Information" where the roughly equivalent information is (hopefully) provided by alternative file(s)/links.

### 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:
I think this is the same as the Umpire issue - need to build against `camp@master`.

Resolving patch:
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
@@ -47,6 +47,7 @@ class Raja(CMakePackage, CudaPackage, ROCmPackage):
         depends_on('camp amdgpu_target=%s' % val, when='amdgpu_target=%s' % val)
 
     depends_on('camp')
+    depends_on('camp@master', when='@develop')
     depends_on('camp+cuda', when='+cuda')
     for sm_ in CudaPackage.cuda_arch_values:
         depends_on('camp cuda_arch={0}'.format(sm_),


Test patch: