Repository: spack/spack

Issue:
dealii@9.3.2 +cuda build fails: sundials/kinsol.cc: 'SUNDenseLinearSolver' was not declared in this scope
### Steps to reproduce the issue

`dealii@9.3.2 +cuda` build fails using:
* `spack@develop` (c3b6b3036dede8c14533a1f20ade89a38c926789 from `Mon Mar 14 09:32:09 2022 -0700`)
* Ubuntu 20.04, X86_64
* GCC 9.3.0
* CUDA 11.4.2

Concrete spec: [dealii.spec.json.txt](https://github.com/spack/spack/files/8256361/dealii.spec.json.txt)

Concretization:
```
dealii@9.3.2%gcc@9.3.0+adol-c+arborx+arpack+assimp+cuda~doc+examples+ginkgo+gmsh+gsl+hdf5~int64~ipo+metis+mpi+muparser~nanoflann~netcdf+oce~optflags+p4est+petsc~python+scalapack+simplex+slepc+sundials+symengine+threads~trilinos build_type=DebugRelease cuda_arch=80 cxxstd=default arch=linux-ubuntu20.04-x86_64
    ^adol-c@2.7.2%gcc@9.3.0~advanced_branching+atrig_erf~boost+doc+examples~openmp~sparse+stdczero arch=linux-ubuntu20.04-x86_64
    ^arborx@1.1%gcc@9.3.0~cuda~ipo+mpi~openmp~rocm+serial~sycl~trilinos build_type=RelWithDebInfo arch=linux-ubuntu20.04-x86_64
        ^cmake@3.22.2%gcc@9.3.0~doc+ncurses+openssl+ownlibs~qt build_type=Release arch=linux-ubuntu20.04-x86_64
            ^ncurses@6.2%gcc@9.3.0~symlinks+termlib abi=none arch=linux-ubuntu20.04-x86_64
                ^pkgconf@1.8.0%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
            ^openssl@1.1.1m%gcc@9.3.0~docs certs=system arch=linux-ubuntu20.04-x86_64
                ^perl@5.34.0%gcc@9.3.0+cpanm+shared+threads arch=linux-ubuntu20.04-x86_64
                    ^berkeley-db@18.1.40%gcc@9.3.0+cxx~docs+stl patches=b231fcc arch=linux-ubuntu20.04-x86_64
                    ^bzip2@1.0.8%gcc@9.3.0~debug~pic+shared arch=linux-ubuntu20.04-x86_64
                        ^diffutils@3.8%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                            ^libiconv@1.16%gcc@9.3.0 libs=shared,static arch=linux-ubuntu20.04-x86_64
                    ^gdbm@1.19%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                        ^readline@8.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^zlib@1.2.11%gcc@9.3.0+optimize+pic+shared arch=linux-ubuntu20.04-x86_64
        ^kokkos@3.5.00%gcc@9.3.0~aggressive_vectorization~compiler_warnings~cuda~cuda_constexpr~cuda_lambda~cuda_ldg_intrinsic~cuda_relocatable_device_code~cuda_uvm~debug~debug_bounds_check~debug_dualview_modify_check~deprecated_code~examples~explicit_instantiation~hpx~hpx_async_dispatch~hwloc~ipo~memkind~numactl~openmp~pic+profiling~profiling_load_print~pthread~qthread~rocm+serial+shared~sycl~tests~tuning~wrapper build_type=RelWithDebInfo std=14 arch=linux-ubuntu20.04-x86_64
        ^mpich@3.4.2%gcc@9.3.0~argobots+fortran+hwloc+hydra+libxml2+pci+romio~slurm~two_level_namespace~verbs~wrapperrpath device=ch4 netmod=ofi pmi=pmi arch=linux-ubuntu20.04-x86_64
            ^findutils@4.8.0%gcc@9.3.0 patches=440b954 arch=linux-ubuntu20.04-x86_64
            ^hwloc@2.7.0%gcc@9.3.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml~opencl+pci~rocm+shared arch=linux-ubuntu20.04-x86_64
                ^libpciaccess@0.16%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^libtool@2.4.6%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                        ^m4@1.4.19%gcc@9.3.0+sigsegv patches=9dc5fbd,bfdffa7 arch=linux-ubuntu20.04-x86_64
                            ^libsigsegv@2.13%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^util-macros@1.19.3%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^libxml2@2.9.12%gcc@9.3.0~python arch=linux-ubuntu20.04-x86_64
                    ^xz@5.2.5%gcc@9.3.0+pic libs=shared,static arch=linux-ubuntu20.04-x86_64
            ^libfabric@1.14.0%gcc@9.3.0~debug~kdreg fabrics=rxm,sockets,tcp,udp arch=linux-ubuntu20.04-x86_64
    ^arpack-ng@3.8.0%gcc@9.3.0+mpi+shared arch=linux-ubuntu20.04-x86_64
        ^openblas@0.3.20%gcc@9.3.0~bignuma~consistent_fpcsr~ilp64+locking+pic+shared symbol_suffix=none threads=openmp arch=linux-ubuntu20.04-x86_64
    ^assimp@5.2.2%gcc@9.3.0~ipo+shared build_type=RelWithDebInfo patches=a227714 arch=linux-ubuntu20.04-x86_64
        ^boost@1.76.0%gcc@9.3.0+atomic+chrono~clanglibcpp~container~context~coroutine+date_time~debug+exception~fiber+filesystem+graph~icu+iostreams+locale+log+math+mpi+multithreaded~numpy~pic+program_options~python+random+regex+serialization+shared+signals~singlethreaded+system~taggedlayout+test+thread+timer~versionedlayout+wave cxxstd=98 visibility=hidden arch=linux-ubuntu20.04-x86_64
    ^cuda@11.4.2%gcc@9.3.0~allow-unsupported-compilers~dev arch=linux-ubuntu20.04-x86_64
    ^ginkgo@1.4.0%gcc@9.3.0~cuda~develtools~full_optimizations~hwloc~ipo~oneapi+openmp~rocm+shared build_type=Release patches=43e571a arch=linux-ubuntu20.04-x86_64
    ^gmsh@4.8.4%gcc@9.3.0+alglib~cairo+cgns+compression~eigen~external+fltk+gmp~hdf5~ipo+med+metis+mmg+mpi+netgen+oce~opencascade~openmp~petsc~privateapi+shared~slepc+tetgen+voropp build_type=RelWithDebInfo arch=linux-ubuntu20.04-x86_64
        ^cgns@4.2.0%gcc@9.3.0~base_scope~fortran+hdf5~int64~ipo~legacy~mem_debug+mpi+scoping+shared~static~testing build_type=RelWithDebInfo arch=linux-ubuntu20.04-x86_64
            ^hdf5@1.10.7%gcc@9.3.0~cxx+fortran+hl~ipo~java+mpi+shared~szip~threadsafe+tools api=default build_type=RelWithDebInfo patches=2a1e311 arch=linux-ubuntu20.04-x86_64
                ^numactl@2.0.14%gcc@9.3.0 patches=4e1d78c,62fc8a8,ff37630 arch=linux-ubuntu20.04-x86_64
                    ^autoconf@2.69%gcc@9.3.0 patches=35c4492,7793209,a49dd5b arch=linux-ubuntu20.04-x86_64
                    ^automake@1.16.5%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
        ^fltk@1.3.7%gcc@9.3.0+gl+shared~xft arch=linux-ubuntu20.04-x86_64
            ^libx11@1.7.0%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^inputproto@2.3.2%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^kbproto@1.0.7%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^libxcb@1.14%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^libpthread-stubs@0.4%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^libxau@1.0.8%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                        ^xproto@7.0.31%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^libxdmcp@1.1.2%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                        ^libbsd@0.11.5%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                            ^libmd@1.0.4%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^xcb-proto@1.14.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^xextproto@7.3.0%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^xtrans@1.3.5%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
            ^mesa@21.3.1%gcc@9.3.0+glx~llvm+opengl~opengles+osmesa~strip buildtype=debugoptimized default_library=shared patches=ada85be arch=linux-ubuntu20.04-x86_64
                ^bison@3.8.2%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^expat@2.4.6%gcc@9.3.0+libbsd arch=linux-ubuntu20.04-x86_64
                ^flex@2.6.4%gcc@9.3.0+lex~nls patches=09c22e5 arch=linux-ubuntu20.04-x86_64
                    ^gettext@0.21%gcc@9.3.0+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-ubuntu20.04-x86_64
                        ^tar@1.34%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^help2man@1.47.16%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^glproto@1.4.17%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^libunwind@1.5.0%gcc@9.3.0~block_signals~conservative_checks~cxx_exceptions~debug~debug_frame+docs+pic+tests+weak_backtrace+xz~zlib components=none libs=shared,static arch=linux-ubuntu20.04-x86_64
                ^libxext@1.3.3%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^libxt@1.1.5%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^libice@1.0.9%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^libsm@1.2.3%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                        ^util-linux-uuid@2.37.4%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^meson@0.61.2%gcc@9.3.0 patches=aa6c50d arch=linux-ubuntu20.04-x86_64
                    ^ninja@1.10.2%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                        ^python@3.8.12%gcc@9.3.0+bz2+ctypes+dbm~debug+ensurepip+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib patches=0d98e93,4c24573,f2fd060 arch=linux-ubuntu20.04-x86_64
                            ^libffi@3.4.2%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                            ^sqlite@3.37.2%gcc@9.3.0+column_metadata+dynamic_extensions+fts~functions+rtree arch=linux-ubuntu20.04-x86_64
                    ^py-pip@21.3.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^py-setuptools@59.4.0%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                        ^py-wheel@0.37.0%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^py-mako@1.1.6%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^py-markupsafe@2.0.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                ^xrandr@1.5.0%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                    ^libxrandr@1.5.0%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                        ^libxrender@0.9.10%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                            ^renderproto@0.11.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
                        ^randrproto@1.5.0%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
        ^freetype@2.11.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
            ^libpng@1.6.37%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
        ^gmp@6.2.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
        ^med@4.0.0%gcc@9.3.0+api23~fortran~ipo+mpi~shared build_type=RelWithDebInfo patches=ba35197 arch=linux-ubuntu20.04-x86_64
        ^mesa-glu@9.0.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
        ^mmg@5.5.2%gcc@9.3.0~doc~ipo+scotch+shared build_type=RelWithDebInfo arch=linux-ubuntu20.04-x86_64
            ^scotch@7.0.1%gcc@9.3.0+compression~esmumps~int64~ipo~metis+mpi+shared build_type=RelWithDebInfo arch=linux-ubuntu20.04-x86_64
        ^oce@0.18.3%gcc@9.3.0~X11+tbb arch=linux-ubuntu20.04-x86_64
            ^intel-tbb@2020.3%gcc@9.3.0~ipo+shared+tm build_type=RelWithDebInfo cxxstd=default patches=62ba015,ce1fb16,d62cb66 arch=linux-ubuntu20.04-x86_64
    ^gsl@2.7%gcc@9.3.0~external-cblas arch=linux-ubuntu20.04-x86_64
    ^metis@5.1.0%gcc@9.3.0~gdb~int64~real64+shared build_type=Release patches=4991da9,b1225da arch=linux-ubuntu20.04-x86_64
    ^muparser@2.2.6.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
    ^netlib-scalapack@2.1.0%gcc@9.3.0~ipo~pic+shared build_type=Release patches=1c9ce5f,f2baedd arch=linux-ubuntu20.04-x86_64
    ^p4est@2.8%gcc@9.3.0+mpi~openmp arch=linux-ubuntu20.04-x86_64
    ^petsc@3.16.4%gcc@9.3.0~X~batch~cgns~complex~cuda~debug+double~exodusii~fftw~giflib+hdf5~hpddm~hwloc+hypre~int64~jpeg~knl~kokkos~libpng~libyaml~memkind+metis~mkl-pardiso~mmg~moab~mpfr+mpi~mumps~openmp~p4est~parmmg~ptscotch~random123~rocm~saws~scalapack+shared~strumpack~suite-sparse+superlu-dist~tetgen~trilinos~valgrind clanguage=C arch=linux-ubuntu20.04-x86_64
        ^hypre@2.24.0%gcc@9.3.0~complex~cuda~debug+fortran~gptune~int64~internal-superlu~mixedint+mpi~openmp~rocm+shared~superlu-dist~unified-memory arch=linux-ubuntu20.04-x86_64
        ^parmetis@4.0.3%gcc@9.3.0~gdb~int64~ipo+shared build_type=RelWithDebInfo patches=4f89253,50ed208,704b84f arch=linux-ubuntu20.04-x86_64
        ^superlu-dist@7.2.0%gcc@9.3.0~cuda~int64~ipo~openmp~rocm+shared build_type=RelWithDebInfo patches=8da9e21 arch=linux-ubuntu20.04-x86_64
    ^slepc@3.16.2%gcc@9.3.0+arpack~blopex~cuda~rocm arch=linux-ubuntu20.04-x86_64
    ^suite-sparse@5.10.1%gcc@9.3.0~cuda~graphblas~openmp+pic~tbb arch=linux-ubuntu20.04-x86_64
        ^mpfr@4.1.0%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
            ^autoconf-archive@2019.01.06%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
            ^texinfo@6.5%gcc@9.3.0 patches=12f6edb,1732115 arch=linux-ubuntu20.04-x86_64
    ^sundials@6.1.1%gcc@9.3.0+ARKODE+CVODE+CVODES+IDA+IDAS+KINSOL~caliper~cuda+examples+examples-install~f2003~fcmix+generic-math~hypre~int64~ipo~klu~lapack~monitoring+mpi~openmp~petsc~profiling~pthread~raja~rocm+shared+static~superlu-dist~superlu-mt~sycl~trilinos build_type=RelWithDebInfo cstd=99 cxxstd=14 precision=double arch=linux-ubuntu20.04-x86_64
    ^symengine@0.8.1%gcc@9.3.0~boostmp~flint~ipo~llvm+mpc+mpfr~openmp~piranha+shared+thread_safe build_type=Release arch=linux-ubuntu20.04-x86_64
        ^mpc@1.2.1%gcc@9.3.0 arch=linux-ubuntu20.04-x86_64
```

Error is quickly reproduced using Docker container image and cached dependency binaries:
* Docker image = `ecpe4s/ubuntu20.04-runner-x86_64:2022-02-01`
* Cached dependencies @ `https://cache.e4s.io`

```
root@d2bc3d9aa585:/# git clone https://github.com/spack/spack
root@d2bc3d9aa585:/# (cd. spack && git checkout c3b6b3036)

root@d2bc3d9aa585:/# . spack/share/spack/setup-env.sh
root@d2bc3d9aa585:/# spack mirror add E4S https://cache.e4s.io
root@d2bc3d9aa585:/# spack buildcache keys -it

root@d2bc3d9aa585:/# spack install --cache-only --include-build-deps --only dependencies -f ./dealii.spec.json

root@d2bc3d9aa585:/# spack install --no-cache --only package -f ./dealii.spec.json
...
==> Installing dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f
==> No binary for dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f found: installing from source
==> Using cached archive: /spack/var/spack/cache/_source-cache/archive/53/5341d76bfd75d3402fc6907a875513efb5fe8a8b99af688d94443c492d5713e8.tar.gz
==> No patches needed for dealii
==> dealii: Executing phase: 'cmake'
==> dealii: Executing phase: 'build'
...
  >> 2627    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc:559:38: error: 'SUNDenseLinearSolver' was not declar
             ed in this scope; did you mean 'SUNLinearSolver'?
     2628      559 |         LS     = SUNDenseLinearSolver(u_scale, J);
     2629          |                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
     2630          |                  SUNLinearSolver
     2631    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc: In instantiation of 'unsigned int dealii::SUNDIALS:
             :KINSOL<VectorType>::solve(VectorType&) [with VectorType = dealii::LinearAlgebra::distributed::BlockVector<double>]':
     2632    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc:618:18:   required from here
  >> 2633    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc:559:38: error: 'SUNDenseLinearSolver' was not declar
             ed in this scope; did you mean 'SUNLinearSolver'?
     2634      559 |         LS     = SUNDenseLinearSolver(u_scale, J);
     2635          |                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
     2636          |                  SUNLinearSolver
     2637    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc: In instantiation of 'unsigned int dealii::SUNDIALS:
             :KINSOL<VectorType>::solve(VectorType&) [with VectorType = dealii::PETScWrappers::MPI::Vector]':
     2638    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc:629:18:   required from here
  >> 2639    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc:559:38: error: 'SUNDenseLinearSolver' was not declar
             ed in this scope; did you mean 'SUNLinearSolver'?
     2640      559 |         LS     = SUNDenseLinearSolver(u_scale, J);
     2641          |                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
     2642          |                  SUNLinearSolver
     2643    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc: In instantiation of 'unsigned int dealii::SUNDIALS:
             :KINSOL<VectorType>::solve(VectorType&) [with VectorType = dealii::PETScWrappers::MPI::BlockVector]':
     2644    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc:630:18:   required from here
  >> 2645    /tmp/root/spack-stage/spack-stage-dealii-9.3.2-6c2y46xprffifuyafmvtq56qez4f4z7f/spack-src/source/sundials/kinsol.cc:559:38: error: 'SUNDenseLinearSolver' was not declar
             ed in this scope; did you mean 'SUNLinearSolver'?
     2646      559 |         LS     = SUNDenseLinearSolver(u_scale, J);
     2647          |                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
     2648          |                  SUNLinearSolver
```

### Error message

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


### Information on your system

* **Spack:** 0.17.1-1549-c3b6b3036d
* **Python:** 3.8.10
* **Platform:** linux-ubuntu20.04-zen2
* **Concretizer:** clingo

### Additional information

[spack-build-env.txt](https://github.com/spack/spack/files/8256396/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/8256404/spack-build-out.txt)

@jppelteret 
@luca-heltai 
@wspear 

### 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/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -26,6 +26,7 @@ class Dealii(CMakePackage, CudaPackage):
     generator = 'Ninja'
 
     version('master', branch='master')
+    version('9.3.3', sha256='5dfb59174b341589e92b434398a1b7cc11ad053ce2315cf673f5efc5ba271a29')
     version('9.3.2', sha256='5341d76bfd75d3402fc6907a875513efb5fe8a8b99af688d94443c492d5713e8')
     version('9.3.1', sha256='a62f4676ab2dc029892251d141427fb75cbb83cddd606019f615d0dde9c61ab8')
     version('9.3.0', sha256='aef8c7a87510ce827dfae3bdd4ed7bff82004dc09f96fa7a65b2554f2839b931')
@@ -204,7 +205,8 @@ class Dealii(CMakePackage, CudaPackage):
     depends_on('slepc@:3.6.3',     when='@:8.4.1+slepc+petsc+mpi')
     depends_on('slepc~arpack',     when='+slepc+petsc+mpi+int64')
     depends_on('sundials@:3~pthread', when='@9.0:9.2+sundials')
-    depends_on('sundials@5:',      when='@9.3:+sundials')
+    depends_on('sundials@5:5.8',      when='@9.3:9.3.3+sundials')
+    depends_on('sundials@5:',      when='@9.3.4:+sundials')
     # depends_on('taskflow',         when='@9.3:+taskflow')
     depends_on('trilinos gotype=int', when='+trilinos@12.18.1:')
     # TODO: next line fixes concretization with trilinos and adol-c


Test patch: