We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installation issue: yaksa@0.2 +cuda %gcc@12.3.0
### Steps to reproduce the issue

I ran into this when trying to build `mpich %gcc@12.3.0 +cuda netmod=ucx pmi=pmix ^cuda@11.8 +allow-unsupported-compilers`

```console
$ spack spec -l mpich%gcc@12.3.0+cuda netmod=ucx pmi=pmix ^cuda@11.8
Input spec
--------------------------------
 -   mpich%gcc@12.3.0+cuda netmod=ucx pmi=pmix
 -       ^cuda@11.8
 
 Concretized
--------------------------------
 -   vl25zhp  mpich@4.1.2%gcc@12.3.0~argobots+cuda+fortran~hcoll+hwloc~hydra+libxml2+pci~rocm+romio~slurm~vci~verbs+wrapperrpath build_system=autotools cuda_arch=80 datatype-engine=auto device=ch4 netmod=ucx pmi=pmix arch=linux-rhel8-zen2
[e]  tatyw2o      ^cuda@11.8%gcc@12.3.0+allow-unsupported-compilers~dev build_system=generic arch=linux-rhel8-zen2
[+]  oaezgck      ^findutils@4.9.0%gcc@12.3.0 build_system=autotools patches=440b954 arch=linux-rhel8-zen2
[+]  wda76ac      ^hwloc@2.9.1%gcc@12.3.0~cairo+cuda~gl~libudev+libxml2~netloc~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools cuda_arch=80 libs=shared,static arch=linux-rhel8-zen2
[+]  v3xl3ra          ^ncurses@6.4%gcc@12.3.0~symlinks+termlib abi=none build_system=autotools arch=linux-rhel8-zen2
[e]  jxaxqp2          ^pkgconf@1.4.2%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2
[+]  a25ibkd      ^libpciaccess@0.17%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2
[e]  ljdxawj          ^libtool@2.4.6%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2
[-]  6gqawar          ^util-macros@1.19.3%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2
[+]  6tqy7tj      ^libxml2@2.10.3%gcc@12.3.0+pic~python+shared build_system=autotools arch=linux-rhel8-zen2
[+]  gmdjnou          ^libiconv@1.17%gcc@12.3.0 build_system=autotools libs=shared,static arch=linux-rhel8-zen2
[+]  wv6bhnf          ^xz@5.4.1%gcc@12.3.0+pic build_system=autotools libs=shared,static arch=linux-rhel8-zen2
[+]  gl4jfjp          ^zlib-ng@2.1.3%gcc@12.3.0+compat+opt build_system=autotools patches=299b958,ae9077a,b692621 arch=linux-rhel8-zen2
[e]  jxaxqp2      ^pkgconf@1.4.2%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2
[+]  iiz3ymd      ^pmix@5.0.1%gcc@12.3.0~docs+pmi_backwards_compatibility~python~restful build_system=autotools arch=linux-rhel8-zen2
[+]  zpd4eva          ^libevent@2.1.12%gcc@12.3.0+openssl build_system=autotools arch=linux-rhel8-zen2
[+]  vfrxdbw              ^openssl@3.1.3%gcc@12.3.0~docs+shared build_system=generic certs=mozilla arch=linux-rhel8-zen2
[-]  f7zqyjr                  ^ca-certificates-mozilla@2023-05-30%gcc@12.3.0 build_system=generic arch=linux-rhel8-zen2
[e]  mbywbad                  ^perl@5.26.3%gcc@12.3.0+cpanm+opcode+open+shared+threads build_system=generic patches=8cf4302 arch=linux-rhel8-zen2
[+]  giw5sed      ^ucx@1.14.1%gcc@12.3.0~assertions~backtrace_detail~cma~cuda~dc~debug~dm+examples~gdrcopy~gtest~ib_hw_tm~java~knem~logging~mlx5_dv+numa+openmp+optimizations~parameter_checking+pic~rc~rdmacm~rocm+thread_multiple~ucg~ud~verbs~vfs~xpmem build_system=autotools libs=shared,static opt=3 simd=auto arch=linux-rhel8-zen2
[+]  2hrbodu          ^numactl@2.0.14%gcc@12.3.0 build_system=autotools patches=4e1d78c,62fc8a8,ff37630 arch=linux-rhel8-zen2
[e]  34ciftm              ^autoconf@2.69%gcc@12.3.0 build_system=autotools patches=7793209 arch=linux-rhel8-zen2
[e]  4awjffi              ^automake@1.16.1%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2
[e]  v6g426c              ^m4@1.4.18%gcc@12.3.0+sigsegv build_system=autotools patches=3877ab5,fc9b616 arch=linux-rhel8-zen2
 -   3gp6itg      ^yaksa@0.2%gcc@12.3.0+cuda~rocm build_system=autotools cuda_arch=80 arch=linux-rhel8-zen2
[e]  34ciftm          ^autoconf@2.69%gcc@12.3.0 build_system=autotools patches=7793209 arch=linux-rhel8-zen2
[e]  4awjffi          ^automake@1.16.1%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2
[e]  ljdxawj          ^libtool@2.4.6%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2
[e]  v6g426c          ^m4@1.4.18%gcc@12.3.0+sigsegv build_system=autotools patches=3877ab5,fc9b616 arch=linux-rhel8-zen2
[e]  vij5hij          ^python@3.11.4%gcc@12.3.0+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=13fa8bf,b0615b2,ebdca64,f2fd060 arch=linux-rhel8-zen2
```



### Error message

<details><summary>Error message</summary>

<pre>
==> Error: ProcessError: Command exited with status 1:
    '/scratch/wp11/spack/stage/spack-stage-yaksa-0.2-3gp6itg5vlljusyvsifmuuceq7q77vp5/spack-src/configure' '--prefix=/projects/deploy/install/linux-rhel8-zen2/gcc-12.3.0/yaksa-0.2-3gp6itg5vlljusyvsifmuuceq7q77vp5' '--with-cuda=/usr/local/cuda-11.8' '--with-cuda-sm=80' '--without-hip'

7 errors found in build log:
     28     libtoolize: copying file 'm4/ltsugar.m4'
     29     libtoolize: copying file 'm4/ltversion.m4'
     30     libtoolize: copying file 'm4/lt~obsolete.m4'
     31     autoreconf: running: /projects/pkgs/autotools-ac-2.69-am-1.15.1-lt-2.4.6/bin/autoconf --force
     32     autoreconf: running: /projects/pkgs/autotools-ac-2.69-am-1.15.1-lt-2.4.6/bin/autoheader --force
     33     autoreconf: running: automake --add-missing --copy --force-missing
  >> 34     configure.ac:81: installing 'm4/ar-lib'
  >> 35     configure.ac:78: installing 'm4/compile'
  >> 36     configure.ac:83: installing 'm4/config.guess'
  >> 37     configure.ac:83: installing 'm4/config.sub'
  >> 38     configure.ac:74: installing 'm4/install-sh'
  >> 39     configure.ac:74: installing 'm4/missing'
     40     Makefile.am: installing 'm4/depcomp'
     41     autoreconf: Leaving directory `.'
     42     === done ===
     43     
     44     Generating a helper maint/Version... done
     45     ==> yaksa: Executing phase: 'configure'

     ...

     198    checking alignment of long double... 16
     199    checking cuda_runtime_api.h usability... yes
     200    checking cuda_runtime_api.h presence... yes
     201    checking for cuda_runtime_api.h... yes
     202    checking for cudaStreamSynchronize in -lcudart... yes
     203    checking whether nvcc works... no
  >> 204    configure: error: CUDA was requested but it is not functional
</pre></details>


### Information on your system

* **Spack:** 0.21.0.dev0 (b6f08f1d4ef3b0ca56430c1a465d660828b45ed2)
* **Python:** 3.6.8
* **Platform:** linux-rhel8-zen2
* **Concretizer:** clingo

### Additional information

- [spack-build-out.txt](https://github.com/spack/spack/files/12778111/spack-build-out.txt)
- [spack-build-env.txt](https://github.com/spack/spack/files/12778112/spack-build-env.txt)

I can confirm that the `nvcc` from CUDA 11.8 in the system works just fine by compiling and running a CUDA dot product test code.

```
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
```

Summoning `yaksa` maintainers @hzhou @raffenet @yfguo

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

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `var/spack/repos/builtin/packages/yaksa/package.py`
Content:
```
1 # Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
2 # Spack Project Developers. See the top-level COPYRIGHT file for details.
3 #
4 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
5 
6 from spack.package import *
7 
8 
9 class Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage):
10     """Yaksa is a high-performance datatype engine for expressing,
11     managing and manipulating data present in noncontiguous memory
12     regions. It provides portable abstractions for structured
13     noncontiguous data layouts that are much more comprehensive compared
14     with traditional I/O vectors.
15 
16     Yaksa imitates parts of the MPI Datatype system, but adds additional
17     functionality that would allow it to be used independent of MPI. It
18     provides routines for packing/unpacking, creating I/O vectors (array
19     of contiguous segments) and flattening/unflattening datatypes into
20     process-portable formats.
21 
22     Yaksa's backend includes support for CPUs as well as different
23     GPUs."""
24 
25     homepage = "https://www.yaksa.org"
26     url = "https://github.com/pmodels/yaksa/archive/refs/tags/v0.2.tar.gz"
27     maintainers("raffenet", "yfguo", "hzhou")
28 
29     version("0.2", sha256="9401cb6153dc8c34ddb9781bbabd418fd26b0a27b5da3294ecc21af7be9c86f2")
30 
31     depends_on("autoconf", type="build")
32     depends_on("automake", type="build")
33     depends_on("libtool", type="build")
34     depends_on("m4", type="build")
35     depends_on("python@3:", type="build")
36 
37     def autoreconf(self, spec, prefix):
38         sh = which("sh")
39         sh("autogen.sh")
40 
41     def configure_args(self):
42         spec = self.spec
43         config_args = []
44 
45         config_args += self.with_or_without("cuda", activation_value="prefix")
46         if "+cuda" in spec:
47             cuda_archs = spec.variants["cuda_arch"].value
48             if "none" not in cuda_archs:
49                 config_args.append("--with-cuda-sm={0}".format(",".join(cuda_archs)))
50 
51         if "+rocm" in spec:
52             config_args.append("--with-hip={0}".format(spec["hip"].prefix))
53             rocm_archs = spec.variants["amdgpu_target"].value
54             if "none" not in rocm_archs:
55                 config_args.append("--with-hip-sm={0}".format(",".join(rocm_archs)))
56         else:
57             config_args.append("--without-hip")
58 
59         return config_args
60
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/var/spack/repos/builtin/packages/yaksa/package.py b/var/spack/repos/builtin/packages/yaksa/package.py
--- a/var/spack/repos/builtin/packages/yaksa/package.py
+++ b/var/spack/repos/builtin/packages/yaksa/package.py
@@ -47,6 +47,8 @@
             cuda_archs = spec.variants["cuda_arch"].value
             if "none" not in cuda_archs:
                 config_args.append("--with-cuda-sm={0}".format(",".join(cuda_archs)))
+            if "^cuda+allow-unsupported-compilers" in self.spec:
+                config_args.append("NVCC_FLAGS=-allow-unsupported-compiler")
 
         if "+rocm" in spec:
             config_args.append("--with-hip={0}".format(spec["hip"].prefix))

{"golden_diff": "diff --git a/var/spack/repos/builtin/packages/yaksa/package.py b/var/spack/repos/builtin/packages/yaksa/package.py\n--- a/var/spack/repos/builtin/packages/yaksa/package.py\n+++ b/var/spack/repos/builtin/packages/yaksa/package.py\n@@ -47,6 +47,8 @@\n             cuda_archs = spec.variants[\"cuda_arch\"].value\n             if \"none\" not in cuda_archs:\n                 config_args.append(\"--with-cuda-sm={0}\".format(\",\".join(cuda_archs)))\n+            if \"^cuda+allow-unsupported-compilers\" in self.spec:\n+                config_args.append(\"NVCC_FLAGS=-allow-unsupported-compiler\")\n \n         if \"+rocm\" in spec:\n             config_args.append(\"--with-hip={0}\".format(spec[\"hip\"].prefix))\n", "issue": "Installation issue: yaksa@0.2 +cuda %gcc@12.3.0\n### Steps to reproduce the issue\n\nI ran into this when trying to build `mpich %gcc@12.3.0 +cuda netmod=ucx pmi=pmix ^cuda@11.8 +allow-unsupported-compilers`\r\n\r\n```console\r\n$ spack spec -l mpich%gcc@12.3.0+cuda netmod=ucx pmi=pmix ^cuda@11.8\r\nInput spec\r\n--------------------------------\r\n -   mpich%gcc@12.3.0+cuda netmod=ucx pmi=pmix\r\n -       ^cuda@11.8\r\n \r\n Concretized\r\n--------------------------------\r\n -   vl25zhp  mpich@4.1.2%gcc@12.3.0~argobots+cuda+fortran~hcoll+hwloc~hydra+libxml2+pci~rocm+romio~slurm~vci~verbs+wrapperrpath build_system=autotools cuda_arch=80 datatype-engine=auto device=ch4 netmod=ucx pmi=pmix arch=linux-rhel8-zen2\r\n[e]  tatyw2o      ^cuda@11.8%gcc@12.3.0+allow-unsupported-compilers~dev build_system=generic arch=linux-rhel8-zen2\r\n[+]  oaezgck      ^findutils@4.9.0%gcc@12.3.0 build_system=autotools patches=440b954 arch=linux-rhel8-zen2\r\n[+]  wda76ac      ^hwloc@2.9.1%gcc@12.3.0~cairo+cuda~gl~libudev+libxml2~netloc~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools cuda_arch=80 libs=shared,static arch=linux-rhel8-zen2\r\n[+]  v3xl3ra          ^ncurses@6.4%gcc@12.3.0~symlinks+termlib abi=none build_system=autotools arch=linux-rhel8-zen2\r\n[e]  jxaxqp2          ^pkgconf@1.4.2%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2\r\n[+]  a25ibkd      ^libpciaccess@0.17%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2\r\n[e]  ljdxawj          ^libtool@2.4.6%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2\r\n[-]  6gqawar          ^util-macros@1.19.3%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2\r\n[+]  6tqy7tj      ^libxml2@2.10.3%gcc@12.3.0+pic~python+shared build_system=autotools arch=linux-rhel8-zen2\r\n[+]  gmdjnou          ^libiconv@1.17%gcc@12.3.0 build_system=autotools libs=shared,static arch=linux-rhel8-zen2\r\n[+]  wv6bhnf          ^xz@5.4.1%gcc@12.3.0+pic build_system=autotools libs=shared,static arch=linux-rhel8-zen2\r\n[+]  gl4jfjp          ^zlib-ng@2.1.3%gcc@12.3.0+compat+opt build_system=autotools patches=299b958,ae9077a,b692621 arch=linux-rhel8-zen2\r\n[e]  jxaxqp2      ^pkgconf@1.4.2%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2\r\n[+]  iiz3ymd      ^pmix@5.0.1%gcc@12.3.0~docs+pmi_backwards_compatibility~python~restful build_system=autotools arch=linux-rhel8-zen2\r\n[+]  zpd4eva          ^libevent@2.1.12%gcc@12.3.0+openssl build_system=autotools arch=linux-rhel8-zen2\r\n[+]  vfrxdbw              ^openssl@3.1.3%gcc@12.3.0~docs+shared build_system=generic certs=mozilla arch=linux-rhel8-zen2\r\n[-]  f7zqyjr                  ^ca-certificates-mozilla@2023-05-30%gcc@12.3.0 build_system=generic arch=linux-rhel8-zen2\r\n[e]  mbywbad                  ^perl@5.26.3%gcc@12.3.0+cpanm+opcode+open+shared+threads build_system=generic patches=8cf4302 arch=linux-rhel8-zen2\r\n[+]  giw5sed      ^ucx@1.14.1%gcc@12.3.0~assertions~backtrace_detail~cma~cuda~dc~debug~dm+examples~gdrcopy~gtest~ib_hw_tm~java~knem~logging~mlx5_dv+numa+openmp+optimizations~parameter_checking+pic~rc~rdmacm~rocm+thread_multiple~ucg~ud~verbs~vfs~xpmem build_system=autotools libs=shared,static opt=3 simd=auto arch=linux-rhel8-zen2\r\n[+]  2hrbodu          ^numactl@2.0.14%gcc@12.3.0 build_system=autotools patches=4e1d78c,62fc8a8,ff37630 arch=linux-rhel8-zen2\r\n[e]  34ciftm              ^autoconf@2.69%gcc@12.3.0 build_system=autotools patches=7793209 arch=linux-rhel8-zen2\r\n[e]  4awjffi              ^automake@1.16.1%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2\r\n[e]  v6g426c              ^m4@1.4.18%gcc@12.3.0+sigsegv build_system=autotools patches=3877ab5,fc9b616 arch=linux-rhel8-zen2\r\n -   3gp6itg      ^yaksa@0.2%gcc@12.3.0+cuda~rocm build_system=autotools cuda_arch=80 arch=linux-rhel8-zen2\r\n[e]  34ciftm          ^autoconf@2.69%gcc@12.3.0 build_system=autotools patches=7793209 arch=linux-rhel8-zen2\r\n[e]  4awjffi          ^automake@1.16.1%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2\r\n[e]  ljdxawj          ^libtool@2.4.6%gcc@12.3.0 build_system=autotools arch=linux-rhel8-zen2\r\n[e]  v6g426c          ^m4@1.4.18%gcc@12.3.0+sigsegv build_system=autotools patches=3877ab5,fc9b616 arch=linux-rhel8-zen2\r\n[e]  vij5hij          ^python@3.11.4%gcc@12.3.0+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=13fa8bf,b0615b2,ebdca64,f2fd060 arch=linux-rhel8-zen2\r\n```\r\n\r\n\n\n### Error message\n\n<details><summary>Error message</summary>\r\n\r\n<pre>\r\n==> Error: ProcessError: Command exited with status 1:\r\n    '/scratch/wp11/spack/stage/spack-stage-yaksa-0.2-3gp6itg5vlljusyvsifmuuceq7q77vp5/spack-src/configure' '--prefix=/projects/deploy/install/linux-rhel8-zen2/gcc-12.3.0/yaksa-0.2-3gp6itg5vlljusyvsifmuuceq7q77vp5' '--with-cuda=/usr/local/cuda-11.8' '--with-cuda-sm=80' '--without-hip'\r\n\r\n7 errors found in build log:\r\n     28     libtoolize: copying file 'm4/ltsugar.m4'\r\n     29     libtoolize: copying file 'm4/ltversion.m4'\r\n     30     libtoolize: copying file 'm4/lt~obsolete.m4'\r\n     31     autoreconf: running: /projects/pkgs/autotools-ac-2.69-am-1.15.1-lt-2.4.6/bin/autoconf --force\r\n     32     autoreconf: running: /projects/pkgs/autotools-ac-2.69-am-1.15.1-lt-2.4.6/bin/autoheader --force\r\n     33     autoreconf: running: automake --add-missing --copy --force-missing\r\n  >> 34     configure.ac:81: installing 'm4/ar-lib'\r\n  >> 35     configure.ac:78: installing 'm4/compile'\r\n  >> 36     configure.ac:83: installing 'm4/config.guess'\r\n  >> 37     configure.ac:83: installing 'm4/config.sub'\r\n  >> 38     configure.ac:74: installing 'm4/install-sh'\r\n  >> 39     configure.ac:74: installing 'm4/missing'\r\n     40     Makefile.am: installing 'm4/depcomp'\r\n     41     autoreconf: Leaving directory `.'\r\n     42     === done ===\r\n     43     \r\n     44     Generating a helper maint/Version... done\r\n     45     ==> yaksa: Executing phase: 'configure'\r\n\r\n     ...\r\n\r\n     198    checking alignment of long double... 16\r\n     199    checking cuda_runtime_api.h usability... yes\r\n     200    checking cuda_runtime_api.h presence... yes\r\n     201    checking for cuda_runtime_api.h... yes\r\n     202    checking for cudaStreamSynchronize in -lcudart... yes\r\n     203    checking whether nvcc works... no\r\n  >> 204    configure: error: CUDA was requested but it is not functional\r\n</pre></details>\r\n\n\n### Information on your system\n\n* **Spack:** 0.21.0.dev0 (b6f08f1d4ef3b0ca56430c1a465d660828b45ed2)\r\n* **Python:** 3.6.8\r\n* **Platform:** linux-rhel8-zen2\r\n* **Concretizer:** clingo\n\n### Additional information\n\n- [spack-build-out.txt](https://github.com/spack/spack/files/12778111/spack-build-out.txt)\r\n- [spack-build-env.txt](https://github.com/spack/spack/files/12778112/spack-build-env.txt)\r\n\r\nI can confirm that the `nvcc` from CUDA 11.8 in the system works just fine by compiling and running a CUDA dot product test code.\r\n\r\n```\r\n$ nvcc --version\r\nnvcc: NVIDIA (R) Cuda compiler driver\r\nCopyright (c) 2005-2022 NVIDIA Corporation\r\nBuilt on Wed_Sep_21_10:33:58_PDT_2022\r\nCuda compilation tools, release 11.8, V11.8.89\r\nBuild cuda_11.8.r11.8/compiler.31833905_0\r\n```\r\n\r\nSummoning `yaksa` maintainers @hzhou @raffenet @yfguo\n\n### General information\n\n- [X] I have run `spack debug report` and reported the version of Spack/Python/Platform\n- [X] I have run `spack maintainers <name-of-the-package>` and **@mentioned** any maintainers\n- [X] I have uploaded the build log and environment files\n- [X] I have searched the issues of this repo and believe this is not a duplicate\n", "before_files": [{"content": "# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack.package import *\n\n\nclass Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage):\n    \"\"\"Yaksa is a high-performance datatype engine for expressing,\n    managing and manipulating data present in noncontiguous memory\n    regions. It provides portable abstractions for structured\n    noncontiguous data layouts that are much more comprehensive compared\n    with traditional I/O vectors.\n\n    Yaksa imitates parts of the MPI Datatype system, but adds additional\n    functionality that would allow it to be used independent of MPI. It\n    provides routines for packing/unpacking, creating I/O vectors (array\n    of contiguous segments) and flattening/unflattening datatypes into\n    process-portable formats.\n\n    Yaksa's backend includes support for CPUs as well as different\n    GPUs.\"\"\"\n\n    homepage = \"https://www.yaksa.org\"\n    url = \"https://github.com/pmodels/yaksa/archive/refs/tags/v0.2.tar.gz\"\n    maintainers(\"raffenet\", \"yfguo\", \"hzhou\")\n\n    version(\"0.2\", sha256=\"9401cb6153dc8c34ddb9781bbabd418fd26b0a27b5da3294ecc21af7be9c86f2\")\n\n    depends_on(\"autoconf\", type=\"build\")\n    depends_on(\"automake\", type=\"build\")\n    depends_on(\"libtool\", type=\"build\")\n    depends_on(\"m4\", type=\"build\")\n    depends_on(\"python@3:\", type=\"build\")\n\n    def autoreconf(self, spec, prefix):\n        sh = which(\"sh\")\n        sh(\"autogen.sh\")\n\n    def configure_args(self):\n        spec = self.spec\n        config_args = []\n\n        config_args += self.with_or_without(\"cuda\", activation_value=\"prefix\")\n        if \"+cuda\" in spec:\n            cuda_archs = spec.variants[\"cuda_arch\"].value\n            if \"none\" not in cuda_archs:\n                config_args.append(\"--with-cuda-sm={0}\".format(\",\".join(cuda_archs)))\n\n        if \"+rocm\" in spec:\n            config_args.append(\"--with-hip={0}\".format(spec[\"hip\"].prefix))\n            rocm_archs = spec.variants[\"amdgpu_target\"].value\n            if \"none\" not in rocm_archs:\n                config_args.append(\"--with-hip-sm={0}\".format(\",\".join(rocm_archs)))\n        else:\n            config_args.append(\"--without-hip\")\n\n        return config_args\n", "path": "var/spack/repos/builtin/packages/yaksa/package.py"}], "after_files": [{"content": "# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack.package import *\n\n\nclass Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage):\n    \"\"\"Yaksa is a high-performance datatype engine for expressing,\n    managing and manipulating data present in noncontiguous memory\n    regions. It provides portable abstractions for structured\n    noncontiguous data layouts that are much more comprehensive compared\n    with traditional I/O vectors.\n\n    Yaksa imitates parts of the MPI Datatype system, but adds additional\n    functionality that would allow it to be used independent of MPI. It\n    provides routines for packing/unpacking, creating I/O vectors (array\n    of contiguous segments) and flattening/unflattening datatypes into\n    process-portable formats.\n\n    Yaksa's backend includes support for CPUs as well as different\n    GPUs.\"\"\"\n\n    homepage = \"https://www.yaksa.org\"\n    url = \"https://github.com/pmodels/yaksa/archive/refs/tags/v0.2.tar.gz\"\n    maintainers(\"raffenet\", \"yfguo\", \"hzhou\")\n\n    version(\"0.2\", sha256=\"9401cb6153dc8c34ddb9781bbabd418fd26b0a27b5da3294ecc21af7be9c86f2\")\n\n    depends_on(\"autoconf\", type=\"build\")\n    depends_on(\"automake\", type=\"build\")\n    depends_on(\"libtool\", type=\"build\")\n    depends_on(\"m4\", type=\"build\")\n    depends_on(\"python@3:\", type=\"build\")\n\n    def autoreconf(self, spec, prefix):\n        sh = which(\"sh\")\n        sh(\"autogen.sh\")\n\n    def configure_args(self):\n        spec = self.spec\n        config_args = []\n\n        config_args += self.with_or_without(\"cuda\", activation_value=\"prefix\")\n        if \"+cuda\" in spec:\n            cuda_archs = spec.variants[\"cuda_arch\"].value\n            if \"none\" not in cuda_archs:\n                config_args.append(\"--with-cuda-sm={0}\".format(\",\".join(cuda_archs)))\n            if \"^cuda+allow-unsupported-compilers\" in self.spec:\n                config_args.append(\"NVCC_FLAGS=-allow-unsupported-compiler\")\n\n        if \"+rocm\" in spec:\n            config_args.append(\"--with-hip={0}\".format(spec[\"hip\"].prefix))\n            rocm_archs = spec.variants[\"amdgpu_target\"].value\n            if \"none\" not in rocm_archs:\n                config_args.append(\"--with-hip-sm={0}\".format(\",\".join(rocm_archs)))\n        else:\n            config_args.append(\"--without-hip\")\n\n        return config_args\n", "path": "var/spack/repos/builtin/packages/yaksa/package.py"}]}