Repository: spack/spack

Issue:
Installation issue: nvtx build fails; requires c-linking
### Steps to reproduce the issue

$ spack maintainers nvtx
@thomas-bouvier 

In my case, this comes from building `py-torch@2.0.0:`
```console
$ spack spec -I nvtx
 -   nvtx@3.1.0 cflags=-fPIC cxxflags=-fPIC fflags=-fPIC ~python build_system=generic patches:=8f82f00 arch=linux-centos7-x86_64
[+]      ^compiler-wrapper@1.0 build_system=generic arch=linux-centos7-x86_64
[e]      ^gcc@12.4.0~binutils+bootstrap~graphite~mold~nvptx~piclibs~profiled~strip build_system=autotools build_type=Release languages:='c,c++,fortran' arch=linux-centos7-x86_64
 -       ^gcc-runtime@12.4.0 cflags=-fPIC cxxflags=-fPIC fflags=-fPIC  build_system=generic arch=linux-centos7-x86_64
[e]      ^glibc@2.17 build_system=autotools patches:=be65fec,e179c43 arch=linux-centos7-x86_64

...
```


### Error message

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

<pre>
from the build log, the most relevant information is:

  /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack/gcc/gcc: line 401: **SPACK_CC_LINKER_ARG: ERROR: LINKER ARG WAS NOT SET, MAYBE THE PACKAGE DOES NOT DEPEND ON CC?**

I add `depends_on("c") to the package.py , and the build succeeds. Currently, package.py contains only `depents_on("cxx")`

</pre></details>


### Information on your system

$ spack debug report
* **Spack:** 1.0.0.dev0
* **Python:** 3.13.1
* **Platform:** linux-centos7-x86_64_v4

My package.py:
```
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.build_systems.python import PythonPipBuilder
from spack.package import *


class Nvtx(Package, PythonExtension):
    """Python code annotation library"""

    git = "https://github.com/NVIDIA/NVTX.git"
    url = "https://github.com/NVIDIA/NVTX/archive/refs/tags/v3.1.0.tar.gz"

    maintainers("thomas-bouvier")

    license("Apache-2.0")

    version("develop", branch="dev")
    version("3.1.0", sha256="dc4e4a227d04d3da46ad920dfee5f7599ac8d6b2ee1809c9067110fb1cc71ced")
    #
    # yoder:
    depends_on("c", type="build")
    #
    depends_on("cxx", type="build")  # generated

    variant("python", default=True, description="Install Python bindings.")
    extends("python", when="+python")
    depends_on("py-pip", type="build", when="+python")
    depends_on("py-setuptools", type="build", when="+python")
    depends_on("py-wheel", type="build", when="+python")
    depends_on("py-cython", type="build", when="+python")

    build_directory = "python"

    # Create a nvtx-config.cmake file to make calls to find_package(nvtx) to
    # work as expected
    patch("nvtx-config.patch")

    def patch(self):
        """Patch setup.py to provide include directory."""
        include_dir = prefix.include
        setup = FileFilter("python/setup.py")
        setup.filter("include_dirs=include_dirs", f"include_dirs=['{include_dir}']", string=True)

    def install(self, spec, prefix):
        install_tree("c/include", prefix.include)
        install("c/CMakeLists.txt", prefix)
        install("c/nvtxImportedTargets.cmake", prefix)
        install("./LICENSE.txt", prefix)

        install("./nvtx-config.cmake", prefix)  # added by the patch above

        with working_dir(self.build_directory):
            pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")

```

### Additional information

_No response_

### 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:
@markyoder: ```
$ cat /tmp/myoder96/spack-stage/spack-stage-nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/spack-build-out.txt
==> nvtx: Executing phase: 'install'
==> [2025-05-05-10:14:43.346191] Installing c/include to /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/include
==> [2025-05-05-10:14:44.893898] Installing c/CMakeLists.txt to /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot
==> [2025-05-05-10:14:44.896518] Installing c/nvtxImportedTargets.cmake to /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot
==> [2025-05-05-10:14:44.899135] Installing ./LICENSE.txt to /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot
==> [2025-05-05-10:14:44.901938] Installing ./nvtx-config.cmake to /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot
==> [2025-05-05-10:14:44.905103] '/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-venv-1.0-6hyba44mbzhh6oxyaxsoe6lzhpgi3v6e/bin/python3' '-m' 'pip' '-vvv' '--no-input' '--no-cache-dir' '--disable-pip-version-check' 'install' '--no-deps' '--ignore-installed' '--no-build-isolation' '--no-warn-script-location' '--no-index' '--prefix=/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot' '.'
Using pip 25.0.1 from /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi/lib/python3.10/site-packages/pip (python 3.10)
Non-user install due to --prefix or --target option
Ignoring indexes: https://pypi.org/simple
Created temporary directory: /tmp/pip-build-tracker-ez3598fl
Initialized build tracking at /tmp/pip-build-tracker-ez3598fl
Created build tracker: /tmp/pip-build-tracker-ez3598fl
Entered build tracker: /tmp/pip-build-tracker-ez3598fl
Created temporary directory: /tmp/pip-install-67pzcnsg
Created temporary directory: /tmp/pip-ephem-wheel-cache-mic_n0hl
Processing /tmp/myoder96/spack-stage/spack-stage-nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/spack-src/python
  Added file:///tmp/myoder96/spack-stage/spack-stage-nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/spack-src/python to build tracker '/tmp/pip-build-tracker-ez3598fl'
  Created temporary directory: /tmp/pip-modern-metadata-r3qc26x8
  Preparing metadata (pyproject.toml): started
  Running command Preparing metadata (pyproject.toml)
  [1/1] Cythonizing nvtx/_lib/tests/test_profiler.pyx
  warning: nvtx/_lib/lib.pyx:27:42: Not all members given for struct 'nvtxEventAttributes_t'
  warning: nvtx/_lib/lib.pyx:27:42: Not all members given for struct 'nvtxEventAttributes_t'
  [1/2] Cythonizing nvtx/_lib/lib.pyx
  [2/2] Cythonizing nvtx/_lib/profiler.pyx
  running dist_info
  creating /tmp/pip-modern-metadata-r3qc26x8/nvtx.egg-info
  writing /tmp/pip-modern-metadata-r3qc26x8/nvtx.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-r3qc26x8/nvtx.egg-info/dependency_links.txt
  writing top-level names to /tmp/pip-modern-metadata-r3qc26x8/nvtx.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-r3qc26x8/nvtx.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-modern-metadata-r3qc26x8/nvtx.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE.txt'
  writing manifest file '/tmp/pip-modern-metadata-r3qc26x8/nvtx.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-r3qc26x8/nvtx-0.2.5.dist-info'
  Preparing metadata (pyproject.toml): finished with status 'done'
  Source in /tmp/myoder96/spack-stage/spack-stage-nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/spack-src/python has version 0.2.5, which satisfies requirement nvtx==0.2.5 from file:///tmp/myoder96/spack-stage/spack-stage-nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/spack-src/python
  Removed nvtx==0.2.5 from file:///tmp/myoder96/spack-stage/spack-stage-nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/spack-src/python from build tracker '/tmp/pip-build-tracker-ez3598fl'
Created temporary directory: /tmp/pip-unpack-k465bx4c
Building wheels for collected packages: nvtx
  Created temporary directory: /tmp/pip-wheel-it0mxrto
  Destination directory: /tmp/pip-wheel-it0mxrto
  Building wheel for nvtx (pyproject.toml): started
  Running command Building wheel for nvtx (pyproject.toml)
  [1/1] Cythonizing nvtx/_lib/tests/test_profiler.pyx
  warning: nvtx/_lib/lib.pyx:27:42: Not all members given for struct 'nvtxEventAttributes_t'
  warning: nvtx/_lib/lib.pyx:27:42: Not all members given for struct 'nvtxEventAttributes_t'
  [1/2] Cythonizing nvtx/_lib/lib.pyx
  [2/2] Cythonizing nvtx/_lib/profiler.pyx
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-310
  creating build/lib.linux-x86_64-cpython-310/nvtx
  copying nvtx/__init__.py -> build/lib.linux-x86_64-cpython-310/nvtx
  copying nvtx/__main__.py -> build/lib.linux-x86_64-cpython-310/nvtx
  copying nvtx/colors.py -> build/lib.linux-x86_64-cpython-310/nvtx
  copying nvtx/nvtx.py -> build/lib.linux-x86_64-cpython-310/nvtx
  creating build/lib.linux-x86_64-cpython-310/nvtx/_lib
  copying nvtx/_lib/__init__.py -> build/lib.linux-x86_64-cpython-310/nvtx/_lib
  creating build/lib.linux-x86_64-cpython-310/nvtx/utils
  copying nvtx/utils/__init__.py -> build/lib.linux-x86_64-cpython-310/nvtx/utils
  copying nvtx/utils/cached.py -> build/lib.linux-x86_64-cpython-310/nvtx/utils
  creating build/lib.linux-x86_64-cpython-310/nvtx/_lib/tests
  copying nvtx/_lib/tests/__init__.py -> build/lib.linux-x86_64-cpython-310/nvtx/_lib/tests
  copying nvtx/_lib/__init__.pxd -> build/lib.linux-x86_64-cpython-310/nvtx/_lib
  copying nvtx/_lib/lib.pxd -> build/lib.linux-x86_64-cpython-310/nvtx/_lib
  copying nvtx/_lib/profiler.pxd -> build/lib.linux-x86_64-cpython-310/nvtx/_lib
  running build_ext
  building 'nvtx._lib.lib' extension
  creating build/temp.linux-x86_64-cpython-310
  creating build/temp.linux-x86_64-cpython-310/nvtx
  creating build/temp.linux-x86_64-cpython-310/nvtx/_lib
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/include -I/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-venv-1.0-6hyba44mbzhh6oxyaxsoe6lzhpgi3v6e/include -I/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-3.10.16-eywos53yi3adauqjjfvv5axe2ovluwxe/include/python3.10 -c nvtx/_lib/lib.c -o build/temp.linux-x86_64-cpython-310/nvtx/_lib/lib.o
  /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack/gcc/gcc: line 401: SPACK_CC_LINKER_ARG: ERROR: LINKER ARG WAS NOT SET, MAYBE THE PACKAGE DOES NOT DEPEND ON CC?
  error: command '/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack/gcc/gcc' failed with exit code 1
  error: subprocess-exited-with-error
  
  × Building wheel for nvtx (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-venv-1.0-6hyba44mbzhh6oxyaxsoe6lzhpgi3v6e/bin/python3 /scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpbt1vo24i
  cwd: /tmp/myoder96/spack-stage/spack-stage-nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/spack-src/python
  Building wheel for nvtx (pyproject.toml): finished with status 'error'
  ERROR: Failed building wheel for nvtx
Failed to build nvtx
ERROR: Failed to build installable wheels for some pyproject.toml based projects (nvtx)
Exception information:
Traceback (most recent call last):
  File "/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 106, in _run_wrapper
    status = _inner_run()
  File "/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 97, in _inner_run
    return self.run(options, args)
  File "/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 67, in wrapper
    return func(self, options, args)
  File "/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 435, in run
    raise InstallationError(
pip._internal.exceptions.InstallationError: Failed to build installable wheels for some pyproject.toml based projects (nvtx)
Removed build tracker: '/tmp/pip-build-tracker-ez3598fl'

```@markyoder: spack-build-env.txt 
```
 $ cat /tmp/myoder96/spack-stage/spack-stage-nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/spack-build-env.txt 
APPTAINER_CACHEDIR=/scratch/users/myoder96/.apptainer; export APPTAINER_CACHEDIR
APPTAINER_TMPDIR=/tmp; export APPTAINER_TMPDIR
APPTAINER_UNSHARE_IPC=true; export APPTAINER_UNSHARE_IPC
AWKPATH=.:/usr/share/awk; export AWKPATH
BASH_ENV=/share/software/user/open/lmod/lmod/init/bash; export BASH_ENV
function _cache_cmd() {  local cache=$HOME/.cache/sh/;
 local cmd=${1:-};
 local cachelife=${2:-};
 local entry exp;
 shift 2;
 [[ -d ${cache} ]] || /bin/mkdir -p "${cache}";
 read -r prm_hash dash <<< "$(/bin/md5sum <<< "$@")";
 entry="${cache}/${cmd##*/}_${prm_hash}";
 exp=$(/bin/date -d -"${cachelife}"sec +%s);
 if [[ -s ${entry} ]] && [[ $(/bin/date -r "${entry}" +%s) -gt $exp ]]; then
 cat "${entry}";
 else
 ${cmd} "$@" 2>&1 | tee "${entry}" 2> /dev/null || rm "${entry}" 2> /dev/null;
 fi;
 set +m;
 $SH_TIMEOUT_CMD 5 find "${cache}" -type f -name "${cmd##*/}_*" \! -newermt @"$exp" -delete &>/dev/null;
 set -m
}; export -f _cache_cmd
function _spack_shell_wrapper() {  for var in DYLD_LIBRARY_PATH DYLD_FALLBACK_LIBRARY_PATH;
 do
 eval "if [ -n \"\${${var}-}\" ]; then export SPACK_$var=\${${var}}; fi";
 done;
 if [ -n "${ZSH_VERSION:-}" ]; then
 emulate -L sh;
 fi;
 _sp_flags="";
 while [ ! -z ${1+x} ] && [ "${1#-}" != "${1}" ]; do
 _sp_flags="$_sp_flags $1";
 shift;
 done;
 if [ -n "$_sp_flags" ] && [ "${_sp_flags#*h}" != "${_sp_flags}" ] || [ "${_sp_flags#*V}" != "${_sp_flags}" ]; then
 command spack $_sp_flags "$@";
 return;
 fi;
 _sp_subcommand="";
 if [ ! -z ${1+x} ]; then
 _sp_subcommand="$1";
 shift;
 fi;
 case $_sp_subcommand in 
 "cd")
 _sp_arg="";
 if [ -n "$1" ]; then
 _sp_arg="$1";
 shift;
 fi;
 if [ "$_sp_arg" = "-h" ] || [ "$_sp_arg" = "--help" ]; then
 command spack cd -h;
 else
 LOC="$(SPACK_COLOR="${SPACK_COLOR:-always}" spack location $_sp_arg "$@")";
 if [ -d "$LOC" ]; then
 cd "$LOC";
 else
 return 1;
 fi;
 fi;
 return
 ;;
 "env")
 _sp_arg="";
 if [ -n "$1" ]; then
 _sp_arg="$1";
 shift;
 fi;
 if [ "$_sp_arg" = "-h" ] || [ "$_sp_arg" = "--help" ]; then
 command spack env -h;
 else
 case $_sp_arg in 
 activate)
 _a=" $@";
 if [ "${_a#* --sh}" != "$_a" ] || [ "${_a#* --csh}" != "$_a" ] || [ "${_a#* -h}" != "$_a" ] || [ "${_a#* --help}" != "$_a" ]; then
 command spack env activate "$@";
 else
 stdout="$(SPACK_COLOR="${SPACK_COLOR:-always}" command spack $_sp_flags env activate --sh "$@")" || return;
 eval "$stdout";
 fi
 ;;
 deactivate)
 _a=" $@";
 if [ "${_a#* --sh}" != "$_a" ] || [ "${_a#* --csh}" != "$_a" ]; then
 command spack env deactivate "$@";
 else
 if [ -n "$*" ]; then
 command spack env deactivate -h;
 else
 stdout="$(SPACK_COLOR="${SPACK_COLOR:-always}" command spack $_sp_flags env deactivate --sh)" || return;
 eval "$stdout";
 fi;
 fi
 ;;
 *)
 command spack env $_sp_arg "$@"
 ;;
 esac;
 fi;
 return
 ;;
 "load" | "unload")
 _a=" $@";
 if [ "${_a#* --sh}" != "$_a" ] || [ "${_a#* --csh}" != "$_a" ] || [ "${_a#* -h}" != "$_a" ] || [ "${_a#* --list}" != "$_a" ] || [ "${_a#* --help}" != "$_a" ]; then
 command spack $_sp_flags $_sp_subcommand "$@";
 else
 stdout="$(SPACK_COLOR="${SPACK_COLOR:-always}" command spack $_sp_flags $_sp_subcommand --sh "$@")" || return;
 eval "$stdout";
 fi
 ;;
 *)
 command spack $_sp_flags $_sp_subcommand "$@"
 ;;
 esac
}; export -f _spack_shell_wrapper
function bc() {  timeout $TMOUT bc "$@"
}; export -f bc
function ml() {  eval "$($LMOD_DIR/ml_cmd "$@")"
}; export -f ml
function module() {  if [ -z "${LMOD_SH_DBG_ON+x}" ]; then
 case "$-" in 
 *v*x*)
 __lmod_sh_dbg='vx'
 ;;
 *v*)
 __lmod_sh_dbg='v'
 ;;
 *x*)
 __lmod_sh_dbg='x'
 ;;
 esac;
 fi;
 if [ -n "${__lmod_sh_dbg:-}" ]; then
 set +$__lmod_sh_dbg;
 echo "Shell debugging temporarily silenced: export LMOD_SH_DBG_ON=1 for Lmod's output" 1>&2;
 fi;
 eval "$($LMOD_CMD shell "$@")" && eval "$(${LMOD_SETTARG_CMD:-:} -s sh)";
 __lmod_my_status=$?;
 if [ -n "${__lmod_sh_dbg:-}" ]; then
 echo "Shell debugging restarted" 1>&2;
 set -$__lmod_sh_dbg;
 fi;
 unset __lmod_sh_dbg;
 return $__lmod_my_status
}; export -f module
function sacct() {  _cache_cmd /usr/bin/sacct 60 "$@"
}; export -f sacct
function sh_jobs() {  _cache_cmd $SRCC_PATH/sh_jobs 90 "$@"
}; export -f sh_jobs
function sh_jobwait() {  _cache_cmd $SRCC_PATH/sh_jobwait 300 "$@"
}; export -f sh_jobwait
function sh_next_downtime() {  _cache_cmd $SRCC_PATH/sh_next_downtime 3600 "$@"
}; export -f sh_next_downtime
function sh_part() {  _cache_cmd $SRCC_PATH/sh_part 30 "$@"
}; export -f sh_part
function sh_quota() {  _cache_cmd $SRCC_PATH/sh_quota 180 "$@"
}; export -f sh_quota
function sh_status() {  _cache_cmd $SRCC_PATH/sh_status 3600 "$@"
}; export -f sh_status
function sh_usage() {  _cache_cmd $SRCC_PATH/sh_usage 90 "$@"
}; export -f sh_usage
function sinfo() {  _cache_cmd /usr/bin/sinfo 60 "$@"
}; export -f sinfo
function sleep() {  timeout $TMOUT sleep "$@"
}; export -f sleep
function spack() {  : this is a shell function from: /scratch/users/myoder96/spack_dev/spack/share/spack/setup-env.sh;
 : the real spack script is here: /scratch/users/myoder96/spack_dev/spack/bin/spack;
 _spack_shell_wrapper "$@";
 return $?
}; export -f spack
function squeue() {  _cache_cmd /usr/bin/squeue 20 "$@"
}; export -f squeue
function sstat() {  _cache_cmd /usr/bin/sstat 10 "$@"
}; export -f sstat
function sudo() {  $SRCC_PATH/sudo
}; export -f sudo
BLIS_NUM_THREADS=8; export BLIS_NUM_THREADS
CC=gcc; export CC
CCACHE_DISABLE=1; export CCACHE_DISABLE
CMAKE_PREFIX_PATH=/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-cython-0.29.36-frrzdshnfibocxit5szqzgfcvjlyal45:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-setuptools-63.4.3-grrkewupd3xbs3uuhls3e5pkl6fjas37:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-wheel-0.45.1-bb4zuqkkl4y4c3bhcghh7feyvp2nefbb:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-venv-1.0-6hyba44mbzhh6oxyaxsoe6lzhpgi3v6e:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-3.10.16-eywos53yi3adauqjjfvv5axe2ovluwxe:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/gcc-runtime-12.4.0-bal5bj5zhf2msyv5zos6kv3y4w4ocl3c:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu:/share/software/user/open/gcc/12.4.0; export CMAKE_PREFIX_PATH
CONFIG_SITE=/dev/null; export CONFIG_SITE
CPATH=/share/software/user/open/binutils/2.38/include:/share/software/user/open/gcc/12.4.0/include; export CPATH
CPP=/share/software/user/open/gcc/12.4.0/bin/cpp; export CPP
CXX=/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack/gcc/g++; export CXX
CXXCPP=/share/software/user/open/gcc/12.4.0/bin/cpp; export CXXCPP
CYTHON_FORCE_REGEN=1; export CYTHON_FORCE_REGEN
DISPLAY=localhost:12.0; export DISPLAY
F77=gfortran; export F77
F90=gfortran; export F90
FC=gfortran; export FC
FPATH=/share/software/user/open/lmod/lmod/init/ksh_funcs; export FPATH
GCC_ROOT=/share/software/user/open/gcc/12.4.0; export GCC_ROOT
GOTO_NUM_THREADS=8; export GOTO_NUM_THREADS
GROUP=ruthm; export GROUP
GROUP_HOME=/home/groups/ruthm; export GROUP_HOME
GROUP_SCRATCH=/scratch/groups/ruthm; export GROUP_SCRATCH
HISTCONTROL=ignoreboth:erasedups; export HISTCONTROL
HISTSIZE=1000; export HISTSIZE
HOME=/home/users/myoder96; export HOME
HOSTNAME=sh04-08n23.int; export HOSTNAME
HYDRA_BOOTSTRAP=slurm; export HYDRA_BOOTSTRAP
HYDRA_LAUNCHER_EXTRA_ARGS=--external-launcher; export HYDRA_LAUNCHER_EXTRA_ARGS
I_MPI_HYDRA_BOOTSTRAP=slurm; export I_MPI_HYDRA_BOOTSTRAP
I_MPI_HYDRA_BOOTSTRAP_EXEC_EXTRA_ARGS=--external-launcher; export I_MPI_HYDRA_BOOTSTRAP_EXEC_EXTRA_ARGS
KRB5CCNAME=FILE:/tmp/krb5cc_362778_viWIVFj9vm; export KRB5CCNAME
LANG=en_US.UTF-8; export LANG
LC_ALL=C; export LC_ALL
LDCXXSHARED='/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack/gcc/g++ -shared'; export LDCXXSHARED
LD_LIBRARY_PATH=/share/software/user/open/binutils/2.38/lib:/share/software/user/open/gcc/12.4.0/lib64:/share/software/user/open/gcc/12.4.0/lib/gcc/x86_64-pc-linux-gnu:/share/software/user/open/gcc/12.4.0/lib; export LD_LIBRARY_PATH
LESSOPEN='||/usr/bin/lesspipe.sh %s'; export LESSOPEN
LIBRARY_PATH=/share/software/user/open/binutils/2.38/lib:/share/software/user/open/gcc/12.4.0/lib64:/share/software/user/open/gcc/12.4.0/lib; export LIBRARY_PATH
LMOD_ADMIN_FILE=/share/software/modules/admin.list; export LMOD_ADMIN_FILE
LMOD_AVAIL_STYLE=categories; export LMOD_AVAIL_STYLE
LMOD_CMD=/share/software/user/open/lmod/lmod/libexec/lmod; export LMOD_CMD
LMOD_COLORIZE=yes; export LMOD_COLORIZE
LMOD_DIR=/share/software/user/open/lmod/lmod/libexec; export LMOD_DIR
LMOD_FULL_SETTARG_SUPPORT=no; export LMOD_FULL_SETTARG_SUPPORT
LMOD_MODULERCFILE=/share/software/modules/.modulerc.lua; export LMOD_MODULERCFILE
LMOD_PACKAGE_PATH=/share/software/modules/; export LMOD_PACKAGE_PATH
LMOD_PKG=/share/software/user/open/lmod/lmod; export LMOD_PKG
LMOD_PREPEND_BLOCK=normal; export LMOD_PREPEND_BLOCK
LMOD_RC=/share/software/modules/lmodrc.lua; export LMOD_RC
LMOD_REDIRECT=yes; export LMOD_REDIRECT
LMOD_ROOT=/share/software/user/open/lmod; export LMOD_ROOT
LMOD_SETTARG_CMD=:; export LMOD_SETTARG_CMD
LMOD_SETTARG_FULL_SUPPORT=no; export LMOD_SETTARG_FULL_SUPPORT
LMOD_SYSHOST=sherlock; export LMOD_SYSHOST
LMOD_SYSTEM_DEFAULT_MODULES=devel,math; export LMOD_SYSTEM_DEFAULT_MODULES
LMOD_VERSION=8.7.56; export LMOD_VERSION
LMOD_arch=x86_64; export LMOD_arch
LMOD_sys=Linux; export LMOD_sys
LOADEDMODULES=math:system:openssl/3.0.7:zlib/1.2.11:libressl/3.2.1:tcltk/8.6.6:ncurses/6.4:readline/8.2:sqlite/3.44.2:libffi/3.2.1:valgrind/3.14.0:python-sdss/3.13.1:devel:gcc/12.4.0:binutils/2.38; export LOADEDMODULES
LOCAL_SCRATCH=/lscratch/myoder96; export LOCAL_SCRATCH
LOGNAME=myoder96; export LOGNAME
LS_COLORS='su=00:sg=00:ca=00:or=40;31;01'; export LS_COLORS
L_SCRATCH=/lscratch/myoder96; export L_SCRATCH
L_SCRATCH_JOB=/lscratch/myoder96/64653246; export L_SCRATCH_JOB
L_SCRATCH_USER=/lscratch/myoder96; export L_SCRATCH_USER
MAIL=/var/spool/mail/myoder96; export MAIL
MANPATH=/share/software/user/open/binutils/2.38/share/man:/share/software/user/open/gcc/12.4.0/share/man:/home/groups/sh_s-dss/share/sdss/software/no_arch/gcc/14.2.0/python/3.13.1/include:/home/groups/sh_s-dss/share/sdss/software/no_arch/gcc/14.2.0/python/3.13.1/man/man1:/share/software/user/open/valgrind/3.14.0/share/man:/share/software/user/open/libffi/3.2.1/share/man:/share/software/user/open/sqlite/3.44.2/share/man:/share/software/user/open/readline/8.2/share/man:/share/software/user/open/ncurses/6.4/share/man:/share/software/user/open/tcltk/8.6.6/share/man:/share/software/user/open/libressl/3.2.1/share/man:/share/software/user/open/zlib/1.2.11/share/man:/share/software/user/open/openssl/3.0.7/share/man:/share/software/user/open/lmod/lmod/share/man:/usr/local/share/man:/usr/share/man; export MANPATH
MKL_NUM_THREADS=8; export MKL_NUM_THREADS
MODULEPATH=devel:/share/software/modules/system:/home/users/myoder96/.local/modulefiles:/home/groups/sh_s-dss/share/sdss/modules/modulefiles:/share/software/modules/math:/share/software/modules/devel:/share/software/modules/categories; export MODULEPATH
MODULESHOME=/share/software/user/open/lmod/lmod; export MODULESHOME
OAK=/oak/stanford/groups/ruthm; export OAK
OAK_SDSS=/oak/stanford/schools/ees; export OAK_SDSS
OMPI_MCA_plm_slurm_args=--external-launcher; export OMPI_MCA_plm_slurm_args
OMP_NUM_THREADS=8; export OMP_NUM_THREADS
OPENBLAS_NUM_THREADS=8; export OPENBLAS_NUM_THREADS
PATH=/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack/gcc:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack/case-insensitive:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-cython-0.29.36-frrzdshnfibocxit5szqzgfcvjlyal45/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-wheel-0.45.1-bb4zuqkkl4y4c3bhcghh7feyvp2nefbb/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-wheel-0.45.1-bb4zuqkkl4y4c3bhcghh7feyvp2nefbb/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-cython-0.29.36-frrzdshnfibocxit5szqzgfcvjlyal45/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-venv-1.0-6hyba44mbzhh6oxyaxsoe6lzhpgi3v6e/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-3.10.16-eywos53yi3adauqjjfvv5axe2ovluwxe/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/tar-1.35-3wzngkrh3vye3wwirqyv3efmfaavmmax/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/bzip2-1.0.8-f32grf6o56nlxbsypuzt4ddj2fiqrbrx/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/pigz-2.8-rafgi34fop76by7mi73tljpquqa5vrd3/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/xz-5.6.3-k5f5rdrvduci7di5b3peuh7ubucmaecw/bin:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/zstd-1.5.7-g35yb73gxpciglrf566jayopsdrfare6/bin:/share/software/user/open/gcc/12.4.0/bin:/share/software/user/open/binutils/2.38/bin:/share/software/user/open/gcc/12.4.0/bin:/scratch/users/myoder96/spack_dev/spack/bin:/home/groups/sh_s-dss/share/sdss/software/no_arch/gcc/14.2.0/python/3.13.1/bin:/share/software/user/open/valgrind/3.14.0/bin:/share/software/user/open/sqlite/3.44.2/bin:/share/software/user/open/ncurses/6.4/bin:/share/software/user/open/tcltk/8.6.6/bin:/share/software/user/open/libressl/3.2.1/bin:/share/software/user/open/openssl/3.0.7/bin:/share/software/user/srcc/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin; export PATH
PKG_CONFIG_PATH=/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-3.10.16-eywos53yi3adauqjjfvv5axe2ovluwxe/lib/pkgconfig:/home/groups/sh_s-dss/share/sdss/software/no_arch/gcc/14.2.0/python/3.13.1/lib/pkgconfig:/share/software/user/open/valgrind/3.14.0/lib/pkgconfig:/share/software/user/open/libffi/3.2.1/lib/pkgconfig:/share/software/user/open/sqlite/3.44.2/lib/pkgconfig:/share/software/user/open/readline/8.2/lib/pkgconfig:/share/software/user/open/ncurses/6.4/lib/pkgconfig:/share/software/user/open/tcltk/8.6.6/lib/pkgconfig:/share/software/user/open/libressl/3.2.1/lib/pkgconfig:/share/software/user/open/openssl/3.0.7/lib64/pkgconfig; export PKG_CONFIG_PATH
PROMPT_COMMAND='RET=$?;/bin/logger -t user_audit "username=$USER pid=$$ cmd=\"$(history 1 | /bin/sed "s/^[ ]*[0-9]\+[ ]*//" )\" newpwd=$PWD ret=$RET" 2>/dev/null'; export PROMPT_COMMAND
PRTE_MCA_plm_slurm_args=--external-launcher; export PRTE_MCA_plm_slurm_args
#PWD=/scratch/users/myoder96/spack_dev; export PWD
PYTHONPATH=/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-wheel-0.45.1-bb4zuqkkl4y4c3bhcghh7feyvp2nefbb/lib/python3.10/site-packages:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-setuptools-63.4.3-grrkewupd3xbs3uuhls3e5pkl6fjas37/lib/python3.10/site-packages:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-pip-25.0.1-7kq2bp5oi5sdtxg3gyoozl3xr4d6wroi/lib/python3.10/site-packages:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/py-cython-0.29.36-frrzdshnfibocxit5szqzgfcvjlyal45/lib/python3.10/site-packages:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/python-venv-1.0-6hyba44mbzhh6oxyaxsoe6lzhpgi3v6e/lib/python3.10/site-packages; export PYTHONPATH
PYTHONPYCACHEPREFIX=/tmp; export PYTHONPYCACHEPREFIX
SCRATCH=/scratch/users/myoder96; export SCRATCH
SDSS_HOME=/home/groups/sh_s-dss; export SDSS_HOME
SHELL=/bin/bash; export SHELL
SHERLOCK=2; export SHERLOCK
SHLVL=6; export SHLVL
SH_DEF_TIMEOUT=30; export SH_DEF_TIMEOUT
SH_INFO_TIMEOUT=30; export SH_INFO_TIMEOUT
SH_TIMEOUT_CMD='timeout -s9'; export SH_TIMEOUT_CMD
SH_USER_ENV_INITD=1; export SH_USER_ENV_INITD
SLURMD_DEBUG=2; export SLURMD_DEBUG
SLURMD_NODENAME=sh04-08n23; export SLURMD_NODENAME
SLURM_CLUSTER_NAME=sherlock; export SLURM_CLUSTER_NAME
SLURM_CONF=/var/spool/slurmd/conf-cache/slurm.conf; export SLURM_CONF
SLURM_CPUS_ON_NODE=8; export SLURM_CPUS_ON_NODE
SLURM_CPUS_PER_TASK=8; export SLURM_CPUS_PER_TASK
SLURM_GTIDS=0; export SLURM_GTIDS
SLURM_JOBID=64653246; export SLURM_JOBID
SLURM_JOB_ACCOUNT=ruthm; export SLURM_JOB_ACCOUNT
SLURM_JOB_CPUS_PER_NODE=8; export SLURM_JOB_CPUS_PER_NODE
SLURM_JOB_END_TIME=1746478427; export SLURM_JOB_END_TIME
SLURM_JOB_GID=32264; export SLURM_JOB_GID
SLURM_JOB_ID=64653246; export SLURM_JOB_ID
SLURM_JOB_NAME=interactive; export SLURM_JOB_NAME
SLURM_JOB_NODELIST=sh04-08n23; export SLURM_JOB_NODELIST
SLURM_JOB_NUM_NODES=1; export SLURM_JOB_NUM_NODES
SLURM_JOB_PARTITION=serc; export SLURM_JOB_PARTITION
SLURM_JOB_QOS=normal; export SLURM_JOB_QOS
SLURM_JOB_START_TIME=1746464024; export SLURM_JOB_START_TIME
SLURM_JOB_UID=362778; export SLURM_JOB_UID
SLURM_JOB_USER=myoder96; export SLURM_JOB_USER
SLURM_LAUNCH_NODE_IPADDR=10.20.0.65; export SLURM_LAUNCH_NODE_IPADDR
SLURM_LOCALID=0; export SLURM_LOCALID
SLURM_MEM_PER_CPU=2048; export SLURM_MEM_PER_CPU
SLURM_MPI_TYPE=pmix; export SLURM_MPI_TYPE
SLURM_NNODES=1; export SLURM_NNODES
SLURM_NODEID=0; export SLURM_NODEID
SLURM_NODELIST=sh04-08n23; export SLURM_NODELIST
SLURM_OOM_KILL_STEP=0; export SLURM_OOM_KILL_STEP
SLURM_PMIXP_ABORT_AGENT_PORT=41662; export SLURM_PMIXP_ABORT_AGENT_PORT
SLURM_PMIX_MAPPING_SERV='(vector,(0,1,1))'; export SLURM_PMIX_MAPPING_SERV
SLURM_PRIO_PROCESS=0; export SLURM_PRIO_PROCESS
SLURM_PROCID=0; export SLURM_PROCID
SLURM_PTY_PORT=43465; export SLURM_PTY_PORT
SLURM_PTY_WIN_COL=143; export SLURM_PTY_WIN_COL
SLURM_PTY_WIN_ROW=43; export SLURM_PTY_WIN_ROW
SLURM_SCRIPT_CONTEXT=prolog_task; export SLURM_SCRIPT_CONTEXT
SLURM_SRUN_COMM_HOST=10.20.0.65; export SLURM_SRUN_COMM_HOST
SLURM_SRUN_COMM_PORT=45828; export SLURM_SRUN_COMM_PORT
SLURM_STEPID=4294967290; export SLURM_STEPID
SLURM_STEPMGR=sh04-08n23; export SLURM_STEPMGR
SLURM_STEP_ID=4294967290; export SLURM_STEP_ID
SLURM_STEP_LAUNCHER_PORT=45828; export SLURM_STEP_LAUNCHER_PORT
SLURM_STEP_NODELIST=sh04-08n23; export SLURM_STEP_NODELIST
SLURM_STEP_NUM_NODES=1; export SLURM_STEP_NUM_NODES
SLURM_STEP_NUM_TASKS=1; export SLURM_STEP_NUM_TASKS
SLURM_STEP_TASKS_PER_NODE=1; export SLURM_STEP_TASKS_PER_NODE
SLURM_SUBMIT_DIR=/home/users/myoder96; export SLURM_SUBMIT_DIR
SLURM_SUBMIT_HOST=sh04-ln05.stanford.edu; export SLURM_SUBMIT_HOST
SLURM_TASKS_PER_NODE=1; export SLURM_TASKS_PER_NODE
SLURM_TASK_PID=28371; export SLURM_TASK_PID
SLURM_TOPOLOGY_ADDR=sh04.sh04-isw-08.sh04-08n23; export SLURM_TOPOLOGY_ADDR
SLURM_TOPOLOGY_ADDR_PATTERN=switch.switch.node; export SLURM_TOPOLOGY_ADDR_PATTERN
SLURM_TRES_PER_TASK=cpu=8; export SLURM_TRES_PER_TASK
SPACK_CFLAGS=-fPIC; export SPACK_CFLAGS
SPACK_COMPILER_FLAGS_KEEP=''; export SPACK_COMPILER_FLAGS_KEEP
SPACK_COMPILER_FLAGS_REPLACE='-Werror-|-Wno-error= -Werror|-Wno-error'; export SPACK_COMPILER_FLAGS_REPLACE
SPACK_COMPILER_IMPLICIT_RPATHS=/share/software/user/open/gcc/12.4.0/lib64:/share/software/user/open/gcc/12.4.0/lib/gcc/x86_64-pc-linux-gnu/12.4.0:/share/software/user/open/gcc/12.4.0/lib; export SPACK_COMPILER_IMPLICIT_RPATHS
SPACK_COMPILER_WRAPPER_PATH=/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack/gcc:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack/case-insensitive:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/compiler-wrapper-1.0-54d42vnrgnm36yzfdo2pn6z755oy5zpu/libexec/spack; export SPACK_COMPILER_WRAPPER_PATH
SPACK_CXX=/share/software/user/open/gcc/12.4.0/bin/g++; export SPACK_CXX
SPACK_CXXFLAGS=-fPIC; export SPACK_CXXFLAGS
SPACK_CXX_LINKER_ARG=-Wl,; export SPACK_CXX_LINKER_ARG
SPACK_CXX_RPATH_ARG=-Wl,-rpath,; export SPACK_CXX_RPATH_ARG
SPACK_DEBUG_LOG_DIR=/scratch/users/myoder96/spack_dev; export SPACK_DEBUG_LOG_DIR
SPACK_DEBUG_LOG_ID=nvtx-6ze7y2h; export SPACK_DEBUG_LOG_ID
SPACK_DISABLE_LOCAL_CONFIG=true; export SPACK_DISABLE_LOCAL_CONFIG
SPACK_DISABLE_NEW_DTAGS=--disable-new-dtags; export SPACK_DISABLE_NEW_DTAGS
SPACK_DTAGS_TO_ADD=--disable-new-dtags; export SPACK_DTAGS_TO_ADD
SPACK_DTAGS_TO_STRIP=--enable-new-dtags; export SPACK_DTAGS_TO_STRIP
SPACK_ENABLE_NEW_DTAGS=--enable-new-dtags; export SPACK_ENABLE_NEW_DTAGS
SPACK_ENV=/scratch/users/myoder96/spack_dev/spack/var/spack/environments/marcelo25; export SPACK_ENV
SPACK_FFLAGS=-fPIC; export SPACK_FFLAGS
SPACK_INCLUDE_DIRS=''; export SPACK_INCLUDE_DIRS
SPACK_LINK_DIRS=''; export SPACK_LINK_DIRS
SPACK_MANAGED_DIRS='"/scratch/users/myoder96/spack_dev/spack/opt/spack/"*|"/tmp/myoder96/spack-stage/"*'; export SPACK_MANAGED_DIRS
SPACK_PYTHON=/home/groups/sh_s-dss/share/sdss/software/no_arch/gcc/14.2.0/python/3.13.1/bin/python3; export SPACK_PYTHON
SPACK_ROOT=/scratch/users/myoder96/spack_dev/spack; export SPACK_ROOT
SPACK_RPATH_DIRS=''; export SPACK_RPATH_DIRS
SPACK_SHORT_SPEC='nvtx@3.1.0+python build_system=generic patches:=8f82f00 arch=linux-centos7-x86_64/6ze7y2h'; export SPACK_SHORT_SPEC
SPACK_STORE_INCLUDE_DIRS=''; export SPACK_STORE_INCLUDE_DIRS
SPACK_STORE_LINK_DIRS=/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/gcc-runtime-12.4.0-bal5bj5zhf2msyv5zos6kv3y4w4ocl3c/lib; export SPACK_STORE_LINK_DIRS
SPACK_STORE_RPATH_DIRS=/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/lib:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/nvtx-3.1.0-6ze7y2hsv7qcczdvfb2xg5uq5akpbgot/lib64:/scratch/users/myoder96/spack_dev/spack/opt/spack/linux-x86_64/gcc-runtime-12.4.0-bal5bj5zhf2msyv5zos6kv3y4w4ocl3c/lib; export SPACK_STORE_RPATH_DIRS
SPACK_SYSTEM_DIRS='"/"|"//"|"/bin"|"/bin/"|"/bin64"|"/bin64/"|"/include"|"/include/"|"/lib"|"/lib/"|"/lib64"|"/lib64/"|"/usr"|"/usr/"|"/usr/bin"|"/usr/bin/"|"/usr/bin64"|"/usr/bin64/"|"/usr/include"|"/usr/include/"|"/usr/lib"|"/usr/lib/"|"/usr/lib64"|"/usr/lib64/"|"/usr/local"|"/usr/local/"|"/usr/local/bin"|"/usr/local/bin/"|"/usr/local/bin64"|"/usr/local/bin64/"|"/usr/local/include"|"/usr/local/include/"|"/usr/local/lib"|"/usr/local/lib/"|"/usr/local/lib64"|"/usr/local/lib64/"'; export SPACK_SYSTEM_DIRS
SPACK_TARGET_ARGS_CXX='-march=x86-64 -mtune=generic'; export SPACK_TARGET_ARGS_CXX
SPACK_USER_CACHE_PATH=/tmp/spack; export SPACK_USER_CACHE_PATH
SQUEUE_FORMAT='%.16A %.5K %.12j %.10u  %.10a %.8P %.5D  %.6C %.20M %.20L  %.24N %.10r %.12t'; export SQUEUE_FORMAT
SQUEUE_FORMAT_STR=jobid,jobname,partition,name,username,state,time,numcpus,numnodes,nodelist; export SQUEUE_FORMAT_STR
SRCC_PATH=/share/software/user/srcc/bin; export SRCC_PATH
SRUN_CPUS_PER_TASK=8; export SRUN_CPUS_PER_TASK
SRUN_DEBUG=3; export SRUN_DEBUG
SSH_CLIENT='10.130.211.205 57181 22'; export SSH_CLIENT
SSH_CONNECTION='10.130.211.205 57181 171.67.99.171 22'; export SSH_CONNECTION
SSH_TTY=/dev/pts/13; export SSH_TTY
TERM=xterm-256color; export TERM
TMOUT=86400; export TMOUT
TMPDIR=/tmp; export TMPDIR
USER=myoder96; export USER
WORKON_HOME=/home/users/myoder96/Envs; export WORKON_HOME
XDG_RUNTIME_DIR=/tmp; export XDG_RUNTIME_DIR
_=/usr/bin/awk; export _
_LMFILES_=/share/software/modules/categories/math.lua:/share/software/modules/categories/system.lua:/share/software/modules/system/openssl/3.0.7.lua:/share/software/modules/system/zlib/1.2.11.lua:/share/software/modules/system/libressl/3.2.1.lua:/share/software/modules/system/tcltk/8.6.6.lua:/share/software/modules/system/ncurses/6.4.lua:/share/software/modules/system/readline/8.2.lua:/share/software/modules/system/sqlite/3.44.2.lua:/share/software/modules/system/libffi/3.2.1.lua:/share/software/modules/devel/valgrind/3.14.0.lua:/home/groups/sh_s-dss/share/sdss/modules/modulefiles/python-sdss/3.13.1.lua:/share/software/modules/categories/devel.lua:/share/software/modules/devel/gcc/12.4.0.lua:/share/software/modules/devel/binutils/2.38.lua; export _LMFILES_
_ModuleTable001_=X01vZHVsZVRhYmxlXyA9IHsKTVR2ZXJzaW9uID0gMywKY19yZWJ1aWxkVGltZSA9IGZhbHNlLApjX3Nob3J0VGltZSA9IGZhbHNlLApkZXB0aFQgPSB7fSwK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cmUvbW9kdWxlcy9zeXN0ZW0iLCAiL2hvbWUvdXNlcnMvbXlvZGVyOTYvLmxvY2FsL21vZHVsZWZpbGVzIiwgIi9ob21lL2dyb3Vwcy9zaF9zLWRzcy9zaGFyZS9zZHNzL21vZHVsZXMvbW9kdWxlZmlsZXMiCiwgIi9zaGFyZS9zb2Z0d2FyZS9tb2R1bGVzL21hdGgiLCAiL3NoYXJlL3NvZnR3YXJlL21vZHVsZXMvZGV2ZWwiLCAiL3NoYXJlL3NvZnR3YXJlL21vZHVsZXMvY2F0ZWdvcmllcyIsCn0sCnN5c3RlbUJhc2VNUEFUSCA9ICIvc2hhcmUvc29mdHdhcmUvbW9kdWxlcy9jYXRlZ29yaWVzIiwKfQo=; export _ModuleTable011_
_ModuleTable_Sz_=11; export _ModuleTable_Sz_
__Init_Default_Modules=1; export __Init_Default_Modules
__LMOD_REF_COUNT_CMAKE_PREFIX_PATH=/share/software/user/open/tcltk/8.6.6:1; export __LMOD_REF_COUNT_CMAKE_PREFIX_PATH
__LMOD_REF_COUNT_CPATH='/share/software/user/open/binutils/2.38/include:1;/share/software/user/open/gcc/12.4.0/include:1'; export __LMOD_REF_COUNT_CPATH
__LMOD_REF_COUNT_LD_LIBRARY_PATH='/share/software/user/open/binutils/2.38/lib:1;/share/software/user/open/gcc/12.4.0/lib64:1;/share/software/user/open/gcc/12.4.0/lib/gcc/x86_64-pc-linux-gnu:1;/share/software/user/open/gcc/12.4.0/lib:1'; export __LMOD_REF_COUNT_LD_LIBRARY_PATH
__LMOD_REF_COUNT_LIBRARY_PATH='/share/software/user/open/binutils/2.38/lib:1;/share/software/user/open/gcc/12.4.0/lib64:1;/share/software/user/open/gcc/12.4.0/lib:1'; export __LMOD_REF_COUNT_LIBRARY_PATH
__LMOD_REF_COUNT_MANPATH='/share/software/user/open/binutils/2.38/share/man:1;/share/software/user/open/gcc/12.4.0/share/man:1;/home/groups/sh_s-dss/share/sdss/software/no_arch/gcc/14.2.0/python/3.13.1/include:1;/home/groups/sh_s-dss/share/sdss/software/no_arch/gcc/14.2.0/python/3.13.1/man/man1:1;/share/software/user/open/valgrind/3.14.0/share/man:1;/share/software/user/open/libffi/3.2.1/share/man:1;/share/software/user/open/sqlite/3.44.2/share/man:1;/share/software/user/open/readline/8.2/share/man:1;/share/software/user/open/ncurses/6.4/share/man:1;/share/software/user/open/tcltk/8.6.6/share/man:1;/share/software/user/open/libressl/3.2.1/share/man:1;/share/software/user/open/zlib/1.2.11/share/man:1;/share/software/user/open/openssl/3.0.7/share/man:1;/share/software/user/open/lmod/lmod/share/man:1;/usr/local/share/man:1;/usr/share/man:1'; export __LMOD_REF_COUNT_MANPATH
__LMOD_REF_COUNT_MODULEPATH='devel:1;/share/software/modules/system:1;/home/users/myoder96/.local/modulefiles:2;/home/groups/sh_s-dss/share/sdss/modules/modulefiles:2;/share/software/modules/math:1;/share/software/modules/devel:1;/share/software/modules/categories:1'; export __LMOD_REF_COUNT_MODULEPATH
__LMOD_REF_COUNT_PATH='/share/software/user/open/binutils/2.38/bin:1;/share/software/user/open/gcc/12.4.0/bin:1;/scratch/users/myoder96/spack_dev/spack/bin:1;/home/groups/sh_s-dss/share/sdss/software/no_arch/gcc/14.2.0/python/3.13.1/bin:1;/share/software/user/open/valgrind/3.14.0/bin:1;/share/software/user/open/sqlite/3.44.2/bin:1;/share/software/user/open/ncurses/6.4/bin:1;/share/software/user/open/tcltk/8.6.6/bin:1;/share/software/user/open/libressl/3.2.1/bin:1;/share/software/user/open/openssl/3.0.7/bin:1;/share/software/user/srcc/bin:2;/usr/local/bin:1;/usr/bin:1;/usr/local/sbin:1;/usr/sbin:1'; export __LMOD_REF_COUNT_PATH
__LMOD_REF_COUNT_PKG_CONFIG_PATH='/home/groups/sh_s-dss/share/sdss/software/no_arch/gcc/14.2.0/python/3.13.1/lib/pkgconfig:1;/share/software/user/open/valgrind/3.14.0/lib/pkgconfig:1;/share/software/user/open/libffi/3.2.1/lib/pkgconfig:1;/share/software/user/open/sqlite/3.44.2/lib/pkgconfig:1;/share/software/user/open/readline/8.2/lib/pkgconfig:1;/share/software/user/open/ncurses/6.4/lib/pkgconfig:1;/share/software/user/open/tcltk/8.6.6/lib/pkgconfig:1;/share/software/user/open/libressl/3.2.1/lib/pkgconfig:1;/share/software/user/open/openssl/3.0.7/lib64/pkgconfig:1'; export __LMOD_REF_COUNT_PKG_CONFIG_PATH
__LMOD_STACK_CC=Z2Nj; export __LMOD_STACK_CC
__LMOD_STACK_CPP=Y3Bw; export __LMOD_STACK_CPP
__LMOD_STACK_CXX=Yysr; export __LMOD_STACK_CXX
__LMOD_STACK_F77=Z2ZvcnRyYW4=; export __LMOD_STACK_F77
__LMOD_STACK_F90=Z2ZvcnRyYW4=; export __LMOD_STACK_F90
__LMOD_STACK_FC=Z2ZvcnRyYW4=; export __LMOD_STACK_FC
```

Solution patch:
diff --git a/.github/workflows/sync-packages.yaml b/.github/workflows/sync-packages.yaml
index 06c8c95b8c..847fb4a89e 100644
--- a/.github/workflows/sync-packages.yaml
+++ b/.github/workflows/sync-packages.yaml
@@ -28,8 +28,9 @@ jobs:
       run: |
         cd spack-packages
         git-filter-repo --quiet --source ../spack \
-                        --path var/spack/repos/ --path-rename var/spack/repos/:python/ \
+                        --path var/spack/repos/ --path-rename var/spack/repos/:repos/ \
                         --path share/spack/gitlab/cloud_pipelines/ --path-rename share/spack/gitlab/cloud_pipelines/:.ci/gitlab/ \
+                        --path var/spack/spack-repo-index.yaml --path-rename var/spack/spack-repo-index.yaml:spack-repo-index.yaml \
                         --refs develop
     - name: Push
       run: |
diff --git a/etc/spack/defaults/repos.yaml b/etc/spack/defaults/repos.yaml
index b14732fd37..d87abaeeb9 100644
--- a/etc/spack/defaults/repos.yaml
+++ b/etc/spack/defaults/repos.yaml
@@ -11,4 +11,4 @@
 #   ~/.spack/repos.yaml
 # -------------------------------------------------------------------------
 repos:
-  - $spack/var/spack/repos/spack_repo/builtin
+  builtin: $spack/var/spack/repos/spack_repo/builtin
diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py
index 828695c59c..97931d6181 100644
--- a/lib/spack/spack/cmd/repo.py
+++ b/lib/spack/spack/cmd/repo.py
@@ -6,7 +6,7 @@
 import shlex
 import sys
 import tempfile
-from typing import Any, List, Optional
+from typing import Any, Dict, Iterable, List, Optional
 
 import llnl.util.tty as tty
 
@@ -93,70 +93,66 @@ def repo_create(args):
     tty.msg("To register it with spack, run this command:", "spack repo add %s" % full_path)
 
 
+def _find_by(repos: Dict[str, str], key: str, path: str) -> Optional[str]:
+    """Find a repository by its namespace or path. This works also if the repo is malformed."""
+    if key in repos:
+        return key
+
+    for name, repo_path in repos.items():
+        if path and spack.util.path.canonicalize_path(repo_path) == path:
+            return name
+        try:
+            if spack.repo.from_path(repo_path).namespace == key:
+                return name
+        except spack.repo.RepoError:
+            continue
+
+    return None
+
+
 def repo_add(args):
     """add a package source to Spack's configuration"""
     path = args.path
 
-    # real_path is absolute and handles substitution.
-    canon_path = spack.util.path.canonicalize_path(path)
-
-    # check if the path exists
-    if not os.path.exists(canon_path):
-        tty.die("No such file or directory: %s" % path)
+    try:
+        repo = spack.repo.from_path(path)
+    except spack.repo.RepoError as e:
+        tty.die(f"Cannot add repository: {e}")
 
-    # Make sure the path is a directory.
-    if not os.path.isdir(canon_path):
-        tty.die("Not a Spack repository: %s" % path)
+    canon_path = spack.util.path.canonicalize_path(path)
 
-    # Make sure it's actually a spack repository by constructing it.
-    repo = spack.repo.from_path(canon_path)
+    repos: Dict[str, str] = spack.config.get("repos", default={}, scope=args.scope)
 
-    # If that succeeds, finally add it to the configuration.
-    repos = spack.config.get("repos", scope=args.scope)
-    if not repos:
-        repos = []
+    existing_key = _find_by(repos, key=repo.namespace, path=canon_path)
 
-    if repo.root in repos or path in repos:
-        tty.die("Repository is already registered with Spack: %s" % path)
+    if existing_key:
+        tty.die(f"Repository is already registered with Spack: {path}")
 
-    repos.insert(0, canon_path)
+    repos[repo.namespace] = canon_path
     spack.config.set("repos", repos, args.scope)
-    tty.msg("Added repo with namespace '%s'." % repo.namespace)
+    tty.msg(f"Added repo with namespace '{repo.namespace}'.")
 
 
 def repo_remove(args):
     """remove a repository from Spack's configuration"""
-    repos = spack.config.get("repos", scope=args.scope)
+    repos: Dict[str, str] = spack.config.get("repos", scope=args.scope)
     namespace_or_path = args.namespace_or_path
 
-    # If the argument is a path, remove that repository from config.
+    # If the argument is a key or value, remove that repository from config.
     canon_path = spack.util.path.canonicalize_path(namespace_or_path)
-    for repo_path in repos:
-        repo_canon_path = spack.util.path.canonicalize_path(repo_path)
-        if canon_path == repo_canon_path:
-            repos.remove(repo_path)
-            spack.config.set("repos", repos, args.scope)
-            tty.msg("Removed repository %s" % repo_path)
-            return
-
-    # If it is a namespace, remove corresponding repo
-    for path in repos:
-        try:
-            repo = spack.repo.from_path(path)
-            if repo.namespace == namespace_or_path:
-                repos.remove(path)
-                spack.config.set("repos", repos, args.scope)
-                tty.msg("Removed repository %s with namespace '%s'." % (repo.root, repo.namespace))
-                return
-        except spack.repo.RepoError:
-            continue
+    existing_key = _find_by(repos, key=namespace_or_path, path=canon_path)
 
-    tty.die("No repository with path or namespace: %s" % namespace_or_path)
+    if existing_key is None:
+        tty.die(f"No repository with path or namespace: {namespace_or_path}")
+
+    del repos[existing_key]
+    spack.config.set("repos", repos, args.scope)
+    tty.msg(f"Removed repository '{namespace_or_path}'.")
 
 
 def repo_list(args):
     """show registered repositories and their namespaces"""
-    roots = spack.config.get("repos", scope=args.scope)
+    roots: Iterable[str] = spack.config.get("repos", scope=args.scope).values()
     repos: List[spack.repo.Repo] = []
     for r in roots:
         try:
@@ -181,9 +177,9 @@ def _get_repo(name_or_path: str) -> Optional[spack.repo.Repo]:
     except spack.repo.RepoError:
         pass
 
-    for repo in spack.config.get("repos"):
+    for path in spack.config.get("repos").values():
         try:
-            r = spack.repo.from_path(repo)
+            r = spack.repo.from_path(path)
         except spack.repo.RepoError:
             continue
         if r.namespace == name_or_path:
diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py
index 76586297af..7820ae5508 100644
--- a/lib/spack/spack/environment/environment.py
+++ b/lib/spack/spack/environment/environment.py
@@ -438,7 +438,7 @@ def _rewrite_relative_repos_paths_on_relocation(env, init_file_dir):
         repos_specs = spack.config.get("repos", default={}, scope=env.scope_name)
         if not repos_specs:
             return
-        for i, entry in enumerate(repos_specs):
+        for name, entry in list(repos_specs.items()):
             repo_path = substitute_path_variables(entry)
             expanded_path = spack.util.path.canonicalize_path(repo_path, default_wd=init_file_dir)
 
@@ -448,7 +448,7 @@ def _rewrite_relative_repos_paths_on_relocation(env, init_file_dir):
 
             tty.debug("Expanding repo path for {0} to {1}".format(entry, expanded_path))
 
-            repos_specs[i] = expanded_path
+            repos_specs[name] = expanded_path
 
         spack.config.set("repos", repos_specs, scope=env.scope_name)
 
diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py
index 6ffe73077a..846a8ea239 100644
--- a/lib/spack/spack/repo.py
+++ b/lib/spack/spack/repo.py
@@ -669,7 +669,7 @@ def from_paths(
     @staticmethod
     def from_config(config: spack.config.Configuration) -> "RepoPath":
         """Create a RepoPath from a configuration object."""
-        repo_dirs = config.get("repos")
+        repo_dirs = config.get("repos").values()
         if not repo_dirs:
             raise NoRepoConfiguredError("Spack configuration contains no package repositories.")
 
@@ -1612,7 +1612,7 @@ def use_repositories(
     Returns:
         Corresponding RepoPath object
     """
-    paths = [getattr(x, "root", x) for x in paths_and_repos]
+    paths = {getattr(x, "root", x): getattr(x, "root", x) for x in paths_and_repos}
     scope_name = f"use-repo-{uuid.uuid4()}"
     repos_key = "repos:" if override else "repos"
     spack.config.CONFIG.push_scope(
diff --git a/lib/spack/spack/schema/repos.py b/lib/spack/spack/schema/repos.py
index f308a037ca..59102e625b 100644
--- a/lib/spack/spack/schema/repos.py
+++ b/lib/spack/spack/schema/repos.py
@@ -5,16 +5,35 @@
 """Schema for repos.yaml configuration file.
 
 .. literalinclude:: _spack_root/lib/spack/spack/schema/repos.py
-   :lines: 14-
+   :lines: 18-
 """
 from typing import Any, Dict
 
 #: Properties for inclusion in other schemas
 properties: Dict[str, Any] = {
-    "repos": {"type": "array", "default": [], "items": {"type": "string"}}
+    "repos": {
+        "oneOf": [
+            {
+                # old format: array of paths
+                "type": "array",
+                "items": {
+                    "type": "string",
+                    "description": "Path to a Spack package repository directory",
+                },
+            },
+            {
+                # new format: dict of namespace => path
+                "type": "object",
+                "additionalProperties": {
+                    "type": "string",
+                    "description": "Path to a Spack package repository directory",
+                },
+            },
+        ],
+        "default": {},
+    }
 }
 
-
 #: Full schema with metadata
 schema = {
     "$schema": "http://json-schema.org/draft-07/schema#",
@@ -23,3 +42,27 @@
     "additionalProperties": False,
     "properties": properties,
 }
+
+
+def update(data: Dict[str, Any]) -> bool:
+    """Update the repos.yaml configuration data to the new format."""
+    if not isinstance(data["repos"], list):
+        return False
+
+    from llnl.util import tty
+
+    from spack.repo import from_path
+
+    # Convert old format [paths...] to new format {namespace: path, ...}
+    repos = {}
+    for path in data["repos"]:
+        try:
+            repo = from_path(path)
+        except Exception as e:
+            tty.warn(f"package repository {path} is disabled due to: {e}")
+            continue
+        if repo.namespace is not None:
+            repos[repo.namespace] = path
+
+    data["repos"] = repos
+    return True
diff --git a/var/spack/repos/spack_repo/builtin/packages/nvtx/package.py b/var/spack/repos/spack_repo/builtin/packages/nvtx/package.py
index 25a6e00f55..c6ec6df3b5 100644
--- a/var/spack/repos/spack_repo/builtin/packages/nvtx/package.py
+++ b/var/spack/repos/spack_repo/builtin/packages/nvtx/package.py
@@ -21,6 +21,7 @@ class Nvtx(Package, PythonExtension):
     version("develop", branch="dev")
     version("3.1.0", sha256="dc4e4a227d04d3da46ad920dfee5f7599ac8d6b2ee1809c9067110fb1cc71ced")
 
+    depends_on("c", type="build")
     depends_on("cxx", type="build")  # generated
 
     variant("python", default=True, description="Install Python bindings.")
diff --git a/var/spack/repos/spack_repo/builtin/packages/tau/package.py b/var/spack/repos/spack_repo/builtin/packages/tau/package.py
index 4eba55f1eb..be0097c485 100644
--- a/var/spack/repos/spack_repo/builtin/packages/tau/package.py
+++ b/var/spack/repos/spack_repo/builtin/packages/tau/package.py
@@ -102,6 +102,12 @@ class Tau(Package):
     variant(
         "rocprofv2", default=False, description="Activates ROCm rocprofiler support", when="@2.34:"
     )
+    variant(
+        "rocprofiler-sdk",
+        default=False,
+        description="Activates ROCm rocprofiler-sdk support",
+        when="@2.34.1:",
+    )
     variant(
         "salt", default=False, description="Activates SALT source instrumentation", when="@2.34:"
     )
@@ -173,6 +179,10 @@ class Tau(Package):
     depends_on("hsa-rocr-dev", when="+rocm")
     depends_on("rocm-smi-lib", when="@2.32.1: +rocm")
     depends_on("rocm-core", when="@2.34: +rocm")
+    depends_on("rocprofiler-sdk@6.2.4:", when="+rocprofiler-sdk")
+    depends_on("hip", when="+rocprofiler-sdk")
+    depends_on("elfutils", when="+rocprofiler-sdk")
+    depends_on("comgr", when="+rocprofiler-sdk")
     depends_on("salt", when="+salt", type="run")
     depends_on("hip", when="@2.34: +roctracer")
     depends_on("java", type="run")  # for paraprof
@@ -192,19 +202,28 @@ class Tau(Package):
     conflicts("+disable-no-pie", when="@:2.33.2")
     patch("unwind.patch", when="@2.29.0")
 
-    conflicts("+rocprofiler", when="+roctracer", msg="Use either rocprofiler or roctracer")
-    conflicts("+rocprofv2", when="+rocprofiler", msg="Rocprofv2 does not need rocprofiler")
-    conflicts("+rocprofv2", when="+roctracer", msg="Rocprofv2 does not need roctracer")
+    conflicts("+rocprofiler", when="+rocprofv2", msg="Use either rocprofiler or rocprofv2")
+    conflicts(
+        "+rocprofiler", when="+rocprofiler-sdk", msg="Use either rocprofiler or rocprofiler-sdk"
+    )
+
+    conflicts("+roctracer", when="+rocprofv2", msg="Use either roctracer or rocprofv2")
+    conflicts("+roctracer", when="+rocprofiler-sdk", msg="Use either roctracer or rocprofiler-sdk")
+
+    conflicts("+rocprofv2", when="+rocprofiler-sdk", msg="Use either rocprofv2 or rocprofiler-sdk")
+
     requires("+rocm", when="+rocprofiler", msg="Rocprofiler requires ROCm")
     requires("+rocm", when="+roctracer", msg="Roctracer requires ROCm")
+    requires("+rocm", when="+rocprofiler-sdk", msg="Rocprofiler-sdk requires ROCm")
 
     requires(
         "+rocprofiler",
         "+roctracer",
         "+rocprofv2",
+        "+rocprofiler-sdk",
         policy="one_of",
         when="+rocm",
-        msg="Using ROCm, select either +rocprofiler, +roctracer or +rocprofv2",
+        msg="Using ROCm, select either +rocprofiler, +roctracer, +rocprofv2 or +rocprofiler-sdk",
     )
 
     # https://github.com/UO-OACISS/tau2/commit/1d2cb6b
@@ -381,6 +400,12 @@ def install(self, spec, prefix):
             options.append("-rocprofiler=%s" % spec["rocprofiler-dev"].prefix)
             options.append("-rocprofv2")
 
+        if "+rocprofiler-sdk" in spec:
+            options.append("-rocprofsdk=%s" % spec["rocprofiler-sdk"].prefix)
+            options.append("-elfutils=%s" % spec["elfutils"].prefix)
+            options.append("-hip=%s" % spec["hip"].prefix)
+            options.append("-comgr=%s" % spec["comgr"].prefix)
+
         if "+adios2" in spec:
             options.append("-adios=%s" % spec["adios2"].prefix)
 
diff --git a/var/spack/spack-repo-index.yaml b/var/spack/spack-repo-index.yaml
new file mode 100644
index 0000000000..12dd1efdb1
--- /dev/null
+++ b/var/spack/spack-repo-index.yaml
@@ -0,0 +1,2 @@
+repo_index:
+- repos/spack_repo/builtin


Test patch:
diff --git a/lib/spack/spack/test/cmd/config.py b/lib/spack/spack/test/cmd/config.py
index d4fcc6bf6a..f203bab1c0 100644
--- a/lib/spack/spack/test/cmd/config.py
+++ b/lib/spack/spack/test/cmd/config.py
@@ -55,7 +55,7 @@ def test_get_config_scope_merged(mock_low_high_config):
         f.write(
             """\
 repos:
-- repo3
+  repo3: repo3
 """
         )
 
@@ -63,17 +63,17 @@ def test_get_config_scope_merged(mock_low_high_config):
         f.write(
             """\
 repos:
-- repo1
-- repo2
+  repo1: repo1
+  repo2: repo2
 """
         )
 
     assert (
         config("get", "repos").strip()
         == """repos:
-- repo1
-- repo2
-- repo3"""
+  repo1: repo1
+  repo2: repo2
+  repo3: repo3"""
     )
 
 
diff --git a/lib/spack/spack/test/cmd/repo.py b/lib/spack/spack/test/cmd/repo.py
index 0254ff15fe..0444d07d1c 100644
--- a/lib/spack/spack/test/cmd/repo.py
+++ b/lib/spack/spack/test/cmd/repo.py
@@ -65,7 +65,7 @@ def test_env_repo_path_vars_substitution(
   specs: []
 
   repos:
-    - $CUSTOM_REPO_PATH
+    current_dir: $CUSTOM_REPO_PATH
 """
             )
         # creating env from manifest file
@@ -74,7 +74,7 @@ def test_env_repo_path_vars_substitution(
         current_dir = os.getcwd()
         with ev.read("test") as newenv:
             repos_specs = spack.config.get("repos", default={}, scope=newenv.scope_name)
-            assert current_dir in repos_specs
+            assert current_dir in repos_specs.values()
 
 
 OLD_7ZIP = b"""\
diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py
index 72b1ecda8a..61b48a9101 100644
--- a/lib/spack/spack/test/config.py
+++ b/lib/spack/spack/test/config.py
@@ -71,7 +71,7 @@ def env_yaml(tmpdir):
         all:
             compiler: [ 'gcc@4.5.3' ]
     repos:
-        - /x/y/z
+        z: /x/y/z
 """
         )
     return env_yaml
@@ -248,8 +248,8 @@ def test_write_to_same_priority_file(mock_low_high_config, compiler_specs):
 #
 # Sample repo data and tests
 #
-repos_low = {"repos": ["/some/path"]}
-repos_high = {"repos": ["/some/other/path"]}
+repos_low = {"repos": {"low": "/some/path"}}
+repos_high = {"repos": {"high": "/some/other/path"}}
 
 # Test setting config values via path in filename
 
@@ -327,7 +327,7 @@ def test_write_list_in_memory(mock_low_high_config):
     spack.config.set("repos", repos_high["repos"], scope="high")
 
     config = spack.config.get("repos")
-    assert config == repos_high["repos"] + repos_low["repos"]
+    assert config == {**repos_high["repos"], **repos_low["repos"]}
 
 
 class MockEnv:
@@ -785,14 +785,15 @@ def test_config_parse_dict_in_list(tmpdir):
             spack.schema.repos.schema,
             """\
 repos:
-- https://foobar.com/foo
-- https://foobar.com/bar
-- error:
-  - abcdef
-- https://foobar.com/baz
+  a: https://foobar.com/foo
+  b: https://foobar.com/bar
+  c:
+    error:
+    - abcdef
+  d: https://foobar.com/baz
 """,
         )
-        assert "repos.yaml:4" in str(e)
+        assert "repos.yaml:2" in str(e)
 
 
 def test_config_parse_str_not_bool(tmpdir):
@@ -914,7 +915,10 @@ def test_single_file_scope(config, env_yaml):
         assert spack.config.get("config:checksum") is True
         assert spack.config.get("config:checksum") is True
         assert spack.config.get("packages:externalmodule:buildable") is False
-        assert spack.config.get("repos") == ["/x/y/z", "$spack/var/spack/repos/spack_repo/builtin"]
+        assert spack.config.get("repos") == {
+            "z": "/x/y/z",
+            "builtin": "$spack/var/spack/repos/spack_repo/builtin",
+        }
 
 
 def test_single_file_scope_section_override(tmpdir, config):
@@ -934,7 +938,7 @@ def test_single_file_scope_section_override(tmpdir, config):
         all:
             target: [ x86_64 ]
     repos:
-        - /x/y/z
+        z: /x/y/z
 """
         )
 
@@ -950,7 +954,10 @@ def test_single_file_scope_section_override(tmpdir, config):
         # from the lower config scopes
         assert spack.config.get("config:checksum") is True
         assert not spack.config.get("packages:externalmodule")
-        assert spack.config.get("repos") == ["/x/y/z", "$spack/var/spack/repos/spack_repo/builtin"]
+        assert spack.config.get("repos") == {
+            "z": "/x/y/z",
+            "builtin": "$spack/var/spack/repos/spack_repo/builtin",
+        }
 
 
 def test_write_empty_single_file_scope(tmpdir):
diff --git a/lib/spack/spack/test/data/config/repos.yaml b/lib/spack/spack/test/data/config/repos.yaml
index 7023e4d68e..bdef18e9f4 100644
--- a/lib/spack/spack/test/data/config/repos.yaml
+++ b/lib/spack/spack/test/data/config/repos.yaml
@@ -1,2 +1,2 @@
 repos:
-  - $spack/var/spack/repos/spack_repo/builtin
+  builtin: $spack/var/spack/repos/spack_repo/builtin
diff --git a/lib/spack/spack/test/repo.py b/lib/spack/spack/test/repo.py
index fe3fcb522f..a69ba13556 100644
--- a/lib/spack/spack/test/repo.py
+++ b/lib/spack/spack/test/repo.py
@@ -11,6 +11,7 @@
 import spack.package_base
 import spack.paths
 import spack.repo
+import spack.schema.repos
 import spack.spec
 import spack.util.file_cache
 import spack.util.naming
@@ -537,7 +538,7 @@ def test_environment_activation_updates_repo_path(tmp_path: pathlib.Path):
         """\
 spack:
     repos:
-    - $env/foo/spack_repo/bar
+        bar: $env/foo/spack_repo/bar
 """
     )
     env = spack.environment.Environment(tmp_path)
@@ -551,3 +552,14 @@ def test_environment_activation_updates_repo_path(tmp_path: pathlib.Path):
         assert any(os.path.samefile(repo_root, r.root) for r in spack.repo.PATH.repos)
 
     assert not any(os.path.samefile(repo_root, r.root) for r in spack.repo.PATH.repos)
+
+
+def test_repo_update(tmp_path: pathlib.Path):
+    existing_root, _ = spack.repo.create_repo(str(tmp_path), namespace="foo")
+    nonexisting_root = str(tmp_path / "nonexisting")
+    config = {"repos": [existing_root, nonexisting_root]}
+    assert spack.schema.repos.update(config)
+    assert config["repos"] == {
+        "foo": existing_root,
+        # non-existing root is removed for simplicity; would be a warning otherwise.
+    }