diff --git a/.ci/gitlab/.gitlab-ci.yml b/.ci/gitlab/.gitlab-ci.yml index e5b7b3312bc..c8767f7dab2 100644 --- a/.ci/gitlab/.gitlab-ci.yml +++ b/.ci/gitlab/.gitlab-ci.yml @@ -1,7 +1,6 @@ stages: [ "generate", "build" ] variables: - SPACK_CI_GENERATE: "generate" SPACK_DISABLE_LOCAL_CONFIG: "1" SPACK_USER_CACHE_PATH: "${CI_PROJECT_DIR}/tmp/_user_cache/" # PR_MIRROR_FETCH_DOMAIN: "https://binaries-prs.spack.io" @@ -43,7 +42,7 @@ default: # TODO: have multiple types of "PR" pipeline here. It would be better if we could # TODO: keep just this one and use a regex to capture the target branch, but so # TODO: far gitlab doesn't support that. - PR_TARGET_REF_NAME: "develop" + PR_TARGET_REF_NAME: "releases/v2026.06" PIPELINE_MIRROR_TEMPLATE: "multi-src-mirrors.yaml.in" OIDC_TOKEN_AUDIENCE: "pr_binary_mirror" @@ -134,6 +133,7 @@ default: - "${CI_PROJECT_DIR}/tmp/_user_cache/cache/providers" - "${CI_PROJECT_DIR}/tmp/_user_cache/cache/tags" variables: + SPACK_CI_GENERATE: "generate" SPACK_CONCRETIZE_JOBS: 8 KUBERNETES_CPU_REQUEST: 8000m KUBERNETES_MEMORY_REQUEST: 16G @@ -152,6 +152,8 @@ default: - runner_unsupported - stale_schedule - job_execution_timeout + - server_timeout_running + - server_timeout_canceling - archived_failure - unmet_prerequisites - scheduler_failure diff --git a/.ci/gitlab/configs/concretizer.yaml b/.ci/gitlab/configs/concretizer.yaml index 9006e2ec56a..51146d5aa6f 100644 --- a/.ci/gitlab/configs/concretizer.yaml +++ b/.ci/gitlab/configs/concretizer.yaml @@ -1,3 +1,5 @@ concretizer: reuse: false unify: false + concretization_cache: + enable: false diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index 3c6601a9cda..75000204040 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -25,8 +25,8 @@ jobs: run: shell: ${{ matrix.system.shell }} steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{inputs.python_version}} - name: Install Python packages diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index d23972aa657..4393c2369a9 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -66,7 +66,7 @@ jobs: make patch unzip which xz python3 python3-devel tree \ cmake bison - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - uses: ./.github/actions/checkout-spack @@ -93,10 +93,10 @@ jobs: run: | brew install bison tree - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.12" - uses: ./.github/actions/checkout-spack @@ -126,7 +126,7 @@ jobs: sudo rm $(command -v gpg gpg2 patchelf) done - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - uses: ./.github/actions/checkout-spack @@ -145,10 +145,10 @@ jobs: runs-on: "windows-latest" steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.12" # TODO: Check why this is needed here and not in spack/spack @@ -184,7 +184,7 @@ jobs: bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \ make patch tcl unzip which xz - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - uses: ./.github/actions/checkout-spack diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0a9112febaa..aecf9fb9d56 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,12 +24,12 @@ jobs: core: ${{ steps.filter.outputs.core }} packages: ${{ steps.filter.outputs.packages }} steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }} with: fetch-depth: 0 # For pull requests it's not necessary to checkout the code - - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 + - uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2 id: filter with: # For merge group events, compare against the target branch (main) diff --git a/.github/workflows/prechecks.yml b/.github/workflows/prechecks.yml index 667de1f23d2..a8516b476a3 100644 --- a/.github/workflows/prechecks.yml +++ b/.github/workflows/prechecks.yml @@ -17,8 +17,8 @@ jobs: validate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.13' - name: Install Python Packages @@ -32,10 +32,10 @@ jobs: style: runs-on: ubuntu-latest steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 2 - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.13' - name: Install Python packages @@ -58,7 +58,7 @@ jobs: ${{ inputs.with_packages == 'true' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: # Depth 2 is required for this check fetch-depth: 2 @@ -77,7 +77,7 @@ jobs: image: ghcr.io/spack/all-pythons:2025-10-10 steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - uses: ./.github/actions/checkout-spack diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index e8b930e3bff..9278b938ee5 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -9,7 +9,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0 + - uses: actions/stale@1e223db275d687790206a7acac4d1a11bd6fe629 # v10.4.0 with: # Issues configuration stale-issue-message: > diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index b5154d1e060..54b0c9ab1fa 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -19,7 +19,7 @@ jobs: pull-requests: write issues: write steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: develop # DO NOT CHANGE @@ -29,7 +29,7 @@ jobs: client-id: ${{ secrets.SPACKBOT_TRIAGE_CLIENT_ID }} private-key: ${{ secrets.SPACKBOT_TRIAGE_PRIVATE_KEY }} - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 - uses: ./.github/actions/checkout-spack - name: Install Python dependencies diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 00a83b098d3..56821891c36 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -37,8 +37,8 @@ jobs: on_develop: false steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} - name: Install System packages @@ -62,8 +62,8 @@ jobs: os: ["macos-15", "macos-15-intel"] python-version: ["3.11"] steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} - name: Install Python packages @@ -82,8 +82,8 @@ jobs: powershell Invoke-Expression -Command "./.ci/windows_test_setup.ps1"; {0} runs-on: windows-latest steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: 3.9 - name: Install Python packages diff --git a/.github/workflows/update-src-mirror.yml b/.github/workflows/update-src-mirror.yml index bbda819ac1c..baefb006ca4 100644 --- a/.github/workflows/update-src-mirror.yml +++ b/.github/workflows/update-src-mirror.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: # Depth 2 is required for this check fetch-depth: 2 @@ -52,7 +52,7 @@ jobs: - name: Configure AWS credentials if: steps.create-mirror.outputs.new-specs == 'true' - uses: aws-actions/configure-aws-credentials@e7f100cf4c008499ea8adda475de1042d6975c7b # v6.2.0 + uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3 with: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: ${{ secrets.AWS_REGION }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 50f8b9a0430..dbe3c57830f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,211 @@ +# Spack packages v2026.06.0 + +The v2026.06.0 release of the spack packages is released along with version 1.2 of +the Spack tool. This release brings new packages and package version updates +and deprecations that are not made available via backports to previous releases. + +## Spack version compatibility + +This release continues to use the v2.2 Package API. This is the Package API +version introduced by the Spack v1.0.0 release. Any Spack version 1.0.0 or newer +is compatible with this release of the packages repo. + +This release was tested against Spack v1.2.0 (63943396d634faa92cb59474df3558ec9b9b2425). +The stack environments used to generate the binary caches use new features +that are part of the Spack 1.2 release. The binary caches themselves are +compatible with any Spack v1.0.0 or newer (any Spack that supports the v3 +URL build cache layout). + +See the [Package API +Documentation](https://spack.readthedocs.io/en/latest/package_api.html) +for full details on package versioning and compatibility. + +## Package statistics + +There are now 8917 packages in the spack-packages builtin repo. This +is up from 8752 in the previous release. + +## New and removed packages + +This release contains a number of deprecations to address CVEs in a number +of projects. + +In addition to new deprecations, all package versions deprecated prior to +the v2026.03 release have been removed with a few exceptions. + +### New packages + +* adios-catalyst +* apfelxx +* aretomo3 +* cimfomfa +* clingo-bootstrap-pgo +* coinmp +* comet +* cosimio +* crux-toolkit +* cry +* dia-umpire-se +* dineof +* epic +* exchcxx +* flamegraph +* fortuno +* g4adept +* g4hepem +* gau2grid +* gauxc +* generalbrokenlines +* gfan +* ghex +* gridtools +* hammer +* helm +* hpckit +* hwmalloc +* hycom +* hypredrive +* icey +* integratorxx +* kagen +* kynema-driver +* kynema-fmb +* kynema-sgf +* kynema-ugf +* lean4 +* libcifpp +* libleidenalg +* libmcfp +* libsegfault +* llhttp +* mille +* nsjail +* nvpl-common +* oc +* omnictl +* oomph +* osmosis +* partons +* partons-elementary-utils +* partons-numa +* pelican +* percolator +* pflare +* pprof +* proteowizard +* py-aiowebdav2 +* py-apprise +* py-asgi-lifespan +* py-ast-serialize +* py-asyncpg +* py-bibtexparser +* py-clarabel +* py-cloudpathlib +* py-coolname +* py-cuda-core +* py-cuda-pathfinder +* py-curryreader +* py-deepmerge +* py-docket +* py-elecsolver +* py-fakeredis +* py-fastobo +* py-gest-api +* py-h3 +* py-hdf5plugin +* py-heavyball +* py-highspy +* py-igwn-auth-utils +* py-imagecorruptions-imaug +* py-imaug +* py-jinja2-humanize-extension +* py-key-value-aio +* py-langchain-core +* py-langchain-protocol +* py-langgraph +* py-langgraph-checkpoint +* py-langgraph-prebuilt +* py-langgraph-sdk +* py-leidenalg +* py-logomaker +* py-lupa +* py-memelite +* py-mmengine +* py-modisco +* py-olmoearth-pretrain-minimal +* py-openai-whisper +* py-opentelemetry-api +* py-opentelemetry-exporter-prometheus +* py-opentelemetry-instrumentation +* py-opentelemetry-sdk +* py-opentelemetry-semantic-conventions +* py-ormsgpack +* py-pathlib-abc +* py-peft +* py-pelicanfs +* py-pendulum +* py-pipcl +* py-plaid +* py-prefect +* py-psims +* py-pycgns +* py-pyevtk +* py-pyfive +* py-pylibjpeg-openjpeg +* py-pymupdf +* py-pymupdf-fonts +* py-pynumpress +* py-pyrodigal-gv +* py-pyrometheus +* py-pyspod +* py-pyteomics +* py-pytest-reportlog +* py-pytest-retry +* py-python-discovery +* py-python-mumps +* py-pytokens +* py-pywinpty +* py-rachis +* py-rassumfrassum +* py-rfc3987-syntax +* py-safe-netrc +* py-scitokens +* py-smolagents +* py-snakemake-storage-plugin-pelican +* py-spectrum-utils +* py-sphinx-github-changelog +* py-tf2onnx +* py-timezonefinder +* py-uuid-utils +* py-uv-build +* py-uv-dynamic-versioning +* py-webdavclient3 +* py-whenever +* py-zensical +* pyrefly +* r-bench +* r-d3r +* r-pepxmltab +* r-profmem +* r-s7 +* r-shinyfiletree +* rocprofiler-compute-viewer +* roounfold +* sage +* saltfm +* sfml +* shtns +* syclomatic +* talosctl +* tofu-ls +* trng +* turbovnc +* velero + +### Removed packages + +* salt + # Spack packages v2026.03.0 The 2026.03.0 release of the spack packages is released out of phase from diff --git a/repos/spack_repo/builtin/build_systems/xorg.py b/repos/spack_repo/builtin/build_systems/xorg.py index 38f12495bce..1cea62b2d8b 100644 --- a/repos/spack_repo/builtin/build_systems/xorg.py +++ b/repos/spack_repo/builtin/build_systems/xorg.py @@ -24,6 +24,8 @@ class XorgPackage(PackageBase): "https://mirror.transip.net/xorg/individual/", "ftp://ftp.freedesktop.org/pub/xorg/individual/", "http://xorg.mirrors.pair.com/individual/", + "https://artfiles.org/x.org/pub/individual/", + "https://xorg.freedesktop.org/releases/individual/", ] @property diff --git a/repos/spack_repo/builtin/packages/_3dtk/package.py b/repos/spack_repo/builtin/packages/_3dtk/package.py index ddb67e2e62f..393314f1a41 100644 --- a/repos/spack_repo/builtin/packages/_3dtk/package.py +++ b/repos/spack_repo/builtin/packages/_3dtk/package.py @@ -16,7 +16,7 @@ class _3dtk(CMakePackage): plane extraction software, etc. Several file formats for the point clouds are natively supported, new formats can be implemented easily.""" - homepage = "https://slam6d.sourceforge.net/" + homepage = "https://slam6d.sourceforge.io/" # Repo seems to be in the process of switching to git: # https://github.com/3DTK/3DTK diff --git a/repos/spack_repo/builtin/packages/_7zip/package.py b/repos/spack_repo/builtin/packages/_7zip/package.py index 3472cd98ad8..16679cf74f2 100644 --- a/repos/spack_repo/builtin/packages/_7zip/package.py +++ b/repos/spack_repo/builtin/packages/_7zip/package.py @@ -18,7 +18,7 @@ class _7zip(SourceforgePackage, Package): """7-Zip is a file archiver for Windows""" homepage = "https://sourceforge.net/projects/sevenzip/" - sourceforge_mirror_path = "sevenzip/files/7z2107-src.tar.xz" + sourceforge_mirror_path = "project/sevenzip/7-Zip/21.07/7z2107-src.tar.xz" tags = ["windows"] executables = ["7z"] diff --git a/repos/spack_repo/builtin/packages/acts/package.py b/repos/spack_repo/builtin/packages/acts/package.py index 7badf672e17..32f098e5c59 100644 --- a/repos/spack_repo/builtin/packages/acts/package.py +++ b/repos/spack_repo/builtin/packages/acts/package.py @@ -206,7 +206,6 @@ class Acts(CMakePackage, CudaPackage): depends_on("geant4", when="+geant4") depends_on("geomodel @6.3.0: +geomodelg4", when="+geomodel") depends_on("geomodel @6.8.0:", when="@43.1: +geomodel ") - depends_on("git-lfs", when="@12.0.0:") depends_on("gperftools", when="+profilecpu") depends_on("gperftools", when="+profilemem") depends_on("hepmc3 @3.2.1:", when="+hepmc3") diff --git a/repos/spack_repo/builtin/packages/adios2/package.py b/repos/spack_repo/builtin/packages/adios2/package.py index 5ab5a3866d7..ee9178b4fbd 100644 --- a/repos/spack_repo/builtin/packages/adios2/package.py +++ b/repos/spack_repo/builtin/packages/adios2/package.py @@ -202,8 +202,11 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage): depends_on("zfp@0.5.1:0.5", when="+zfp") depends_on("sz@2.0.2.0:", when="+sz") depends_on("sz3", when="+sz3") - depends_on("mgard@compat-2022-11-18:", when="+mgard") - depends_on("mgard@compat-2023-01-10:", when="@2.9: +mgard") + + with when("+mgard"): + depends_on("mgard@1.6.0:", when="@2.10:") + depends_on("mgard@compat-2023-01-10:", when="@2.9") + depends_on("mgard@compat-2022-11-18:", when="@:2.8") extends("python", when="+python") depends_on("python", when="+python", type=("build", "run")) diff --git a/repos/spack_repo/builtin/packages/admixtools/package.py b/repos/spack_repo/builtin/packages/admixtools/package.py index 017b806d0ec..b235f7f37ce 100644 --- a/repos/spack_repo/builtin/packages/admixtools/package.py +++ b/repos/spack_repo/builtin/packages/admixtools/package.py @@ -31,6 +31,17 @@ class Admixtools(MakefilePackage): build_directory = "src" + def flag_handler(self, name, flags): + # AdmixTools is old C that relies on the pre-C23 meaning of an + # empty parameter list: `void setgtime ();` is a vague declaration, + # not a claim of "no arguments". GCC 15 defaults to C23, where () + # means (void), so it conflicts with the header's + # `void setgtime(double *time);`. Pin the C17 dialect this code + # was written against. + if name == "cflags": + flags.append("-std=gnu17") + return (flags, None, None) + def edit(self, spec, prefix): makefile = FileFilter("src/Makefile") @@ -39,8 +50,10 @@ def edit(self, spec, prefix): makefile.filter( "override LDLIBS += -lgsl -lopenblas -lm -lnick", "override LDLIBS += -lgsl -lm -lnick " + lapackflags, + string=True, ) + makefile.filter("HOMEL=$(PWD)", "HOMEL=$(CURDIR)", string=True) makefile.filter("TOP=../bin", "TOP=./bin") def install(self, spec, prefix): diff --git a/repos/spack_repo/builtin/packages/amg2023/package.py b/repos/spack_repo/builtin/packages/amg2023/package.py index b3d05ceb74b..19fb3958426 100644 --- a/repos/spack_repo/builtin/packages/amg2023/package.py +++ b/repos/spack_repo/builtin/packages/amg2023/package.py @@ -20,6 +20,8 @@ class Amg2023(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/LLNL/AMG2023" git = "https://github.com/LLNL/AMG2023.git" + maintainers("liruipeng") + license("Apache-2.0") version("develop", branch="main") @@ -28,7 +30,11 @@ class Amg2023(CMakePackage, CudaPackage, ROCmPackage): variant("openmp", default=False, description="Enable OpenMP support") variant("caliper", default=False, description="Enable Caliper monitoring") + # AMG2023's CMake project starts as C, but later enables CXX and links + # the executable with the C++ linker. Both language dependencies are needed + # so Spack's compiler wrappers set CC/CXX and linker wrapper arguments. depends_on("c", type="build") # generated + depends_on("cxx", type="build") depends_on("mpi", when="+mpi") depends_on("hypre+mpi", when="+mpi") @@ -48,10 +54,12 @@ def cmake_args(self): cmake_options.append(self.define_from_variant("AMG_WITH_OMP", "openmp")) cmake_options.append(self.define("HYPRE_PREFIX", self.spec["hypre"].prefix)) if self.spec["hypre"].satisfies("+cuda"): - cmake_options.append("-DAMG_WITH_CUDA=ON") + cmake_options.append(self.define("AMG_WITH_CUDA", True)) + if self.spec["hypre"].satisfies("+rocm"): - cmake_options.append("-DAMG_WITH_HIP=ON") + cmake_options.append(self.define("AMG_WITH_HIP", True)) + if self.spec["hypre"].satisfies("+mpi"): - cmake_options.append("-DAMG_WITH_MPI=ON") + cmake_options.append(self.define("AMG_WITH_MPI", True)) return cmake_options diff --git a/repos/spack_repo/builtin/packages/arrow/package.py b/repos/spack_repo/builtin/packages/arrow/package.py index 02e503380ca..90612daf69d 100644 --- a/repos/spack_repo/builtin/packages/arrow/package.py +++ b/repos/spack_repo/builtin/packages/arrow/package.py @@ -86,6 +86,7 @@ class Arrow(CMakePackage, CudaPackage): depends_on("utf8proc@2.7.0: +shared", when="+compute") depends_on("utf8proc@2.7.0: +shared", when="+gandiva") depends_on("utf8proc@2.7.0: +shared", when="+python") + depends_on("xsimd@13:", when="@23:") depends_on("xsimd@8.1.0:", when="@9.0.0:") depends_on("zlib-api", when="+zlib @9:") depends_on("zlib-api", when="@:8") @@ -93,6 +94,13 @@ class Arrow(CMakePackage, CudaPackage): depends_on("zstd", when="+zstd @9:") depends_on("zstd", when="@:8") + conflicts("@:23 %gcc@:9 ^xsimd@14", msg="Use newer Arrow or newer GCC") + conflicts( + "@23+parquet %gcc@:9", + msg="Arrow 23 requires 'C++20-enabled compiler' to build with parquet support", + ) + conflicts("@24: %gcc@:9", msg="Arrow 24 requires 'C++20-enabled compiler'") + variant("brotli", default=False, description="Build support for Brotli compression") variant("bz2", default=False, description="Build support for bzip2 compression") variant( diff --git a/repos/spack_repo/builtin/packages/atfl/package.py b/repos/spack_repo/builtin/packages/atfl/package.py index 761a683ee27..e27dae9d72c 100644 --- a/repos/spack_repo/builtin/packages/atfl/package.py +++ b/repos/spack_repo/builtin/packages/atfl/package.py @@ -21,27 +21,27 @@ "https://developer.arm.com/packages/arm-toolchains/ubuntu/pool/arm-toolchain-for-linux_22.1-54~noble_arm64.deb", ), "rhel8": ( - "030b4f7456c36cf956ecd82cd7d8b34210f501a9a3214acb9f3c660c1a931fe9", + "73bd1adbcf0bcd4a496ff22229c253a50b8b764ca3b49b1d0dafb8157a9c884a", "https://developer.arm.com/packages/arm-toolchains/rhel/el8/aarch64/arm-toolchain-for-linux-22.1-54.el8.aarch64.rpm", ), "rhel9": ( - "596fd8468fe3d132de168e043ca8a29b6c6fead275d2254ee630f2da27d6b1ae", + "6740b459a8b23bb97058f0d353dc798f1d831be4f2a871527d54bd444c2a3ff9", "https://developer.arm.com/packages/arm-toolchains/rhel/el9/aarch64/arm-toolchain-for-linux-22.1-54.el9.aarch64.rpm", ), "rhel10": ( - "89bd818d8d7b3e30f93a3ace60ab3d269a28c2b3b3e3ded31cd76d89877419ec", + "188c38a4940481caae6d4611cfe0b9255e6c98e706d902ef50471744f365d9c7", "https://developer.arm.com/packages/arm-toolchains/rhel/el10/aarch64/arm-toolchain-for-linux-22.1-54.el10.aarch64.rpm", ), "amzn2023": ( - "48c01cd0bd8063eb55709d1a968aa0fb2465f129558974cff7dbe80e0a3d7785", + "8ff120e5d567535b980b8f8693aad63d4a20c2776bb4a2e4cefad555b38e0b0c", "https://developer.arm.com/packages/arm-toolchains/amazonlinux/al2023/aarch64/arm-toolchain-for-linux-22.1-54.al2023.aarch64.rpm", ), "sles15": ( - "83bab7739d8866453903ed4c9591e34a729e4414517ba290a7af269ed74d862c", + "13ce7001a5c5d0aa9824d4b5e364a021ee728a764e0d1c5518510bb6b2ed24fb", "https://developer.arm.com/packages/arm-toolchains/sles/sles15/aarch64/arm-toolchain-for-linux-22.1-54.sles15.aarch64.rpm", ), "sles16": ( - "48225eb252ca6894c83dbe7b4e8adf93bf316b9e93216794defa198dc50b0cc7", + "948da28e2387588fd7ba4e67c9cd037c74cf7a788ac79fc5f26c306bdc4e955b", "https://developer.arm.com/packages/arm-toolchains/sles/sles16/aarch64/arm-toolchain-for-linux-22.1-54.sles16.aarch64.rpm", ), }, diff --git a/repos/spack_repo/builtin/packages/boost/package.py b/repos/spack_repo/builtin/packages/boost/package.py index d8b0442b034..060a609b027 100644 --- a/repos/spack_repo/builtin/packages/boost/package.py +++ b/repos/spack_repo/builtin/packages/boost/package.py @@ -166,7 +166,7 @@ class Boost(Package): "openmethod": {"when": "@1.90:"}, "mqtt5": {"when": "@1.88:"}, "charconv": {"when": "@1.85:"}, - "cobalt": {"when": "@1.84"}, + "cobalt": {"when": "@1.84:"}, "url": {"when": "@1.81:"}, "json": {"when": "@1.75:"}, "nowide": {"when": "@1.73:"}, @@ -748,7 +748,7 @@ def determine_b2_options(self, spec, options): cxxflags.append("-DBOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK") if cxxflags: - options.append('cxxflags="{0}"'.format(" ".join(cxxflags))) + options.append("cxxflags={0}".format(" ".join(cxxflags))) # Visibility was added in 1.69.0. if spec.satisfies("@1.69.0:"): diff --git a/repos/spack_repo/builtin/packages/bricks/package.py b/repos/spack_repo/builtin/packages/bricks/package.py index de752e0b201..036ad587b8c 100644 --- a/repos/spack_repo/builtin/packages/bricks/package.py +++ b/repos/spack_repo/builtin/packages/bricks/package.py @@ -41,7 +41,7 @@ class Bricks(CMakePackage): depends_on("autoconf", type="build") depends_on("automake", type="build") depends_on("libtool", type="build") - depends_on("opencl-clhpp", when="+cuda") + depends_on("opencl-clhpp@:2", when="+cuda") # See https://github.com/spack/spack-packages/pull/2059#issuecomment-3443184517 for CUDA 13 depends_on("cuda@:12", when="+cuda") depends_on("mpi") diff --git a/repos/spack_repo/builtin/packages/bufr/package.py b/repos/spack_repo/builtin/packages/bufr/package.py index 1891539b0c4..f6d5ba68e56 100644 --- a/repos/spack_repo/builtin/packages/bufr/package.py +++ b/repos/spack_repo/builtin/packages/bufr/package.py @@ -55,6 +55,8 @@ class Bufr(CMakePackage): depends_on("python@3:", type=("build", "run"), when="+python") depends_on("python@:3.11", type=("build", "run"), when="@:12.0 +python") depends_on("py-setuptools", type="build", when="+python") + # f2py uses Meson as its build backend with Python 3.12 and newer. + depends_on("meson", type="build", when="+python ^python@3.12:") depends_on("py-numpy", type=("build", "run"), when="+python") depends_on("py-pip", type="build", when="+python") depends_on("py-wheel", type="build", when="+python") diff --git a/repos/spack_repo/builtin/packages/cargo_c/package.py b/repos/spack_repo/builtin/packages/cargo_c/package.py index 44ce6808d6c..4c422052621 100644 --- a/repos/spack_repo/builtin/packages/cargo_c/package.py +++ b/repos/spack_repo/builtin/packages/cargo_c/package.py @@ -22,5 +22,6 @@ class CargoC(CargoPackage): depends_on("c", type="build") depends_on("openssl") + depends_on("pkgconfig", type="build") depends_on("rust@1.89:", type="build", when="@0.10.17:") depends_on("rust@1.88:", type="build", when="@0.10.16:") diff --git a/repos/spack_repo/builtin/packages/cernlib/fix_build_with_gcc14.patch b/repos/spack_repo/builtin/packages/cernlib/fix_build_with_gcc14.patch new file mode 100644 index 00000000000..7c53eec0211 --- /dev/null +++ b/repos/spack_repo/builtin/packages/cernlib/fix_build_with_gcc14.patch @@ -0,0 +1,163 @@ +--- packlib/cspack/tcpaw/tcpaw.c 2023-08-14 13:45:46.000000000 +0200 ++++ packlib/cspack/tcpaw/tcpaw.c 2026-06-24 10:48:38.624411560 +0200 +@@ -1696,7 +1696,7 @@ + return(i); + } + +-reply(s1, s2, s3) ++void reply(s1, s2, s3) + char *s1, *s2, *s3; + { + #ifdef OSK +@@ -1715,7 +1715,7 @@ + #endif /* LOGFILE */ + } + +-sock_reply(s, s1, s2, s3) ++void sock_reply(s, s1, s2, s3) + int *s; + char *s1, *s2, *s3; + { +@@ -2441,7 +2441,7 @@ + + static FILE *cfile; + +-ruserpass(host, aname, apass) ++void ruserpass(host, aname, apass) + char *host, **aname, **apass; + { + +@@ -2503,7 +2503,7 @@ + if (cfile == NULL) { + if (errno != ENOENT) + perror(buf); +- return; ++ return 0; + } + next: + while ((t = token())) switch(t) { +@@ -2611,7 +2611,7 @@ + #endif + + #ifndef BSDTTY +-#include ++#include + #else + //AV: Newer APPLE requires sys/ioctl_compat.h + #include +@@ -2638,7 +2638,7 @@ + const char *prompt; + { + #ifndef BSDTTY +- struct termio ttyb; ++ struct termios ttyb; + unsigned short flags; + #else + struct sgttyb ttyb; +@@ -2713,9 +2713,9 @@ + const char *pass, const char *cmd, int *fd2p) + #else + # ifdef linux +-_rexec(ahost, rport, name, pass, cmd, fd2p) ++int _rexec(ahost, rport, name, pass, cmd, fd2p) + # else +-rexec(ahost, rport, name, pass, cmd, fd2p) ++int rexec(ahost, rport, name, pass, cmd, fd2p) + # endif /* linux */ + + char **ahost; +@@ -3563,7 +3563,7 @@ + return (-1); + } + +-getstr(sock,buf, cnt, errmesg) ++int getstr(sock,buf, cnt, errmesg) + int sock; + char *buf; + int cnt; /* sizeof() the char array */ +--- packlib/zbook/code/zjump.c 2023-08-14 13:45:46.000000000 +0200 ++++ packlib/zbook/code/zjump.c 2026-06-24 10:48:38.595393011 +0200 +@@ -12,13 +12,13 @@ + #endif + #if defined(CERNLIB_UNIX) + #if defined(CERNLIB_QX_SC) +-zjump_(name,p1,p2,p3,p4) ++void zjump_(name,p1,p2,p3,p4) + #endif + #if defined(CERNLIB_QXNO_SC) +-zjump(name,p1,p2,p3,p4) ++void zjump(name,p1,p2,p3,p4) + #endif + #if defined(CERNLIB_QXCAPT) +-ZJUMP(name,p1,p2,p3,p4) ++void ZJUMP(name,p1,p2,p3,p4) + #endif + char *p1, *p2, *p3, *p4; + /* LP64 compatibility: +@@ -30,11 +30,11 @@ + { + long jadr; + jadr = *name; /* convert int to long */ +- target = (void (*)())jadr; ++ target = (void (*)(char*, char*, char*, char*))jadr; + (*target)(p1, p2, p3, p4); + } + #else +-void (**name)(); ++void (**name)(char*, char*, char*, char*) + { + (**name)(p1, p2, p3, p4); + } +--- pawlib/paw/ntuple/qp_scanner.c 2023-08-14 13:45:46.000000000 +0200 ++++ pawlib/paw/ntuple/qp_scanner.c 2026-06-24 10:48:37.809524281 +0200 +@@ -549,7 +549,7 @@ + result = len; } + */ + +-yy_input_routine( char *buf, int * result, int max_size ) ++void yy_input_routine( char *buf, int * result, int max_size ) + { + /* + int len = max_size > inp_len ? inp_len : max_size; + +--- mathlib/gen/divon/split.F 2023-08-14 13:45:46.000000000 +0200 ++++ mathlib/gen/divon/split.F 2026-06-24 10:48:37.614101789 +0200 +@@ -7,7 +7,7 @@ + * + * + #include "gen/pilot.h" +- SUBROUTINE SPLIT (NDIM,UMINUS,UPLUS,FLOBD,FUPBD,TERMNL,DISCRM,PART ++ SUBROUTINE DIV_SPLIT (NDIM,UMINUS,UPLUS,FLOBD,FUPBD,TERMNL,DISCRM,PART + 1N,BUCKTS,IRBUC) + INTEGER NDIM, DISCRM, IRBUC + LOGICAL TERMNL + +--- mathlib/gen/divon/recpar.F 2023-08-14 13:45:46.000000000 +0200 ++++ mathlib/gen/divon/recpar.F 2026-06-24 10:48:37.613895543 +0200 +@@ -37,7 +37,7 @@ + TERMNL=.FALSE. + IRBUC=IBUC-(MAXWRD*(ENTBUC-1)) + IRBUC=IBUC-(MAXWRD*(ENTBUC-1)) +- CALL SPLIT(NDIM,UMINUS,UPLUS,FLOBD,FUPBD,TERMNL,ITREE,PARTN(ENTRE ++ CALL DIV_SPLIT(NDIM,UMINUS,UPLUS,FLOBD,FUPBD,TERMNL,ITREE,PARTN(ENTRE + 1E),BUCKTS(MAXWRD*(ENTBUC-1)+1),IRBUC) + TREE(4,ENTREE)=-ITREE + IF(TERMNL) RETURN +@@ -67,7 +67,7 @@ + UMINUS(JTREE)=PARTN(PARENT) + 30 IRBUC=IBUC-(MAXWRD*(ENTBUC-1)) + IRBUC=IBUC-(MAXWRD*(ENTBUC-1)) +- CALL SPLIT(NDIM,UMINUS,UPLUS,FLOBD,FUPBD,TERMNL,ITREE,PARTN(ENTRE ++ CALL DIV_SPLIT(NDIM,UMINUS,UPLUS,FLOBD,FUPBD,TERMNL,ITREE,PARTN(ENTRE + 1E),BUCKTS(MAXWRD*(ENTBUC-1)+1),IRBUC) + TREE(4,ENTREE)=-ITREE + IF(.NOT.(.NOT.TERMNL)) GOTO 50 +@@ -120,7 +120,7 @@ + UMINUS(-JTREE)=PARTN(PARENT) + 110 IRBUC=IBUC-(MAXWRD*(ENTBUC-1)) + IRBUC=IBUC-(MAXWRD*(ENTBUC-1)) +- CALL SPLIT(NDIM,UMINUS,UPLUS,FLOBD,FUPBD,TERMNL,ITREE,PARTN(ENTRE ++ CALL DIV_SPLIT(NDIM,UMINUS,UPLUS,FLOBD,FUPBD,TERMNL,ITREE,PARTN(ENTRE + 1E),BUCKTS(MAXWRD*(ENTBUC-1)+1),IRBUC) + TREE(4,ENTREE)=-ITREE + IF(.NOT.(.NOT.TERMNL)) GOTO 130 \ No newline at end of file diff --git a/repos/spack_repo/builtin/packages/cernlib/fix_build_with_gcc16.patch b/repos/spack_repo/builtin/packages/cernlib/fix_build_with_gcc16.patch new file mode 100644 index 00000000000..f9ac29b1997 --- /dev/null +++ b/repos/spack_repo/builtin/packages/cernlib/fix_build_with_gcc16.patch @@ -0,0 +1,78 @@ +--- lapack/SRC/second.f 2026-07-21 12:39:38.694282918 +0200 ++++ lapack/SRC/second.f 2026-07-21 12:40:56.671997850 +0200 +@@ -19,10 +19,6 @@ + * .. Local Arrays .. + REAL TARRAY( 2 ) + * .. +-* .. External Functions .. +- REAL ETIME +- EXTERNAL ETIME +-* .. + * .. Executable Statements .. + * + T1 = ETIME( TARRAY ) +--- lapack/SRC/dsecnd.f 2026-07-21 12:39:57.595939285 +0200 ++++ lapack/SRC/dsecnd.f 2026-07-21 12:41:12.168032327 +0200 +@@ -19,10 +19,6 @@ + * .. Local Arrays .. + REAL TARRAY( 2 ) + * .. +-* .. External Functions .. +- REAL ETIME +- EXTERNAL ETIME +-* .. + * .. Executable Statements .. + * + T1 = ETIME( TARRAY ) +--- lapack/INSTALL/second.f 2026-07-21 12:39:38.694282918 +0200 ++++ lapack/INSTALL/second.f 2026-07-21 12:41:26.347063875 +0200 +@@ -19,10 +19,6 @@ + * .. Local Arrays .. + REAL TARRAY( 2 ) + * .. +-* .. External Functions .. +- REAL ETIME +- EXTERNAL ETIME +-* .. + * .. Executable Statements .. + * + T1 = ETIME( TARRAY ) +--- lapack/INSTALL/dsecnd.f 2026-07-21 12:39:57.595939285 +0200 ++++ lapack/INSTALL/dsecnd.f 2026-07-21 12:42:01.380141824 +0200 +@@ -19,10 +19,6 @@ + * .. Local Arrays .. + REAL TARRAY( 2 ) + * .. +-* .. External Functions .. +- REAL ETIME +- EXTERNAL ETIME +-* .. + * .. Executable Statements .. + * + T1 = ETIME( TARRAY ) +--- lapack/INSTALL/second.f.RS6K 2026-07-21 12:39:38.694306324 +0200 ++++ lapack/INSTALL/second.f.RS6K 2026-07-21 12:42:13.333168420 +0200 +@@ -19,10 +19,6 @@ + * .. Local Arrays .. + REAL TARRAY( 2 ) + * .. +-* .. External Functions .. +- REAL ETIME_ +- EXTERNAL ETIME_ +-* .. + * .. Executable Statements .. + * + T1 = ETIME_( TARRAY ) +--- lapack/INSTALL/dsecnd.f.RS6K 2026-07-21 12:39:57.596043873 +0200 ++++ lapack/INSTALL/dsecnd.f.RS6K 2026-07-21 12:41:47.021109875 +0200 +@@ -19,10 +19,6 @@ + * .. Local Arrays .. + REAL TARRAY( 2 ) + * .. +-* .. External Functions .. +- REAL ETIME_ +- EXTERNAL ETIME_ +-* .. + * .. Executable Statements .. + * + T1 = ETIME_( TARRAY ) diff --git a/repos/spack_repo/builtin/packages/cernlib/package.py b/repos/spack_repo/builtin/packages/cernlib/package.py index 7b4dc9dc6bd..6e53f604bc3 100644 --- a/repos/spack_repo/builtin/packages/cernlib/package.py +++ b/repos/spack_repo/builtin/packages/cernlib/package.py @@ -42,6 +42,11 @@ class Cernlib(CMakePackage): depends_on("openssl", when="platform=linux") + # Fix build with GCC 14 and newer + patch("fix_build_with_gcc14.patch", level=0) + # Fix build with GCC 16 and newer + patch("fix_build_with_gcc16.patch", level=0, when="%gcc@16:") + def patch(self): if self.spec.satisfies("@:2023.08.14.0-free"): filter_file("crypto", "crypt", "packlib/CMakeLists.txt") @@ -52,4 +57,9 @@ def patch(self): def cmake_args(self): args = [self.define_from_variant("CERNLIB_BUILD_SHARED", "shared")] + # The package does not build with C dialects newer than gnu17, so set gnu17 + # for GCC 15 and newer which default to gnu23 + if self.spec.satisfies("%gcc@15:"): + args.append(self.define("CMAKE_C_STANDARD", "17")) + args.append(self.define("CMAKE_C_EXTENSIONS", True)) return args diff --git a/repos/spack_repo/builtin/packages/crunch/package.py b/repos/spack_repo/builtin/packages/crunch/package.py index 91948b7b31e..726de5225c7 100644 --- a/repos/spack_repo/builtin/packages/crunch/package.py +++ b/repos/spack_repo/builtin/packages/crunch/package.py @@ -22,7 +22,8 @@ class Crunch(CMakePackage): # No stable releases since 2012 version("master", branch="build_fixes") - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") depends_on("cmake@3.5:", type="build") diff --git a/repos/spack_repo/builtin/packages/cubelib/package.py b/repos/spack_repo/builtin/packages/cubelib/package.py index e4377e5a3a5..4271bfefe2c 100644 --- a/repos/spack_repo/builtin/packages/cubelib/package.py +++ b/repos/spack_repo/builtin/packages/cubelib/package.py @@ -33,9 +33,22 @@ def url_for_version(self, version): return url.format(version.up_to(2), version) + def clean_compiler(self, compiler): + renames = { + "cce": "cray", + "rocmcc": "amdclang", + "intel-oneapi-compilers": "oneapi", + "llvm": "clang", + } + if compiler in renames: + return renames[compiler] + return compiler + def configure_args(self): configure_args = ["--enable-shared"] configure_args.append("--with-frontend-zlib=%s" % self.spec["zlib-api"].prefix.lib) + cname = self.clean_compiler(self.spec.compiler.name) + configure_args.append("--with-nocross-compiler-suite={0}".format(cname)) return configure_args def install(self, spec, prefix): diff --git a/repos/spack_repo/builtin/packages/cuda/package.py b/repos/spack_repo/builtin/packages/cuda/package.py index ef94df7f24f..9db05147fe7 100644 --- a/repos/spack_repo/builtin/packages/cuda/package.py +++ b/repos/spack_repo/builtin/packages/cuda/package.py @@ -834,7 +834,11 @@ class Cuda(Package): ) # `cuda_installer` binary contained in run script depends on libxml2.so.2 - depends_on("libxml2@:2.13", when="@10.1.243:", type="build") + # To verify this is true in the future: + # 1. stage the installer with `spack stage cuda` + # 2. extract the installer exe with `./cuda_*.run --noexec --target {temp dir}` + # 3. check links with `readelf -d {temp-dir}/cuda_files/cuda-installer` + depends_on("libxml2", when="@10.1.243:", type="build") # cuda-gdb needed libncurses.so.5 before 11.4.0 # see https://docs.nvidia.com/cuda/archive/11.3.1/cuda-gdb/index.html#common-issues-oss # see https://docs.nvidia.com/cuda/archive/11.4.0/cuda-gdb/index.html#release-notes diff --git a/repos/spack_repo/builtin/packages/cusolvermp/package.py b/repos/spack_repo/builtin/packages/cusolvermp/package.py index 84b8c55fa03..5509cb0e692 100644 --- a/repos/spack_repo/builtin/packages/cusolvermp/package.py +++ b/repos/spack_repo/builtin/packages/cusolvermp/package.py @@ -44,6 +44,8 @@ class Cusolvermp(Package, CudaPackage): maintainers("albestro") + redistribute(source=False, binary=False) + # https://docs.nvidia.com/cuda/cusolvermp/license.html license("NVIDIA Software License Agreement") diff --git a/repos/spack_repo/builtin/packages/dyninst/package.py b/repos/spack_repo/builtin/packages/dyninst/package.py index f7d32f90721..8d7181ccefd 100644 --- a/repos/spack_repo/builtin/packages/dyninst/package.py +++ b/repos/spack_repo/builtin/packages/dyninst/package.py @@ -68,6 +68,11 @@ class Dyninst(CMakePackage): conflicts("^intel-tbb@2021.1:") conflicts("^intel-oneapi-tbb@2021.1:") + # See: https://github.com/dyninst/dyninst/pull/2304 + with when("@:13"): + conflicts("^intel-tbb@2023:") + conflicts("^intel-oneapi-tbb@2023:") + depends_on("tbb") requires("^[virtuals=tbb] intel-tbb@2019.9:", when="@13.0.0:") diff --git a/repos/spack_repo/builtin/packages/elmerfem/package.py b/repos/spack_repo/builtin/packages/elmerfem/package.py index ff4fa06030c..9571341e1f4 100644 --- a/repos/spack_repo/builtin/packages/elmerfem/package.py +++ b/repos/spack_repo/builtin/packages/elmerfem/package.py @@ -95,7 +95,7 @@ def cmake_args(self): args.append("-DWITH_Trilinos=OFF") if spec.satisfies("+lua"): - args.extend(["-DWITH_LUA=ON", "-DUSE_SYSTEM_LUA=ON"]) + args.extend(["-DWITH_LUA=ON", "-DUSE_SYSTEM_LUA:BOOL=FALSE"]) if spec.satisfies("%gcc"): args.append("-DCMAKE_Fortran_FLAGS=-ffree-line-length-none") @@ -130,6 +130,10 @@ def patch(self): string=True, ) + # Hypre include fix + if self.spec.satisfies("+hypre"): + filter_file('#include "krylov.h"', '#include "HYPRE_krylov.h"', "fem/src/SolveHypre.c") + def setup_run_environment(self, env: EnvironmentModifications) -> None: env.set("ELMER_HOME", self.prefix) env.set("ELMER_Fortran_COMPILER", self.compiler.fc) diff --git a/repos/spack_repo/builtin/packages/exodusii/package.py b/repos/spack_repo/builtin/packages/exodusii/package.py index 2c61d053d82..5044fe3ff3e 100644 --- a/repos/spack_repo/builtin/packages/exodusii/package.py +++ b/repos/spack_repo/builtin/packages/exodusii/package.py @@ -126,6 +126,7 @@ def cmake_args(self): from_variant("BUILD_TESTING", "tests"), from_variant("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "shared"), from_variant("BUILD_SHARED_LIBS", "shared"), + from_variant("SEACASExodus_ENABLE_SHARED", "shared"), from_variant("SEACASExodus_ENABLE_THREADSAFE", "thread_safe"), from_variant("TPL_ENABLE_Pthread", "thread_safe"), from_variant(project_name_base + "_ENABLE_Fortran", "fortran"), diff --git a/repos/spack_repo/builtin/packages/fenics_basix/mdspan.patch b/repos/spack_repo/builtin/packages/fenics_basix/mdspan.patch new file mode 100644 index 00000000000..25552d2e724 --- /dev/null +++ b/repos/spack_repo/builtin/packages/fenics_basix/mdspan.patch @@ -0,0 +1,12 @@ +--- a/cpp/basix/mdspan.hpp ++++ b/cpp/basix/mdspan.hpp +@@ -2791,7 +2791,7 @@ struct layout_stride { + + MDSPAN_TEMPLATE_REQUIRES( + class IntegralType, +- (std::is_convertible::value) ++ (MDSPAN_IMPL_TRAIT(std::is_convertible, IntegralType, typename extents_type::index_type)) + ) + MDSPAN_INLINE_FUNCTION + // Need to avoid zero length c-array + diff --git a/repos/spack_repo/builtin/packages/fenics_basix/package.py b/repos/spack_repo/builtin/packages/fenics_basix/package.py index f6025fa6e05..87871bba2aa 100644 --- a/repos/spack_repo/builtin/packages/fenics_basix/package.py +++ b/repos/spack_repo/builtin/packages/fenics_basix/package.py @@ -25,6 +25,8 @@ class FenicsBasix(CMakePackage): version("0.9.0", sha256="60e96b2393084729b261cb10370f0e44d12735ab3dbd1f15890dec23b9e85329") version("0.8.0", sha256="b299af82daf8fa3e4845e17f202491fe71b313bf6ab64c767a5287190b3dd7fe") + patch("mdspan.patch", when="@0.10") + variant( "build_type", default="RelWithDebInfo", diff --git a/repos/spack_repo/builtin/packages/fftw/package.py b/repos/spack_repo/builtin/packages/fftw/package.py index 6b794cb18a8..307c5d1a361 100644 --- a/repos/spack_repo/builtin/packages/fftw/package.py +++ b/repos/spack_repo/builtin/packages/fftw/package.py @@ -64,7 +64,7 @@ def libs(self): def flag_handler(self, name, flags): if name == "cflags": - if self.spec.satisfies("%clang@15:"): + if self.spec.satisfies("%clang@15:") or self.spec.satisfies("%gcc@14:"): flags.append("-Wno-error=int-conversion") return flags, None, None diff --git a/repos/spack_repo/builtin/packages/flex/package.py b/repos/spack_repo/builtin/packages/flex/package.py index 70b424e3eb5..3da90ab034f 100644 --- a/repos/spack_repo/builtin/packages/flex/package.py +++ b/repos/spack_repo/builtin/packages/flex/package.py @@ -64,6 +64,13 @@ class Flex(AutotoolsPackage): when="@2.6.4", ) + def setup_build_environment(self, env: EnvironmentModifications) -> None: + # libfl leaves yylex undefined, so it only links as a dylib when libtool passes + # -undefined dynamic_lookup, which it does only for MACOSX_DEPLOYMENT_TARGET=10.* + # See https://github.com/spack/spack-packages/pull/5525 + if self.spec.platform == "darwin": + env.set("MACOSX_DEPLOYMENT_TARGET", "10.16") + def flag_handler(self, name, flags): spec = self.spec if name == "cflags": diff --git a/repos/spack_repo/builtin/packages/fox/package.py b/repos/spack_repo/builtin/packages/fox/package.py index 3e954cbd1c6..a132a67fd03 100644 --- a/repos/spack_repo/builtin/packages/fox/package.py +++ b/repos/spack_repo/builtin/packages/fox/package.py @@ -33,6 +33,7 @@ class Fox(AutotoolsPackage): variant("opengl", default=False, description="opengl support") + depends_on("c", type="build") depends_on("cxx", type="build") # generated depends_on("bzip2") diff --git a/repos/spack_repo/builtin/packages/fp16/package.py b/repos/spack_repo/builtin/packages/fp16/package.py index f58ade3583e..f611db21bef 100644 --- a/repos/spack_repo/builtin/packages/fp16/package.py +++ b/repos/spack_repo/builtin/packages/fp16/package.py @@ -31,7 +31,7 @@ class Fp16(CMakePackage): resource( name="psimd", git="https://github.com/Maratyszcza/psimd.git", - branch="master", + commit="072586a71b55b7f8c584153d223e95687148a900", destination="deps", placement="psimd", ) diff --git a/repos/spack_repo/builtin/packages/gcc/package.py b/repos/spack_repo/builtin/packages/gcc/package.py index 96a57c1ff0b..ef4ad792efb 100644 --- a/repos/spack_repo/builtin/packages/gcc/package.py +++ b/repos/spack_repo/builtin/packages/gcc/package.py @@ -479,6 +479,18 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage, CompilerPackage): # aarch64-darwin support from Iain Sandoe's branch # the 14.2.0 branch has patches applicable to the x86_64 builds too, e.g., https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116809 + patch( + "https://github.com/iains/gcc-16-branch/compare/6afcc4f6da931eb93f3ab001a0dd9650ea71d1ea..gcc-16.1-darwin-r0.patch?full_index=1", + sha256="8d613f218608806db7e264d9d3f4ade4ff3f8a46c4cfece917e8701b1bb01475", + when="@16.1.0 target=aarch64:", + ) + + patch( + "https://github.com/iains/gcc-15-branch/compare/4db0e8df15bef836558857c291c323add11d035c..gcc-15.3-darwin-r0.patch?full_index=1", + sha256="8d6298dcb4f0d5cb419792405888d4e0820a9227da1374cfe413696d755468d7", + when="@15.3.0 target=aarch64:", + ) + patch( "https://github.com/iains/gcc-14-branch/compare/04696df09633baf97cdbbdd6e9929b9d472161d3..5e090fc0112f86cbcaebb6065ad97ea599868505.patch?full_index=1", sha256="d74542461b22ae2d23533323e01861f4c66d252345c51682740f521a74412500", diff --git a/repos/spack_repo/builtin/packages/gettext/package.py b/repos/spack_repo/builtin/packages/gettext/package.py index c7b51f10145..2fa29b1ebd5 100644 --- a/repos/spack_repo/builtin/packages/gettext/package.py +++ b/repos/spack_repo/builtin/packages/gettext/package.py @@ -116,13 +116,18 @@ def configure_args(self): "--disable-java", "--disable-csharp", "--with-included-glib", - "--with-included-gettext", "--with-included-libcroco", "--without-emacs", "--with-lispdir=%s/emacs/site-lisp/gettext" % self.prefix.share, "--without-cvs", ] + # The name of the option to include libintl changed in 1.0 + if spec.satisfies("@1.0:"): + config_args.append("--with-included-libintl") + else: + config_args.append("--with-included-gettext") + # Until we know why we need them, do not build D sources: if spec.satisfies("@0.25:"): config_args.append("--disable-d") diff --git a/repos/spack_repo/builtin/packages/go/package.py b/repos/spack_repo/builtin/packages/go/package.py index 41fe892adb3..8732efc102e 100644 --- a/repos/spack_repo/builtin/packages/go/package.py +++ b/repos/spack_repo/builtin/packages/go/package.py @@ -95,9 +95,9 @@ class Go(Package): depends_on("grep", type="build") depends_on("sed", type="build") - depends_on("go-or-gccgo-bootstrap@1.24:", type="build", when="@1.26:") - depends_on("go-or-gccgo-bootstrap@1.22:", type="build", when="@1.24:") - depends_on("go-or-gccgo-bootstrap@1.20:", type="build", when="@1.22:") + depends_on("go-or-gccgo-bootstrap@1.24.6:", type="build", when="@1.26:") + depends_on("go-or-gccgo-bootstrap@1.22.6:", type="build", when="@1.24:") + depends_on("go-or-gccgo-bootstrap@1.20.6:", type="build", when="@1.22:") depends_on("go-or-gccgo-bootstrap", type="build") phases = ["build", "install"] diff --git a/repos/spack_repo/builtin/packages/hdf5/package.py b/repos/spack_repo/builtin/packages/hdf5/package.py index 0af64014022..2f5716d40af 100644 --- a/repos/spack_repo/builtin/packages/hdf5/package.py +++ b/repos/spack_repo/builtin/packages/hdf5/package.py @@ -612,6 +612,12 @@ def cmake_args(self): if spec.satisfies("@1.14.4: %aocc"): args.append(self.define("HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16", False)) + # pthreads linking issue with older glibc for @1.14.5:1.14.6 as + # discussed in https://github.com/HDFGroup/hdf5/issues/6201 + # Should fix #4083, using work-around as discussed in hdf5 ticket + if self.spec.satisfies("@1.14.5:1.14.6 +shared +threadsafe ^glibc@:2.34"): + # BUILD_SHARED_LIBS and HDF5_ENABLE_THREADSAFE are already set above + args.append(self.define("HDF5_ENABLE_THREADS", True)) return args @run_after("install") diff --git a/repos/spack_repo/builtin/packages/hdf_eos2/package.py b/repos/spack_repo/builtin/packages/hdf_eos2/package.py index 198af3a548d..11cb68cd357 100644 --- a/repos/spack_repo/builtin/packages/hdf_eos2/package.py +++ b/repos/spack_repo/builtin/packages/hdf_eos2/package.py @@ -74,6 +74,8 @@ class HdfEos2(AutotoolsPackage): # Build dependencies depends_on("hdf") + depends_on("hdf +fortran", when="+fortran") + # Because hdf always depends on zlib and jpeg in spack, the tests below in configure_args # (if self.spec.satisfies("^jpeg"):) always returns true and hdf-eos2 wants zlib and jpeg, too. depends_on("zlib-api", when="^hdf") @@ -119,6 +121,24 @@ def fix_configure(self): filter_file("\\$CC -show &> /dev/null", "true", "configure") filter_file("CC=./\\$SZIP_CC", "", "configure") + @run_before("autoreconf", when="@3.0") + def fix_gctp_linking(self): + # In hdf-eos2 3.0, the GCTP library (bundled in gctp/src/libGctp.la) + # is built but never linked into libhdfeos. The source tarball ships + # pre-generated Makefile.in with an empty libhdfeos_la_LIBADD. Patch + # both Makefile.am and Makefile.in before configure runs. + src = self.stage.source_path + # Patch Makefile.am so autoreconf (if it runs) picks it up + with open(join_path(src, "src", "Makefile.am"), "a") as f: + f.write("\nlibhdfeos_la_LIBADD=$(LIBGCTP)\n") + # Patch Makefile.in which configure uses to generate Makefile + filter_file( + "libhdfeos_la_LIBADD =\n", + "libhdfeos_la_LIBADD = $(LIBGCTP)\n", + join_path(src, "src", "Makefile.in"), + string=True, + ) + def flag_handler(self, name, flags): if name == "cflags": flags.append(self.compiler.cc_pic_flag) @@ -130,6 +150,7 @@ def flag_handler(self, name, flags): ): flags.append("-Wno-error=implicit-function-declaration") flags.append("-Wno-error=implicit-int") + flags.append("-std=gnu17") # Testing shows we need one extra flag for gcc@14 if self.spec.satisfies("%gcc@14:"): @@ -148,6 +169,11 @@ def setup_build_environment(self, env: EnvironmentModifications) -> None: # Use h4cc compiler wrapper and flags if self.spec.satisfies("^hdf"): env.set("CC", os.path.join(self.spec["hdf"].prefix.bin, "h4cc")) + # h4cc has a hardcoded compiler path (CCBASE) that bypasses the + # Spack wrappers. Override it via HDF4_CC so h4cc uses the Spack + # compiler wrapper instead. + env.set("HDF4_CC", self.compiler.cc) + env.set("HDF4_CLINKER", self.compiler.cc) if ( self.spec.satisfies("%clang@16:") or self.spec.satisfies("%apple-clang@15:") @@ -155,9 +181,26 @@ def setup_build_environment(self, env: EnvironmentModifications) -> None: or self.spec.satisfies("%gcc@14:") ): env.set( - "CFLAGS", "-Wno-error=implicit-function-declaration -Wno-error=implicit-int" + "CFLAGS", + "-Wno-error=implicit-function-declaration -Wno-error=implicit-int -std=gnu17", ) + @run_before("configure", when="@3.0") + def unset_h4cc_for_configure(self): + # CC=h4cc causes autoconf's cross-compile detection to fail on macOS + # because h4cc produces binaries using hardcoded paths that can't run + # in the configure sandbox. Use the Spack compiler wrapper for configure + # only; h4cc (with HDF4_CC set) takes over for build/install. + os.environ["CC"] = self.compiler.cc + # On macOS the Spack compiler wrappers also prevent autoconf from + # running test programs, causing malloc/realloc/memcmp checks to + # default to "no" and generate rpl_malloc/rpl_realloc stubs that are + # never defined. Pre-seed the cache with the correct values. + if self.spec.satisfies("platform=darwin"): + os.environ["ac_cv_func_malloc_0_nonnull"] = "yes" + os.environ["ac_cv_func_realloc_0_nonnull"] = "yes" + os.environ["ac_cv_func_memcmp_working"] = "yes" + def configure_args(self): extra_args = [] @@ -173,10 +216,10 @@ def configure_args(self): extra_args.extend(self.enable_or_disable("fortran")) # Provide config args for dependencies + # Pass the HDF4 prefix (not lib dir) so configure finds both + # headers and libraries correctly without double-appending /lib. if self.spec.satisfies("^hdf"): - tmp = self.spec["hdf"].libs.directories - if tmp: - extra_args.append("--with-hdf4={0}".format(tmp[0])) + extra_args.append("--with-hdf4={0}".format(self.spec["hdf"].prefix)) if self.spec.satisfies("^jpeg"): # Allow handling whatever provider of jpeg are using tmp = self.spec["jpeg"].libs.directories diff --git a/repos/spack_repo/builtin/packages/imod/package.py b/repos/spack_repo/builtin/packages/imod/package.py index 1f2543486b2..1a0541e72bc 100644 --- a/repos/spack_repo/builtin/packages/imod/package.py +++ b/repos/spack_repo/builtin/packages/imod/package.py @@ -31,7 +31,7 @@ class Imod(MakefilePackage, CudaPackage): depends_on("fortran", type="build") depends_on("java@17:") - depends_on("qt@5.12:") # Can do with 4.6:, but they themselves recommend 5.12+ + depends_on("qt+opengl@5.12:") # Can do with 4.6:, but they themselves recommend 5.12+ depends_on("cuda", when="+cuda") depends_on("libtiff@4:") depends_on("fftw@3:", when="+fftw") @@ -42,8 +42,17 @@ class Imod(MakefilePackage, CudaPackage): depends_on("python", type=("run")) def edit(self, spec, prefix): + # Ensure that Spack-provided tcsh is used + csh = join_path(spec["tcsh"].prefix.bin, "csh") + filter_file("#!/bin/csh", f"#!{csh}", "setup", "manpages/convert", "packMacApps") + configure = Executable("./setup") configure_args = ["-inst", prefix] # Set up prefix + # Try to help the setup script pick the desired compiler + if spec.satisfies("%gcc"): + configure_args.extend(["-compiler", "gnu"]) + elif spec.satisfies("%intel"): + configure_args.extend(["-compiler", "intel"]) configure(*configure_args) if self.spec.satisfies("+cuda"): diff --git a/repos/spack_repo/builtin/packages/intel_oneapi_vtune/package.py b/repos/spack_repo/builtin/packages/intel_oneapi_vtune/package.py index 9ec008cf793..b78f152ed3a 100644 --- a/repos/spack_repo/builtin/packages/intel_oneapi_vtune/package.py +++ b/repos/spack_repo/builtin/packages/intel_oneapi_vtune/package.py @@ -39,6 +39,7 @@ class IntelOneapiVtune(IntelOneApiLibraryPackageWithSdk): "2025.10.1", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c80944e2-5eb4-42fa-9a94-3a198c0d5595/intel-vtune-2025.10.1.16_offline.sh", sha256="8ca8e7bb4a9bb630d63a14b068226ae839522c710aee81b82943962439777294", + expand=False, ) version( "2025.8.1", diff --git a/repos/spack_repo/builtin/packages/ispc/package.py b/repos/spack_repo/builtin/packages/ispc/package.py index b7d6d8cad85..b4297bcb67b 100644 --- a/repos/spack_repo/builtin/packages/ispc/package.py +++ b/repos/spack_repo/builtin/packages/ispc/package.py @@ -125,12 +125,19 @@ def patch(self): Executable(self.compiler.cc)("-m32", "-shared", "check-m32.c", error=str) except ProcessError: # https://github.com/ispc/ispc/commit/3e03dffa8b58e77ea628d614f65763a8fdd90c18 + # For GitLab CI, we need to remove the 32-bit target from the build, as the GitLab + # Runners don't have 32-bit development installed and support Debian-based builds. + cmake_target_file = "cmake/GenerateBuiltins.cmake" if self.spec.satisfies("@1.25:"): + filter_file("--target=x86_64-unknown-unknown", "", cmake_target_file) + filter_file("builtin_to_cpp(32 linux x86)", "", cmake_target_file, string=True) + filter_file('"x86,32"\n', "", "cmake/GenericTargets.cmake") cmake_target_file = "cmake/CommonStdlibBuiltins.cmake" - else: - cmake_target_file = "cmake/GenerateBuiltins.cmake" filter_file("bit 32 64", "bit 64", cmake_target_file) + if self.spec.satisfies("@1.25:"): + filter_file("-isystem", "-isystem ", "cmake/GenerateBuiltins.cmake") + def cmake_args(self): spec = self.spec args = [] diff --git a/repos/spack_repo/builtin/packages/julia/package.py b/repos/spack_repo/builtin/packages/julia/package.py index 1b6431cb6fd..5e9e01b6efe 100644 --- a/repos/spack_repo/builtin/packages/julia/package.py +++ b/repos/spack_repo/builtin/packages/julia/package.py @@ -107,7 +107,7 @@ class Julia(MakefilePackage): depends_on("libblastrampoline@5.13.1:5") depends_on("libgit2@1.9") depends_on("libssh2@1.11:1") - depends_on("llvm@18.1.8 +lld shlib_symbol_version=JL_LLVM_18.0") + depends_on("llvm@18.1.8 +lld shlib_symbol_version=JL_LLVM_18.1") depends_on("openssl@3.5.1:3.5") depends_on("openlibm@0.8.7:0.8", when="+openlibm") depends_on("nghttp2@1.64") diff --git a/repos/spack_repo/builtin/packages/kealib/package.py b/repos/spack_repo/builtin/packages/kealib/package.py index 22586b6a82c..f78592d9998 100644 --- a/repos/spack_repo/builtin/packages/kealib/package.py +++ b/repos/spack_repo/builtin/packages/kealib/package.py @@ -45,7 +45,8 @@ class Kealib(CMakePackage): version("1.4.8", sha256="0f24d8478865abcb17865c8f49c0370095726c529b8ac373ffae018ad3d40a02") version("1.4.7", sha256="ec38751b3b555d3a26f0c7445f2d2cd9d7c3a3502237519a206a50cb58df56ec") - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") depends_on("cmake@3.5:", type="build") depends_on("hdf5+cxx+hl", when="@:1.5.1") diff --git a/repos/spack_repo/builtin/packages/kokkos/package.py b/repos/spack_repo/builtin/packages/kokkos/package.py index 7bee0b8fd1d..afcac273872 100644 --- a/repos/spack_repo/builtin/packages/kokkos/package.py +++ b/repos/spack_repo/builtin/packages/kokkos/package.py @@ -331,6 +331,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): depends_on("kokkos-nvcc-wrapper@develop", when="@develop+wrapper") conflicts("+wrapper", when="~cuda") conflicts("+wrapper", when="+cmake_lang") + requires("%clang", "%cce", "+cmake_lang", policy="any_of", when="~wrapper+cuda") # TODO new major: update c++ std with default_args(multi=False, description="C++ standard"): @@ -443,13 +444,6 @@ def cmake_args(self): spec = self.spec from_variant = self.define_from_variant - if spec.satisfies("~wrapper+cuda") and not ( - spec.satisfies("%clang") or spec.satisfies("%cce") or spec.satisfies("+cmake_lang") - ): - raise InstallError( - "Kokkos requires +wrapper when using +cuda without %clang, %cce or +cmake_lang" - ) - options = [ from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), from_variant("CMAKE_CXX_STANDARD", "cxxstd"), diff --git a/repos/spack_repo/builtin/packages/kokkos_fft/package.py b/repos/spack_repo/builtin/packages/kokkos_fft/package.py index 94bc44d2569..7577bc64f42 100644 --- a/repos/spack_repo/builtin/packages/kokkos_fft/package.py +++ b/repos/spack_repo/builtin/packages/kokkos_fft/package.py @@ -39,7 +39,9 @@ class KokkosFft(CMakePackage): variant("tests", default=False, description="Enable tests") depends_on("cxx", type="build") - depends_on("cmake@3.22:3", type="build") + depends_on("cmake@3.22:", type="build") + depends_on("cmake@:4", type="build", when="@:1") + depends_on("cmake@:3", type="build", when="@:0") depends_on("kokkos +complex_align") depends_on("kokkos@4.7:", when="@1.1:") @@ -59,7 +61,10 @@ class KokkosFft(CMakePackage): depends_on("fftw@3.3:3 ~mpi precision=float,double") requires("^fftw +openmp", when="host_backend=fftw-openmp") depends_on("cuda@11:12", when="device_backend=cufft") - depends_on("hipfft@5.3:6", when="device_backend=hipfft") + with when("device_backend=hipfft"): + depends_on("hipfft@5.3:") + depends_on("hipfft@:7", when="@:1") + depends_on("hipfft@:6", when="@:0") depends_on("intel-oneapi-mkl@2023:2025", when="device_backend=onemkl") def cmake_args(self): diff --git a/repos/spack_repo/builtin/packages/kokkos_kernels/package.py b/repos/spack_repo/builtin/packages/kokkos_kernels/package.py index f67a8fbf034..6f12a5f8c78 100644 --- a/repos/spack_repo/builtin/packages/kokkos_kernels/package.py +++ b/repos/spack_repo/builtin/packages/kokkos_kernels/package.py @@ -241,4 +241,12 @@ def cmake_args(self): layout_value = spec.variants["layouts"].value options.append(self.define(f"KokkosKernels_INST_LAYOUT{layout_value.upper()}", True)) + # kokkos_launch_compiler strips the Spack compiler wrapper on TUs + # tagged -DKOKKOS_DEPENDENCE, which loses SPACK_CXXFLAGS injected by + # the wrapper. Route the spec's cxxflags through CMAKE_CXX_FLAGS so + # they live in the command CMake assembles and survive forwarding. + cxxflags = spec.compiler_flags["cxxflags"] + if cxxflags: + options.append(self.define("CMAKE_CXX_FLAGS", " ".join(cxxflags))) + return options diff --git a/repos/spack_repo/builtin/packages/libevent/package.py b/repos/spack_repo/builtin/packages/libevent/package.py index 041e44ea9a5..ab9575897e5 100644 --- a/repos/spack_repo/builtin/packages/libevent/package.py +++ b/repos/spack_repo/builtin/packages/libevent/package.py @@ -49,6 +49,16 @@ class Libevent(AutotoolsPackage): conflicts("+openssl", when="@:2.0") + @when("@:2.1.12") + def setup_build_environment(self, env: EnvironmentModifications) -> None: + # The extra, pthreads, and openssl libs are linked without libevent_core, so they + # only link as dylibs when libtool passes -undefined dynamic_lookup, which it does + # only for MACOSX_DEPLOYMENT_TARGET=10.* + # Fixed in v2.1.13 and later versions + # See https://github.com/spack/spack-packages/pull/5525 + if self.spec.platform == "darwin": + env.set("MACOSX_DEPLOYMENT_TARGET", "10.16") + def url_for_version(self, version): if version >= Version("2.0.22"): url = "https://github.com/libevent/libevent/releases/download/release-{0}-stable/libevent-{0}-stable.tar.gz" diff --git a/repos/spack_repo/builtin/packages/libfuse/package.py b/repos/spack_repo/builtin/packages/libfuse/package.py index cc54482463c..807aef2248f 100644 --- a/repos/spack_repo/builtin/packages/libfuse/package.py +++ b/repos/spack_repo/builtin/packages/libfuse/package.py @@ -82,7 +82,7 @@ def url_for_version(self, version): patch( "https://src.fedoraproject.org/rpms/fuse3/raw/0519b7bf17c4dd1b31ee704d49f8ed94aa5ba6ab/f/fuse3-gcc11.patch", sha256="3ad6719d2393b46615b5787e71778917a7a6aaa189ba3c3e0fc16d110a8414ec", - when="@3: %gcc@11:", + when="@3:3.10.4 %gcc@11:", ) patch( diff --git a/repos/spack_repo/builtin/packages/libiconv/package.py b/repos/spack_repo/builtin/packages/libiconv/package.py index 8aef62bab89..729736b5bce 100644 --- a/repos/spack_repo/builtin/packages/libiconv/package.py +++ b/repos/spack_repo/builtin/packages/libiconv/package.py @@ -83,3 +83,9 @@ def configure_args(self): def libs(self): shared = self.spec.satisfies("libs=shared") return find_libraries(["libiconv"], root=self.prefix, recursive=True, shared=shared) + + def setup_build_environment(self, env: EnvironmentModifications) -> None: + super().setup_build_environment(env) + + if self.spec.satisfies("@1.18 %intel"): + env.append_flags("CFLAGS", "-std=c11") diff --git a/repos/spack_repo/builtin/packages/libxml2/package.py b/repos/spack_repo/builtin/packages/libxml2/package.py index 937189611f0..11a822c11e1 100644 --- a/repos/spack_repo/builtin/packages/libxml2/package.py +++ b/repos/spack_repo/builtin/packages/libxml2/package.py @@ -211,12 +211,24 @@ def import_module_test(self): class AutotoolsBuilder(AnyBuilder, autotools.AutotoolsBuilder): + def _iconv_option(self): + """Special handling for iconv + iconv can be vendored from libc and in these cases the assumption of a prefix + is not valid. libxml2's build system allows 3 options (yes, no, or a prefix) + to account for this. When iconv comes from glibc or musl pass 'yes' as the + build system intends. + """ + iconv = self.spec["iconv"] + if iconv.name in ("glibc", "musl"): + return "yes" + return iconv.prefix + def configure_args(self): spec = self.spec args = [ "--with-lzma={0}".format(spec["xz"].prefix), - "--with-iconv={0}".format(spec["iconv"].prefix), + "--with-iconv={0}".format(self._iconv_option()), ] if spec.satisfies("+python"): diff --git a/repos/spack_repo/builtin/packages/libxsmm/package.py b/repos/spack_repo/builtin/packages/libxsmm/package.py index f07d7c97319..d901fe8096b 100644 --- a/repos/spack_repo/builtin/packages/libxsmm/package.py +++ b/repos/spack_repo/builtin/packages/libxsmm/package.py @@ -97,7 +97,7 @@ class Libxsmm(MakefilePackage): # A recent `as` is needed to compile libxmss until version 1.17 # (), but not afterwards # (). - depends_on("binutils+ld+gas@2.33:", type="build") + depends_on("binutils+ld+gas@2.33:", type="build", when="@:1.16") # Version 2.0 supports both x86_64 and aarch64 requires("target=x86_64:", "target=aarch64:") diff --git a/repos/spack_repo/builtin/packages/llvm/lldb_python_exe_relative_path.patch b/repos/spack_repo/builtin/packages/llvm/lldb_python_exe_relative_path.patch new file mode 100644 index 00000000000..c1e7d351552 --- /dev/null +++ b/repos/spack_repo/builtin/packages/llvm/lldb_python_exe_relative_path.patch @@ -0,0 +1,31 @@ +diff --git a/lldb/bindings/python/get-python-config.py b/lldb/bindings/python/get-python-config.py +index ae84cbb12..1e4175470 100755 +--- a/lldb/bindings/python/get-python-config.py ++++ b/lldb/bindings/python/get-python-config.py +@@ -45,17 +45,21 @@ def main(): + elif args.variable_name == "LLDB_PYTHON_EXE_RELATIVE_PATH": + tried = list() + exe = sys.executable +- prefix = os.path.realpath(sys.prefix) ++ prefix = sys.prefix + while True: + try: + print(relpath_nodots(exe, prefix)) + break + except ValueError: + tried.append(exe) +- # Retry if the executable is symlinked or similar. +- # This is roughly equal to os.path.islink, except it also works for junctions on Windows. +- if os.path.realpath(exe) != exe: +- exe = os.path.realpath(exe) ++ real_exe_dirname = os.path.realpath(os.path.dirname(exe)) ++ real_prefix = os.path.realpath(prefix) ++ if prefix != real_prefix: ++ prefix = real_prefix ++ exe = os.path.join(real_exe_dirname, os.path.basename(exe)) ++ continue ++ elif os.path.islink(exe): ++ exe = os.path.join(real_exe_dirname, os.readlink(exe)) + continue + else: + print( diff --git a/repos/spack_repo/builtin/packages/llvm/package.py b/repos/spack_repo/builtin/packages/llvm/package.py index 16d93b2270d..0133daa87f9 100644 --- a/repos/spack_repo/builtin/packages/llvm/package.py +++ b/repos/spack_repo/builtin/packages/llvm/package.py @@ -619,9 +619,8 @@ class Llvm(CMakePackage, CudaPackage, LlvmDetection, CompilerPackage): # fix detection of LLDB_PYTHON_EXE_RELATIVE_PATH # see https://reviews.llvm.org/D133513 - # TODO: the patch is not applicable after https://reviews.llvm.org/D141042 but it is not clear - # yet whether we need a version of it for when="@16:" patch("D133513.diff", level=0, when="@14:15+lldb+python") + patch("lldb_python_exe_relative_path.patch", when="@16:+lldb+python") # Fix hwloc@:2.3 (Conditionally disable hwloc@2.0 and hwloc@2.4 code) patch( diff --git a/repos/spack_repo/builtin/packages/llvm_amdgpu/package.py b/repos/spack_repo/builtin/packages/llvm_amdgpu/package.py index 2f45ef3196c..8c0e2ec8c93 100644 --- a/repos/spack_repo/builtin/packages/llvm_amdgpu/package.py +++ b/repos/spack_repo/builtin/packages/llvm_amdgpu/package.py @@ -271,6 +271,7 @@ def cmake_args(self): args = [ self.define("LLVM_ENABLE_Z3_SOLVER", "OFF"), self.define("LLVM_ENABLE_ZLIB", "ON"), + self.define("LLVM_ENABLE_BINDINGS", "OFF"), # prevent OCaml build errors self.define("CLANG_DEFAULT_LINKER", "lld"), self.define("LIBCXXABI_INSTALL_STATIC_LIBRARY", "OFF"), self.define("LLVM_ENABLE_RTTI", "ON"), diff --git a/repos/spack_repo/builtin/packages/magics/package.py b/repos/spack_repo/builtin/packages/magics/package.py index f9845622ff9..38f1cf1ae6b 100644 --- a/repos/spack_repo/builtin/packages/magics/package.py +++ b/repos/spack_repo/builtin/packages/magics/package.py @@ -111,6 +111,10 @@ def patch(self): def cmake_args(self): args = ["-DENABLE_ODB=OFF", "-DENABLE_SPOT=OFF", "-DENABLE_ECCODES=ON"] + # add exception for newer GCC versions to allow incompatible pointer types + if self.spec.satisfies("%gcc@14:"): + args.append(self.define("CMAKE_C_FLAGS", "-Wno-error=incompatible-pointer-types")) + # magics@4.2.4:4.3.1 cannot be built without netcdf if "+netcdf" in self.spec or self.spec.satisfies("@4.1.0:4.3.1"): args.append("-DENABLE_NETCDF=ON") diff --git a/repos/spack_repo/builtin/packages/metis/package.py b/repos/spack_repo/builtin/packages/metis/package.py index 70263a2e9d4..5c765c121f8 100644 --- a/repos/spack_repo/builtin/packages/metis/package.py +++ b/repos/spack_repo/builtin/packages/metis/package.py @@ -20,9 +20,9 @@ class Metis(CMakePackage, MakefilePackage): recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes. """ - homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview" - url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" - list_url = "http://glaros.dtc.umn.edu/gkhome/fsroot/sw/metis/OLD" + homepage = "http://papers.karypis.org/glaros/software/metis/overview.html#metis---serial-graph-partitioning-and-fill-reducing-matrix-ordering" + url = "http://papers.karypis.org/glaros/files/sw/metis/metis-5.1.0.tar.gz" + list_url = "http://papers.karypis.org/glaros/files/sw/metis/OLD" # not a metis developer, just package reviewer! maintainers("mthcrts") diff --git a/repos/spack_repo/builtin/packages/mfem/package.py b/repos/spack_repo/builtin/packages/mfem/package.py index e0e7d762753..6e2bced3dd0 100644 --- a/repos/spack_repo/builtin/packages/mfem/package.py +++ b/repos/spack_repo/builtin/packages/mfem/package.py @@ -882,7 +882,7 @@ def find_optional_library(name, prefix): if "^netlib-scalapack" in strumpack: scalapack = strumpack["scalapack"] sp_opt += ["-I%s" % scalapack.prefix.include] - sp_lib += [ld_flags_from_dirs([scalapack.prefix.lib], ["scalapack"])] + sp_lib += [ld_flags_from_library_list(scalapack.libs)] elif "^scalapack" in strumpack: scalapack = strumpack["scalapack"] sp_opt += [scalapack.headers.cpp_flags] diff --git a/repos/spack_repo/builtin/packages/mivisionx/package.py b/repos/spack_repo/builtin/packages/mivisionx/package.py index de2582212c2..dfb69233077 100644 --- a/repos/spack_repo/builtin/packages/mivisionx/package.py +++ b/repos/spack_repo/builtin/packages/mivisionx/package.py @@ -74,19 +74,21 @@ class Mivisionx(ROCmLibrary, CMakePackage): patch("0002-add-half-include-path-for-tests-6.2.0.patch", when="@6.2.0: +add_tests") def patch(self): - filter_file( - r"${ROCM_PATH}/include/miopen/config.h", - "{0}/include/miopen/config.h".format(self.spec["miopen-hip"].prefix), - "amd_openvx_extensions/CMakeLists.txt", - string=True, - ) - filter_file( - r"${ROCM_PATH}/llvm/bin/clang++", - "{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix), - "amd_openvx/openvx/hipvx/CMakeLists.txt", - "amd_openvx_extensions/amd_nn/nn_hip/CMakeLists.txt", - string=True, - ) + if self.spec.satisfies("+hip"): + # miopen-hip and llvm-amdgpu are spec dependencies for HIP builds only: + filter_file( + r"${ROCM_PATH}/include/miopen/config.h", + f"{self.spec['miopen-hip'].prefix}/include/miopen/config.h", + "amd_openvx_extensions/CMakeLists.txt", + string=True, + ) + filter_file( + r"${ROCM_PATH}/llvm/bin/clang++", + f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++", + "amd_openvx/openvx/hipvx/CMakeLists.txt", + "amd_openvx_extensions/amd_nn/nn_hip/CMakeLists.txt", + string=True, + ) if self.spec.satisfies("@:6.1 + hip"): filter_file( r"${ROCM_PATH}/llvm/bin/clang++", @@ -167,7 +169,8 @@ def patch(self): string=True, ) - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") depends_on("cmake@3.5:", type="build") depends_on("ffmpeg@4.4:", type="build") @@ -239,7 +242,8 @@ def setup_run_environment(self, env: EnvironmentModifications) -> None: env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib) def setup_build_environment(self, env: EnvironmentModifications) -> None: - if self.spec.satisfies("@6.1:"): + # llvm-amdgpu is only a dependency for HIP builds, we can use it only when +hip: + if self.spec.satisfies("@6.1: +hip"): env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") if self.spec.satisfies("+asan"): @@ -257,20 +261,19 @@ def flag_handler(self, name, flags): def cmake_args(self): spec = self.spec - protobuf = spec["protobuf"].prefix.include - args = [ - self.define("CMAKE_CXX_FLAGS", "-I{0}".format(protobuf)), - self.define("AMDRPP_LIBRARIES", "{0}/lib/librpp.so".format(spec["rpp"].prefix)), - self.define("AMDRPP_INCLUDE_DIRS", "{0}/include/rpp".format(spec["rpp"].prefix)), - self.define("CMAKE_INSTALL_PREFIX_PYTHON", spec.prefix), - ] - if self.spec.satisfies("+hip"): - args.append(self.define("BACKEND", "HIP")) - args.append(self.define("HSA_PATH", spec["hsa-rocr-dev"].prefix)) - args.append(self.define("HIP_PATH", spec["hip"].prefix)) - - if self.spec.satisfies("~hip"): - args.append(self.define("BACKEND", "CPU")) + if spec.satisfies("+hip"): + args = [ + self.define("BACKEND", "HIP"), + self.define("HIP_PATH", spec["hip"].prefix), + self.define("HSA_PATH", spec["hsa-rocr-dev"].prefix), + self.define("CMAKE_CXX_FLAGS", f"-I{spec['protobuf'].prefix.include}"), + # rpp is only a dependency for HIP builds, we can use it only when +hip: + self.define("AMDRPP_LIBRARIES", f"{spec['rpp'].prefix}/lib/librpp.so"), + self.define("AMDRPP_INCLUDE_DIRS", f"{spec['rpp'].prefix}/include/rpp"), + self.define("CMAKE_INSTALL_PREFIX_PYTHON", spec.prefix), + ] + else: + args = [self.define("BACKEND", "CPU")] if self.spec.satisfies("@:6.2.0"): args.append( diff --git a/repos/spack_repo/builtin/packages/mmseqs2/package.py b/repos/spack_repo/builtin/packages/mmseqs2/package.py index 8d16e92c055..c93fff47e12 100644 --- a/repos/spack_repo/builtin/packages/mmseqs2/package.py +++ b/repos/spack_repo/builtin/packages/mmseqs2/package.py @@ -51,6 +51,12 @@ class Mmseqs2(CMakePackage, CudaPackage): level=1, ) + @when("@18-8cc5c+cuda") + def patch(self): + filter_file( + r'^(#include "GpuUtil.h")', "\\1\n#include \n", "src/util/gpuserver.cpp" + ) + # apple-clang will build with +openmp with llvm-openmp as a dependency # however when running with real data, it threw segmentation faults conflicts("%apple-clang", when="+openmp") diff --git a/repos/spack_repo/builtin/packages/motif/fix_build_with_gcc14.patch b/repos/spack_repo/builtin/packages/motif/fix_build_with_gcc14.patch new file mode 100644 index 00000000000..e6e9c187bfe --- /dev/null +++ b/repos/spack_repo/builtin/packages/motif/fix_build_with_gcc14.patch @@ -0,0 +1,99 @@ +--- lib/Xm/XpmCrBufFrI.c 2016-03-16 03:10:08.000000000 +0100 ++++ lib/Xm/XpmCrBufFrI.c 2026-06-23 17:51:13.276114016 +0200 +@@ -39,7 +39,7 @@ + #ifdef HAVE_CONFIG_H + #include + #endif +- ++#include + + /* October 2004, source code review by Thomas Biege */ + +--- lib/Xm/Xpmcreate.c 2016-03-16 03:10:08.000000000 +0100 ++++ lib/Xm/Xpmcreate.c 2026-06-23 17:51:13.272284682 +0200 +@@ -42,6 +42,7 @@ + #ifdef HAVE_CONFIG_H + #include + #endif ++#include + + + /* October 2004, source code review by Thomas Biege */ +--- lib/Xm/XpmWrFFrI.c 2016-03-16 03:10:08.000000000 +0100 ++++ lib/Xm/XpmWrFFrI.c 2026-06-23 17:51:13.264367668 +0200 +@@ -36,7 +36,7 @@ + #ifdef HAVE_CONFIG_H + #include + #endif +- ++#include + + /* October 2004, source code review by Thomas Biege */ + +--- lib/Xm/XpmRdFToI.c 2016-03-16 03:10:08.000000000 +0100 ++++ lib/Xm/XpmRdFToI.c 2026-06-23 17:51:13.264270706 +0200 +@@ -36,7 +36,7 @@ + #ifdef HAVE_CONFIG_H + #include + #endif +- ++#include + + /* October 2004, source code review by Thomas Biege */ + +--- lib/Xm/Xpmrgb.c 2016-03-16 03:10:08.000000000 +0100 ++++ lib/Xm/Xpmrgb.c 2026-06-23 17:51:13.211862929 +0200 +@@ -46,7 +46,7 @@ + #ifdef HAVE_CONFIG_H + #include + #endif +- ++#include + + #include "XpmI.h" + #include +--- lib/Xm/XpmCrDatFrI.c 2016-03-16 03:10:08.000000000 +0100 ++++ lib/Xm/XpmCrDatFrI.c 2026-06-23 17:51:13.205282072 +0200 +@@ -36,6 +36,7 @@ + #ifdef HAVE_CONFIG_H + #include + #endif ++#include + + + /* October 2004, source code review by Thomas Biege */ + +--- lib/Xm/XpmI.h 2017-08-17 02:38:43.000000000 +0200 ++++ lib/Xm/XpmI.h 2026-07-19 13:45:15.235914574 +0200 +@@ -129,7 +129,6 @@ + extern FILE *popen(); + #endif + +-#if defined(SYSV) || defined(SVR4) || defined(VMS) || defined(WIN32) || defined (_SVID_SOURCE) + #include + + #ifndef index +@@ -140,11 +139,6 @@ + #define rindex strrchr + #endif + +-#else /* defined(SYSV) || defined(SVR4) || defined(VMS) */ +-#include +-#endif +- +- + + #if defined(SYSV) || defined(SVR4) || defined(VMS) || defined(WIN32) + #ifndef bcopy + +--- demos/unsupported/xmform/xmform.c 2026-07-19 19:58:08.233545067 +0200 ++++ demos/unsupported/xmform/xmform.c 2026-07-19 19:55:59.508397105 +0200 +@@ -54,6 +54,7 @@ + #include + #include + #include ++#include + + static void FillItPlease(); + static void NearlyEvenSpread(); + diff --git a/repos/spack_repo/builtin/packages/motif/package.py b/repos/spack_repo/builtin/packages/motif/package.py index c614ff4fde6..973f7385e34 100644 --- a/repos/spack_repo/builtin/packages/motif/package.py +++ b/repos/spack_repo/builtin/packages/motif/package.py @@ -45,6 +45,8 @@ class Motif(AutotoolsPackage): patch("add_xbitmaps_dependency.patch") # ensure tools/wml/wmluiltok.c has a main function patch("add_wmluiltok_option_main.patch") + # Fix build with GCC 14 and newer + patch("fix_build_with_gcc14.patch", level=0) def patch(self): # fix linking the simple_app demo program @@ -55,6 +57,13 @@ def patch(self): "demos/programs/Exm/simple_app/Makefile.am", ) + def flag_handler(self, name, flags): + # The package does not build with C dialects newer than gnu17, so set gnu17 + # for GCC 15 and newer which default to gnu23 + if name == "cflags" and self.spec.satisfies("%gcc@15:"): + flags.append("-std=gnu17") + return (flags, None, None) + def autoreconf(self, spec, prefix): autoreconf = which("autoreconf", required=True) with working_dir(self.configure_directory): diff --git a/repos/spack_repo/builtin/packages/mvapich/package.py b/repos/spack_repo/builtin/packages/mvapich/package.py index 743e0daf47a..26be288491e 100644 --- a/repos/spack_repo/builtin/packages/mvapich/package.py +++ b/repos/spack_repo/builtin/packages/mvapich/package.py @@ -100,6 +100,8 @@ class Mvapich(MpichEnvironmentModifications, AutotoolsPackage): depends_on("libfabric", when="netmod=ofi") depends_on("slurm", when="process_managers=slurm") depends_on("ucx", when="netmod=ucx") + depends_on("json-c") + depends_on("libnl", when="netmod=ofi") filter_compiler_wrappers("mpicc", "mpicxx", "mpif77", "mpif90", "mpifort", relative_root="bin") diff --git a/repos/spack_repo/builtin/packages/nanoflann/package.py b/repos/spack_repo/builtin/packages/nanoflann/package.py index 74eeb04e993..90f2257cfff 100644 --- a/repos/spack_repo/builtin/packages/nanoflann/package.py +++ b/repos/spack_repo/builtin/packages/nanoflann/package.py @@ -20,7 +20,8 @@ class Nanoflann(CMakePackage): version("1.4.3", sha256="cbcecf22bec528a8673a113ee9b0e134f91f1f96be57e913fa1f74e98e4449fa") version("1.2.3", sha256="5ef4dfb23872379fe9eb306aabd19c9df4cae852b72a923af01aea5e8d7a59c3") - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") def patch(self): filter_file("-mtune=native", "", "CMakeLists.txt") diff --git a/repos/spack_repo/builtin/packages/ncview/package.py b/repos/spack_repo/builtin/packages/ncview/package.py index dbe0444d5f0..fcb2ab9fec4 100644 --- a/repos/spack_repo/builtin/packages/ncview/package.py +++ b/repos/spack_repo/builtin/packages/ncview/package.py @@ -25,6 +25,13 @@ class Ncview(AutotoolsPackage): depends_on("libpng") depends_on("libxaw") + def flag_handler(self, name, flags): + # The package does not build with C dialects newer than gnu17, so set gnu17 + # for GCC 15 and newer which default to gnu23 + if name == "cflags" and self.spec.satisfies("%gcc@15:"): + flags.append("-std=gnu17") + return (flags, None, None) + def patch(self): # Disable the netcdf-c compiler check, save and restore the # modification timestamp of the file to prevent autoreconf. diff --git a/repos/spack_repo/builtin/packages/netcdf_c/cmakelists_mpi_symbols.patch b/repos/spack_repo/builtin/packages/netcdf_c/cmakelists_mpi_symbols.patch new file mode 100644 index 00000000000..441ff22f6f5 --- /dev/null +++ b/repos/spack_repo/builtin/packages/netcdf_c/cmakelists_mpi_symbols.patch @@ -0,0 +1,16 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1911,8 +1911,11 @@ + CHECK_FUNCTION_EXISTS(mktemp HAVE_MKTEMP) + CHECK_FUNCTION_EXISTS(random HAVE_RANDOM) + CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY) +-CHECK_FUNCTION_EXISTS(MPI_Comm_f2c HAVE_MPI_COMM_F2C) +-CHECK_FUNCTION_EXISTS(MPI_Info_f2c HAVE_MPI_INFO_F2C) ++if(MPI_C_COMPILER_INCLUDE_DIRS) ++ set (CMAKE_REQUIRED_INCLUDES "${MPI_C_COMPILER_INCLUDE_DIRS}") ++endif() ++CHECK_SYMBOL_EXISTS(MPI_Comm_f2c "mpi.h" HAVE_MPI_COMM_F2C) ++CHECK_SYMBOL_EXISTS(MPI_Info_f2c "mpi.h" HAVE_MPI_INFO_F2C) + CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE) + CHECK_FUNCTION_EXISTS(getpagesize HAVE_GETPAGESIZE) + CHECK_FUNCTION_EXISTS(sysconf HAVE_SYSCONF) diff --git a/repos/spack_repo/builtin/packages/netcdf_c/package.py b/repos/spack_repo/builtin/packages/netcdf_c/package.py index 3b11b5b7695..27ac63293ad 100644 --- a/repos/spack_repo/builtin/packages/netcdf_c/package.py +++ b/repos/spack_repo/builtin/packages/netcdf_c/package.py @@ -158,6 +158,27 @@ class NetcdfC(CMakePackage, AutotoolsPackage): sha256="5adacbeb7021ba59e6cdb23bb0095c720b9da925b276418c66d5eb9c8ddb0d56", when="@:4.9", ) + # https://github.com/Unidata/netcdf-c/issues/3199 + patch("cmakelists_mpi_symbols.patch", when="build_system=cmake") + + # Address the CVE-2025-14933 vulnerability (https://github.com/advisories/GHSA-cg32-6v27-jr43). + # See https://github.com/Unidata/netcdf-c/pull/3153 + patch( + "https://github.com/Unidata/netcdf-c/commit/0e0cb290673fa5a8056df603a95d6bdc7865e9c4.patch?full_index=1", + sha256="5adacbeb7021ba59e6cdb23bb0095c720b9da925b276418c66d5eb9c8ddb0d56", + when="@:4.9", + ) + + def patch(self): + """Fix bad code in ncgen/CMakeLists.txt that removes + the rpath for dependencies like hdf5.""" + if self.spec.satisfies("build_system=cmake"): + filter_file( + "SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)", + "SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)", + "ncgen/CMakeLists.txt", + string=True, + ) variant("mpi", default=True, description="Enable parallel I/O for netcdf-4") variant("parallel-netcdf", default=False, description="Enable parallel I/O for classic files") @@ -395,6 +416,10 @@ def cmake_args(self): self.define(nc + "ENABLE_LARGE_FILE_SUPPORT", True), self.define_from_variant("NETCDF_ENABLE_LOGGING", "logging"), ] + if any(self.spec.satisfies(s) for s in ["+mpi", "+parallel-netcdf", "^hdf5+mpi~shared"]): + base_cmake_args.append( + self.define("CMAKE_C_COMPILER", pathlib.Path(self.spec["mpi"].mpicc).as_posix()) + ) if "+parallel-netcdf" in self.pkg.spec: base_cmake_args.append(self.define(nc + "ENABLE_PNETCDF", True)) if self.pkg.spec.satisfies("@4.3.1:"): diff --git a/repos/spack_repo/builtin/packages/node_js/package.py b/repos/spack_repo/builtin/packages/node_js/package.py index d9437633c5a..799e0b4d24d 100644 --- a/repos/spack_repo/builtin/packages/node_js/package.py +++ b/repos/spack_repo/builtin/packages/node_js/package.py @@ -257,6 +257,11 @@ def configure_args(self): "--shared-openssl", "--shared-openssl-includes={0}".format(self.spec["openssl"].prefix.include), "--shared-openssl-libpath={0}".format(self.spec["openssl"].prefix.lib), + # Always prefer the CA store from our OpenSSL dependency + # over the bundled Mozilla snapshot. The OPENSSLDIR baked + # into the shared library already points to the right certs + # (mozilla, system, or none) as chosen by the openssl spec. + "--openssl-use-def-ca-store", ] ) diff --git a/repos/spack_repo/builtin/packages/nvhpc/package.py b/repos/spack_repo/builtin/packages/nvhpc/package.py index 4b647f1d667..873191917f6 100644 --- a/repos/spack_repo/builtin/packages/nvhpc/package.py +++ b/repos/spack_repo/builtin/packages/nvhpc/package.py @@ -507,7 +507,7 @@ class Nvhpc(Package, CompilerPackage): homepage = "https://developer.nvidia.com/hpc-sdk" - maintainers("samcmill") + maintainers("cparrott73") tags = ["e4s", "compiler"] skip_version_audit = ["platform=darwin", "platform=windows"] diff --git a/repos/spack_repo/builtin/packages/nvtx/package.py b/repos/spack_repo/builtin/packages/nvtx/package.py index eeb83536a4f..b2ea8952987 100644 --- a/repos/spack_repo/builtin/packages/nvtx/package.py +++ b/repos/spack_repo/builtin/packages/nvtx/package.py @@ -46,6 +46,11 @@ def patch(self): setup = FileFilter("python/setup.py") setup.filter("include_dirs=include_dirs", f"include_dirs=['{include_dir}']", string=True) + def flag_handler(self, name, flags): + if name == "cflags" and self.spec.satisfies("@3.2: %gcc@15:"): + flags.append("-std=gnu17") + return (flags, None, None) + def install(self, spec, prefix): install_tree("c/include", prefix.include) install("c/CMakeLists.txt", prefix) diff --git a/repos/spack_repo/builtin/packages/openblas/package.py b/repos/spack_repo/builtin/packages/openblas/package.py index cde6252ce91..a73688a4ac3 100644 --- a/repos/spack_repo/builtin/packages/openblas/package.py +++ b/repos/spack_repo/builtin/packages/openblas/package.py @@ -558,10 +558,7 @@ def make_defs(self): if self.spec.satisfies("target=m1:"): # Use custom simplified target for macOS ARM procesors: # GENERIC target results in SIGILL - make_defs += [ - "TARGET=VORTEX", - "NO_SVE=1", - ] + make_defs += ["TARGET=VORTEX", "NO_SVE=1"] else: # Try to intelligently add target and architecture flags make_defs += self._microarch_target_args() @@ -691,6 +688,13 @@ def cmake_args(self): self.define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW"), ] + # On macOS the cmake build sets the dylib install name to the build-stage + # path instead of the install prefix, causing downstream packages (e.g. + # py-numpy) to embed a broken rpath. Setting CMAKE_INSTALL_NAME_DIR fixes + # the install name to the real installed lib directory. + if self.spec.satisfies("platform=darwin"): + cmake_defs += [self.define("CMAKE_INSTALL_NAME_DIR", self.spec.prefix.lib)] + if self.spec.satisfies("+dynamic_dispatch"): cmake_defs += [self.define("DYNAMIC_ARCH", "ON")] if self.spec.satisfies("platform=windows"): diff --git a/repos/spack_repo/builtin/packages/opencl_c_headers/package.py b/repos/spack_repo/builtin/packages/opencl_c_headers/package.py index 9fc504ae02a..a0cf2b0ea32 100644 --- a/repos/spack_repo/builtin/packages/opencl_c_headers/package.py +++ b/repos/spack_repo/builtin/packages/opencl_c_headers/package.py @@ -60,7 +60,8 @@ class OpenclCHeaders(CMakePackage): "2020.03.13", sha256="664bbe587e5a0a00aac267f645b7c413586e7bc56dca9ff3b00037050d06f476" ) - depends_on("c", type="build") # generated + depends_on("c", type="build") + depends_on("cmake@3.16:", type="build", when="@2024.10.24:") def cmake_args(self): # Disable testing the headers. They definitely work. diff --git a/repos/spack_repo/builtin/packages/opencl_clhpp/package.py b/repos/spack_repo/builtin/packages/opencl_clhpp/package.py index 049d8cbfaf1..2ea184374d6 100644 --- a/repos/spack_repo/builtin/packages/opencl_clhpp/package.py +++ b/repos/spack_repo/builtin/packages/opencl_clhpp/package.py @@ -33,6 +33,15 @@ class OpenclClhpp(CMakePackage): root_cmakelists_dir = "include" + def cmake_args(self): + # Disable testing the headers + return [ + "-DBUILD_DOCS=OFF", + "-DBUILD_TESTS=OFF", + "-DBUILD_EXAMPLES=OFF", + "-DBUILD_TESTING=OFF", + ] + @run_after("install") def post_install(self): if sys.platform == "darwin": diff --git a/repos/spack_repo/builtin/packages/openmpi/fix-integer-kind-8.patch b/repos/spack_repo/builtin/packages/openmpi/fix-integer-kind-8.patch new file mode 100644 index 00000000000..01f1660f0e5 --- /dev/null +++ b/repos/spack_repo/builtin/packages/openmpi/fix-integer-kind-8.patch @@ -0,0 +1,33 @@ +From 32db65f768caebf4eb8c58420fc4ebe35a606111 Mon Sep 17 00:00:00 2001 +From: Howard Pritchard +Date: Mon, 24 Mar 2025 11:33:42 -0600 +Subject: [PATCH] fortran:fix integer kind=8 problem + +user reported problem on the ompi-users mail list. + +https://www.mail-archive.com/users@lists.open-mpi.org//msg35382.html + +Signed-off-by: Howard Pritchard +--- + ompi/mpi/fortran/use-mpi-f08/bindings/mpi-f-interfaces-bind.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ompi/mpi/fortran/use-mpi-f08/bindings/mpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/bindings/mpi-f-interfaces-bind.h +index 2de875ade72..bbc6b1ad252 100644 +--- a/ompi/mpi/fortran/use-mpi-f08/bindings/mpi-f-interfaces-bind.h ++++ b/ompi/mpi/fortran/use-mpi-f08/bindings/mpi-f-interfaces-bind.h +@@ -4005,12 +4005,12 @@ end subroutine ompi_session_get_info_f + + subroutine ompi_session_get_nth_pset_f(session, info, n, pset_len, pset_name, ierror, pset_name_len) & + BIND(C, name="ompi_session_get_nth_pset_f") +- use, intrinsic :: ISO_C_BINDING, only : C_CHAR, C_INT ++ use, intrinsic :: ISO_C_BINDING, only : C_CHAR + implicit none + INTEGER, INTENT(IN) :: session + INTEGER, INTENT(IN) :: info + INTEGER, INTENT(IN) :: n +- INTEGER(KIND=C_INT), VALUE, INTENT(IN) :: pset_name_len ++ INTEGER, VALUE, INTENT(IN) :: pset_name_len + INTEGER, INTENT(INOUT) :: pset_len + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: pset_name + INTEGER, INTENT(out) :: ierror diff --git a/repos/spack_repo/builtin/packages/openmpi/package.py b/repos/spack_repo/builtin/packages/openmpi/package.py index e6705c2ee58..715177f1225 100644 --- a/repos/spack_repo/builtin/packages/openmpi/package.py +++ b/repos/spack_repo/builtin/packages/openmpi/package.py @@ -453,6 +453,7 @@ class Openmpi(AutotoolsPackage, CudaPackage, ROCmPackage): "1.0", sha256="cf75e56852caebe90231d295806ac3441f37dc6d9ad17b1381791ebb78e21564" ) # libmpi.so.0.0.0 + patch("fix-integer-kind-8.patch", when="@5.0:5.0.10") patch("ad_lustre_rwcontig_open_source.patch", when="@1.6.5") patch("llnl-platforms.patch", when="@1.6.5") patch("configure.patch", when="@1.10.1") diff --git a/repos/spack_repo/builtin/packages/openpmd_api/package.py b/repos/spack_repo/builtin/packages/openpmd_api/package.py index 4e852b6ad53..11460fbeada 100644 --- a/repos/spack_repo/builtin/packages/openpmd_api/package.py +++ b/repos/spack_repo/builtin/packages/openpmd_api/package.py @@ -125,6 +125,13 @@ class OpenpmdApi(CMakePackage): when="@0.16.0", ) + # Python property lifetime fix & pybind11 3.0.2 support + patch( + "https://github.com/openPMD/openPMD-api/pull/1849.patch?full_index=1", + sha256="0fda91f9f1227832766dadacf12bfb5119cd179e60a73ccff15ac8c77b86b7ec", + when="@0.17.0 +python", + ) + extends("python", when="+python") def cmake_args(self): diff --git a/repos/spack_repo/builtin/packages/osg_ca_certs/package.py b/repos/spack_repo/builtin/packages/osg_ca_certs/package.py index 71de5e1a3b2..8487ca9f7b4 100644 --- a/repos/spack_repo/builtin/packages/osg_ca_certs/package.py +++ b/repos/spack_repo/builtin/packages/osg_ca_certs/package.py @@ -47,12 +47,15 @@ class OsgCaCerts(Package): destination="letsencrypt-certificates-master", ) + depends_on("gmake", type="build") + depends_on("perl", type="build") + depends_on("openssl") def setup_build_environment(self, env: EnvironmentModifications) -> None: - env.set("OSG_CERTS_VERSION", self.version[:2]) + env.set("OSG_CERTS_VERSION", str(self.version[:2])) env.set("OUR_CERTS_VERSION", str(self.version[:2]) + "NEW") - env.set("IGTF_CERTS_VERSION", self.version[3:]) + env.set("IGTF_CERTS_VERSION", str(self.version[3:])) env.set("CADIST", join_path(self.stage.source_path, "certificates")) env.set("PKG_NAME", self.spec.name) diff --git a/repos/spack_repo/builtin/packages/osu_micro_benchmarks/package.py b/repos/spack_repo/builtin/packages/osu_micro_benchmarks/package.py index 16b5715312f..7244b1bada0 100644 --- a/repos/spack_repo/builtin/packages/osu_micro_benchmarks/package.py +++ b/repos/spack_repo/builtin/packages/osu_micro_benchmarks/package.py @@ -77,7 +77,7 @@ def configure_args(self): config_args.append("NVCCFLAGS=" + " ".join(self.cuda_flags(cuda_arch))) if "+rocm" in spec: - config_args.extend(["--with-rocm=%s" % spec["hip"].prefix]) + config_args.extend(["--enable-rocm", "--with-rocm=%s" % spec["hip"].prefix]) if spec.satisfies("+xccl"): config_args.extend(["--enable-rcclomb", "--with-rccl=%s" % spec["rccl"].prefix]) rocm_arch = spec.variants["amdgpu_target"].value diff --git a/repos/spack_repo/builtin/packages/parmetis/package.py b/repos/spack_repo/builtin/packages/parmetis/package.py index eff485b3d72..edcb0cb15b8 100644 --- a/repos/spack_repo/builtin/packages/parmetis/package.py +++ b/repos/spack_repo/builtin/packages/parmetis/package.py @@ -15,9 +15,9 @@ class Parmetis(CMakePackage): algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices.""" - homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview" - url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz" - list_url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD" + homepage = "http://papers.karypis.org/glaros/software/metis/overview.html#parmetis---parallel-graph-partitioning-and-fill-reducing-matrix-ordering" + url = "http://papers.karypis.org/glaros/files/sw/parmetis/parmetis-4.0.3.tar.gz" + list_url = "http://papers.karypis.org/glaros/files/sw/parmetis/OLD/" version("4.0.3", sha256="f2d9a231b7cf97f1fee6e8c9663113ebf6c240d407d3c118c55b3633d6be6e5f") version("4.0.2", sha256="5acbb700f457d3bda7d4bb944b559d7f21f075bb6fa4c33f42c261019ef2f0b2") diff --git a/repos/spack_repo/builtin/packages/podio/package.py b/repos/spack_repo/builtin/packages/podio/package.py index 74283cab62d..7a2f5a1acb7 100644 --- a/repos/spack_repo/builtin/packages/podio/package.py +++ b/repos/spack_repo/builtin/packages/podio/package.py @@ -104,6 +104,13 @@ class Podio(CMakePackage): sha256="9e42e0995634f2afdd358cd19383e882dc9143cce1b6afb0d2c4a1ec9add6e15", ) + # fmt 12 patch: see https://github.com/AIDASoft/podio/pull/977 + patch( + "https://github.com/AIDASoft/podio/commit/988961b7172b8f1ad7d89450cd8cddd4413e1564.patch?full_index=1", + when="@1.3:1.7", + sha256="b291e1ebc5b73f15d0ce76b9f9211644dc7a4fe9920fbede7f2fb77382d65251", + ) + # See https://github.com/AIDASoft/podio/pull/599 that landed after 0.99 extends("python", when="@1.0:") diff --git a/repos/spack_repo/builtin/packages/professor/package.py b/repos/spack_repo/builtin/packages/professor/package.py index 67709dea16e..222050455fe 100644 --- a/repos/spack_repo/builtin/packages/professor/package.py +++ b/repos/spack_repo/builtin/packages/professor/package.py @@ -38,7 +38,7 @@ class Professor(Package): extends("python") def setup_build_environment(self, env: EnvironmentModifications) -> None: - env.set("PROF_VERSION", self.spec.version) + env.set("PROF_VERSION", str(self.spec.version)) def install(self, spec, prefix): make() diff --git a/repos/spack_repo/builtin/packages/prrte/package.py b/repos/spack_repo/builtin/packages/prrte/package.py index 33b0e90d840..f598e6f57b4 100644 --- a/repos/spack_repo/builtin/packages/prrte/package.py +++ b/repos/spack_repo/builtin/packages/prrte/package.py @@ -118,11 +118,17 @@ def configure_args(self): config_args = ["--enable-shared", "--enable-static", "--disable-sphinx"] # libevent - config_args.append("--with-libevent={0}".format(spec["libevent"].prefix)) + config_args.append(f"--with-libevent={spec['libevent'].prefix}") + + if spec["libevent"].libs.directories: + libevent_libdir = spec["libevent"].libs.directories[0] + else: + libevent_libdir = spec["libevent"].prefix.lib + config_args.append(f"--with-libevent-libdir={libevent_libdir}") # hwloc - config_args.append("--with-hwloc={0}".format(spec["hwloc"].prefix)) + config_args.append(f"--with-hwloc={spec['hwloc'].prefix}") # pmix - config_args.append("--with-pmix={0}".format(spec["pmix"].prefix)) + config_args.append(f"--with-pmix={spec['pmix'].prefix}") # schedulers # see prte_check_X.m4 files in diff --git a/repos/spack_repo/builtin/packages/pthreadpool/package.py b/repos/spack_repo/builtin/packages/pthreadpool/package.py index 67037f607c3..ec806bbc00c 100644 --- a/repos/spack_repo/builtin/packages/pthreadpool/package.py +++ b/repos/spack_repo/builtin/packages/pthreadpool/package.py @@ -34,7 +34,7 @@ class Pthreadpool(CMakePackage): resource( name="fxdiv", git="https://github.com/Maratyszcza/FXdiv.git", - branch="master", + commit="63058eff77e11aa15bf531df5dd34395ec3017c8", destination="deps", placement="fxdiv", ) diff --git a/repos/spack_repo/builtin/packages/py_arcgis/package.py b/repos/spack_repo/builtin/packages/py_arcgis/package.py index 9d2a015b438..e0242a7cc15 100644 --- a/repos/spack_repo/builtin/packages/py_arcgis/package.py +++ b/repos/spack_repo/builtin/packages/py_arcgis/package.py @@ -33,7 +33,7 @@ class PyArcgis(PythonPackage): depends_on("py-requests-toolbelt", type=("build", "run")) depends_on("py-requests-ntlm", type=("build", "run")) - @when("^py-pip@23.1:") + @when("^py-pip@23.1: ^py-setuptools@64:") def config_settings(self, spec, prefix): return {"--global-option": "--conda-install-mode"} diff --git a/repos/spack_repo/builtin/packages/py_fprettify/fprettify370_pr176.patch b/repos/spack_repo/builtin/packages/py_fprettify/fprettify370_pr176.patch new file mode 100644 index 00000000000..a2212412aef --- /dev/null +++ b/repos/spack_repo/builtin/packages/py_fprettify/fprettify370_pr176.patch @@ -0,0 +1,13 @@ +diff --git a/fprettify/__init__.py b/fprettify/__init__.py +index d6450a3..76add49 100644 +--- a/fprettify/__init__.py ++++ b/fprettify/__init__.py +@@ -269,7 +269,7 @@ class plusminus_parser(parser_re): + LR_OPS_RE = [REL_OP_RE, LOG_OP_RE, plusminus_parser(PLUSMINUS_RE), MULTDIV_RE, PRINT_RE] + + USE_RE = re.compile( +- SOL_STR + "USE(\s+|(,.+?)?::\s*)\w+?((,.+?=>.+?)+|,\s*only\s*:.+?)?$" + EOL_STR, RE_FLAGS) ++ SOL_STR + r"USE(\s+|(,.+?)?::\s*)\w+?((,.+?=>.+?)+|,\s*only\s*:.+?)?$" + EOL_STR, RE_FLAGS) + + # markups to deactivate formatter + NO_ALIGN_RE = re.compile(SOL_STR + r"&\s*[^\s*]+") diff --git a/repos/spack_repo/builtin/packages/py_fprettify/package.py b/repos/spack_repo/builtin/packages/py_fprettify/package.py index f22e1580793..1af1a0a9914 100644 --- a/repos/spack_repo/builtin/packages/py_fprettify/package.py +++ b/repos/spack_repo/builtin/packages/py_fprettify/package.py @@ -20,3 +20,6 @@ class PyFprettify(PythonPackage): depends_on("py-setuptools", type="build") depends_on("py-configargparse", type=("build", "run")) + + # https://github.com/fortran-lang/fprettify/pull/176 + patch("fprettify370_pr176.patch", when="@0.3.7") diff --git a/repos/spack_repo/builtin/packages/py_furo/package.py b/repos/spack_repo/builtin/packages/py_furo/package.py index 432115d5d82..311174b1b4f 100644 --- a/repos/spack_repo/builtin/packages/py_furo/package.py +++ b/repos/spack_repo/builtin/packages/py_furo/package.py @@ -28,8 +28,8 @@ class PyFuro(PythonPackage): depends_on("py-sphinx-theme-builder@0.2.0a10:", type="build") depends_on("py-beautifulsoup4", type=("build", "run")) - depends_on("py-sphinx@6:7", type=("build", "run")) - depends_on("py-sphinx@7:10", type=("build", "run"), when="@2025.12.19:") + depends_on("py-sphinx@6:7", type=("build", "run"), when="@:2024.7.18") + depends_on("py-sphinx@7:9", type=("build", "run"), when="@2025.12.19:") depends_on("py-sphinx-basic-ng@1.0.0b2:", type=("build", "run")) depends_on("py-pygments@2.7:", type=("build", "run")) depends_on("py-accessible-pygments@0.0.5:", type=("build", "run"), when="@2025.07.19:") diff --git a/repos/spack_repo/builtin/packages/py_libclang/package.py b/repos/spack_repo/builtin/packages/py_libclang/package.py index 6dc84df1ffe..06a9da07c7d 100644 --- a/repos/spack_repo/builtin/packages/py_libclang/package.py +++ b/repos/spack_repo/builtin/packages/py_libclang/package.py @@ -35,7 +35,10 @@ class PyLibclang(PythonPackage): depends_on("py-setuptools", type="build") for ver in ["9", "10", "11", "13", "14", "15", "16", "17", "18"]: - depends_on("llvm+clang@" + ver, when="@" + ver, type="build") + depends_on("llvm+clang@" + ver, when="@" + ver, type=("build", "run", "link")) + + def setup_run_environment(self, env): + env.prepend_path("LD_LIBRARY_PATH", self.spec["llvm"].libs.directories[0]) def patch(self): if self.version >= Version("14"): diff --git a/repos/spack_repo/builtin/packages/py_llvmlite/package.py b/repos/spack_repo/builtin/packages/py_llvmlite/package.py index a2f5dcdf468..b992704e1bd 100644 --- a/repos/spack_repo/builtin/packages/py_llvmlite/package.py +++ b/repos/spack_repo/builtin/packages/py_llvmlite/package.py @@ -62,6 +62,17 @@ class PyLlvmlite(PythonPackage): depends_on("llvm@14", when="@0.41:0.43") depends_on("llvm@11:14", when="@0.40") depends_on("llvm@11", when="@0.37:0.39") + + # On macOS, llvmlite must link the platform (system) libc++. If the LLVM + # dependency ships its own libc++/libunwind runtime (libcxx=runtime, + # libunwind=runtime), both that runtime and the system libc++ get loaded + # into the host Python process at JIT time. C++ objects allocated by one + # runtime are then freed by the other, producing crashes such as + # "malloc: pointer being freed was not allocated" / "Abort trap: 6". + # Requiring the platform C++ runtime keeps a single libc++ in the process. + # See https://github.com/spack/spack-packages/issues/5403 + depends_on("llvm libcxx=none libunwind=none", when="platform=darwin") + for t in [ "arm:", "ppc:", diff --git a/repos/spack_repo/builtin/packages/py_lxml/package.py b/repos/spack_repo/builtin/packages/py_lxml/package.py index ddfd54baea5..dd3990dd952 100644 --- a/repos/spack_repo/builtin/packages/py_lxml/package.py +++ b/repos/spack_repo/builtin/packages/py_lxml/package.py @@ -64,3 +64,11 @@ class PyLxml(PythonPackage): depends_on("py-cython@3.0.9:", type="build", when="@5.1.1:") depends_on("py-cython@3.0.8:", type="build", when="@5:") depends_on("py-cython@0.29.7:", type="build") + + def flag_handler(self, name, flags): + if name == "cflags": + if self.spec.satisfies("@:5") and ( + self.spec.satisfies("%gcc@14:") or self.spec.satisfies("%oneapi@2026:") + ): + flags.append("-Wno-error=incompatible-pointer-types") + return (flags, None, None) diff --git a/repos/spack_repo/builtin/packages/py_mypy/package.py b/repos/spack_repo/builtin/packages/py_mypy/package.py index 3be6e0f309d..e72bce9226c 100644 --- a/repos/spack_repo/builtin/packages/py_mypy/package.py +++ b/repos/spack_repo/builtin/packages/py_mypy/package.py @@ -81,12 +81,11 @@ class PyMypy(PythonPackage): depends_on("python@3.8:", when="@1.5:") depends_on("python@3.7:", when="@0.981:") - depends_on("py-typing-extensions@4.14:", when="@1.20.2: ^python@3.15:") - with when("^python@:3.14"): - depends_on("py-typing-extensions@4.6:", when="@1.11:") - depends_on("py-typing-extensions@4.1:", when="@1.5:") - depends_on("py-typing-extensions@3.10:", when="@0.930:") - depends_on("py-typing-extensions@3.7.4:", when="@0.700:") + depends_on("py-typing-extensions@4.14:", when="^python@3.15:") + depends_on("py-typing-extensions@4.6:", when="@1.11:") + depends_on("py-typing-extensions@4.1:", when="@1.5:") + depends_on("py-typing-extensions@3.10:", when="@0.930:") + depends_on("py-typing-extensions@3.7.4:", when="@0.700:") depends_on("py-mypy-extensions@1:", when="@1.1:") depends_on("py-mypy-extensions@0.4.3:", when="@0.930:1.0") diff --git a/repos/spack_repo/builtin/packages/py_nanobind/package.py b/repos/spack_repo/builtin/packages/py_nanobind/package.py index a9dbe4101df..b7a3e04177d 100644 --- a/repos/spack_repo/builtin/packages/py_nanobind/package.py +++ b/repos/spack_repo/builtin/packages/py_nanobind/package.py @@ -86,6 +86,8 @@ class PyNanobind(PythonPackage): depends_on("py-setuptools@42:", when="@:2.0", type="build") depends_on("py-scikit-build", when="@:2.0", type="build") depends_on("py-typing-extensions", when="@2.0", type="build") + + depends_on("gmake", type="build") depends_on("ninja", when="@2.0", type="build") depends_on("cmake@3.17:", when="@:2.0", type="build") diff --git a/repos/spack_repo/builtin/packages/py_numpy/package.py b/repos/spack_repo/builtin/packages/py_numpy/package.py index a6967ab0a12..cc68aae959a 100644 --- a/repos/spack_repo/builtin/packages/py_numpy/package.py +++ b/repos/spack_repo/builtin/packages/py_numpy/package.py @@ -268,6 +268,14 @@ def flag_handler(self, name, flags): if gcc_version <= Version("5.1"): flags.append(self.compiler.c99_flag) + if self.spec.satisfies("@1.26 ^intel-oneapi-compilers@2025.2") and name in ( + "cflags", + "cxxflags", + "fflags", + ): + flags = [flag for flag in flags if not flag.startswith("-O")] + flags.append("-O1") + return (flags, None, None) def _blas_lapack_pkg_config_mkl(self, spec) -> str: diff --git a/repos/spack_repo/builtin/packages/py_pspamm/package.py b/repos/spack_repo/builtin/packages/py_pspamm/package.py index fa9952176f3..fd97f996f99 100644 --- a/repos/spack_repo/builtin/packages/py_pspamm/package.py +++ b/repos/spack_repo/builtin/packages/py_pspamm/package.py @@ -25,9 +25,8 @@ class PyPspamm(PythonPackage): depends_on("py-numpy", when="+numpy") depends_on("py-scipy", when="+scipy") - - def install(self, spec, prefix): - install_tree(".", prefix) + depends_on("py-setuptools", type="build") + depends_on("py-wheel", type="build") def setup_run_environment(self, env: EnvironmentModifications) -> None: env.prepend_path("PATH", self.spec.prefix) diff --git a/repos/spack_repo/builtin/packages/py_pycparser/package.py b/repos/spack_repo/builtin/packages/py_pycparser/package.py index 64f3655d350..e41835fd7db 100644 --- a/repos/spack_repo/builtin/packages/py_pycparser/package.py +++ b/repos/spack_repo/builtin/packages/py_pycparser/package.py @@ -27,7 +27,10 @@ class PyPycparser(PythonPackage): with default_args(type="build"): depends_on("c") - depends_on("py-setuptools@69:", when="@3:") + # Upstream repo indicates py-setuptools@69, but a newer version + # is required to compile this package. + # See: https://github.com/spack/spack-packages/pull/5356 + depends_on("py-setuptools@77:", when="@3:") depends_on("py-setuptools") with default_args(type=("build", "run")): diff --git a/repos/spack_repo/builtin/packages/py_pynacl/package.py b/repos/spack_repo/builtin/packages/py_pynacl/package.py index e27f46f91e9..7c7ce608d8c 100644 --- a/repos/spack_repo/builtin/packages/py_pynacl/package.py +++ b/repos/spack_repo/builtin/packages/py_pynacl/package.py @@ -17,7 +17,8 @@ class PyPynacl(PythonPackage): version("1.5.0", sha256="8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba") version("1.4.0", sha256="54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505") - depends_on("c", type="build") # generated + depends_on("c", type="build") + depends_on("gmake", type="build") depends_on("python@2.7:2.8,3.4:", type=("build", "run")) depends_on("python@3.6:", type=("build", "run"), when="@1.5.0:") diff --git a/repos/spack_repo/builtin/packages/py_pyomo/package.py b/repos/spack_repo/builtin/packages/py_pyomo/package.py index e019b0f309b..82bb855beea 100644 --- a/repos/spack_repo/builtin/packages/py_pyomo/package.py +++ b/repos/spack_repo/builtin/packages/py_pyomo/package.py @@ -141,7 +141,7 @@ class PyPyomo(PythonPackage): depends_on("py-pandas", when="@6.1:+optional", type=("run")) depends_on("py-seaborn", when="@6.1:+optional", type=("run")) - @when("^py-pip@23.1:") + @when("^py-pip@23.1: ^py-setuptools@64:") def config_settings(self, spec, prefix): if "+cython" in self.spec: return {"--global-option": "--with-cython"} diff --git a/repos/spack_repo/builtin/packages/py_pyyaml/package.py b/repos/spack_repo/builtin/packages/py_pyyaml/package.py index fcb78ed70ad..a716c0781ba 100644 --- a/repos/spack_repo/builtin/packages/py_pyyaml/package.py +++ b/repos/spack_repo/builtin/packages/py_pyyaml/package.py @@ -76,7 +76,7 @@ def import_modules(self): return modules - @when("^py-pip@23.1:") + @when("^py-pip@23.1: ^py-setuptools@64:") def config_settings(self, spec, prefix): if "+libyaml" in self.spec: return {"--global-option": "--with-libyaml"} diff --git a/repos/spack_repo/builtin/packages/py_torch/air_gapped_nnpack_cmake.patch b/repos/spack_repo/builtin/packages/py_torch/air_gapped_nnpack_cmake.patch new file mode 100644 index 00000000000..a1a9f2201d3 --- /dev/null +++ b/repos/spack_repo/builtin/packages/py_torch/air_gapped_nnpack_cmake.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/EnvVarForwarding.cmake b/cmake/EnvVarForwarding.cmake +index a31ce6db266..258d458099e 100644 +--- a/cmake/EnvVarForwarding.cmake ++++ b/cmake/EnvVarForwarding.cmake +@@ -42,6 +42,7 @@ set(_ENV_PASSTHROUGH + TORCH_XPU_ARCH_LIST + TRACING_BASED + PYTHON_LIB_REL_PATH ++ PYTHON_SIX_SOURCE_DIR + ) + + # Low-priority aliases: if the canonical var is not set, use the alias. +diff --git a/cmake/External/nnpack.cmake b/cmake/External/nnpack.cmake +index 8a4a310d629..2491d4e2cc2 100644 +--- a/cmake/External/nnpack.cmake ++++ b/cmake/External/nnpack.cmake +@@ -46,6 +46,9 @@ if(ANDROID OR IOS OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAM + + # Directories for NNPACK dependencies submoduled in Caffe2 + set(PYTHON_PEACHPY_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/python-peachpy" CACHE STRING "PeachPy (Python package) source directory") ++ if(NOT DEFINED PYTHON_SIX_SOURCE_DIR AND DEFINED ENV{PYTHON_SIX_SOURCE_DIR}) ++ set(PYTHON_SIX_SOURCE_DIR "$ENV{PYTHON_SIX_SOURCE_DIR}" CACHE STRING "six (Python package) source directory") ++ endif() + if(NOT DEFINED CPUINFO_SOURCE_DIR) + set(CPUINFO_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/cpuinfo" CACHE STRING "cpuinfo source directory") + endif() diff --git a/repos/spack_repo/builtin/packages/py_torch/air_gapped_nnpack_cmake_older.patch b/repos/spack_repo/builtin/packages/py_torch/air_gapped_nnpack_cmake_older.patch new file mode 100644 index 00000000000..63b7f9ce1d1 --- /dev/null +++ b/repos/spack_repo/builtin/packages/py_torch/air_gapped_nnpack_cmake_older.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/External/nnpack.cmake b/cmake/External/nnpack.cmake +index 8a4a310d629..2491d4e2cc2 100644 +--- a/cmake/External/nnpack.cmake ++++ b/cmake/External/nnpack.cmake +@@ -46,6 +46,9 @@ if(ANDROID OR IOS OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAM + + # Directories for NNPACK dependencies submoduled in Caffe2 + set(PYTHON_PEACHPY_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/python-peachpy" CACHE STRING "PeachPy (Python package) source directory") ++ if(NOT DEFINED PYTHON_SIX_SOURCE_DIR AND DEFINED ENV{PYTHON_SIX_SOURCE_DIR}) ++ set(PYTHON_SIX_SOURCE_DIR "$ENV{PYTHON_SIX_SOURCE_DIR}" CACHE STRING "six (Python package) source directory") ++ endif() + if(NOT DEFINED CPUINFO_SOURCE_DIR) + set(CPUINFO_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/cpuinfo" CACHE STRING "cpuinfo source directory") + endif() +diff --git a/tools/setup_helpers/cmake.py b/tools/setup_helpers/cmake.py +index 88f0fe5d309..9cf2e478f5d 100644 +--- a/tools/setup_helpers/cmake.py ++++ b/tools/setup_helpers/cmake.py +@@ -294,6 +294,7 @@ class CMake: + "TORCH_XPU_ARCH_LIST", + "TRACING_BASED", + "PYTHON_LIB_REL_PATH", ++ "PYTHON_SIX_SOURCE_DIR", + ) + } + ) diff --git a/repos/spack_repo/builtin/packages/py_torch/envvar-forwarding-188242.patch b/repos/spack_repo/builtin/packages/py_torch/envvar-forwarding-188242.patch new file mode 100644 index 00000000000..8caebcc974b --- /dev/null +++ b/repos/spack_repo/builtin/packages/py_torch/envvar-forwarding-188242.patch @@ -0,0 +1,91 @@ +diff --git a/cmake/EnvVarForwarding.cmake b/cmake/EnvVarForwarding.cmake +index a31ce6db266..68f77a4e3f8 100644 +--- a/cmake/EnvVarForwarding.cmake ++++ b/cmake/EnvVarForwarding.cmake +@@ -70,33 +70,61 @@ foreach(_var IN LISTS _ENV_PASSTHROUGH) + endif() + endforeach() + +-# Forward all BUILD_*, USE_*, CMAKE_* env vars not already set as CMake +-# variables, plus vars ending in EXITCODE or EXITCODE__TRYRUN_OUTPUT. +-# This matches the existing behavior where setup.py passed everything with +-# these prefixes/suffixes through to CMake. +-# We use execute_process + env to get the full list since CMake has no +-# built-in way to enumerate environment variables. ++# Forward all BUILD_*, USE_*, CMAKE_* environment variables (plus names ending ++# in EXITCODE / EXITCODE__TRYRUN_OUTPUT) into the CMake cache, mirroring the -D ++# flags setup.py used to pass. ++# ++# CMake cannot enumerate environment variables, and serializing the whole ++# environment to text and re-parsing it in CMake is unsafe: values such as PS1 ++# contain ';' and '\' (and some exported shell functions even contain newlines), ++# all of which collide with CMake's list, escape, and line semantics and ++# silently corrupt unrelated variables. The top-level CMakeLists.txt already ++# requires Python (find_package(Python COMPONENTS Interpreter REQUIRED)) before ++# including this module, so read os.environ directly there -- the full ++# environment is never serialized -- and have it emit only the selected, ++# properly escaped cache assignments for CMake to evaluate. ++ ++# Applies one forwarded variable. An explicitly-set environment variable takes ++# priority, matching the -D semantics this module emulates: override the cache ++# (do not merely fill when undefined) so a value left by an earlier env-less ++# configure -- an option() default or a ninja-triggered reconfigure -- cannot ++# permanently shadow the environment. ++function(_envfwd_apply _name _value) ++ if(NOT DEFINED ${_name} OR NOT "${${_name}}" STREQUAL "${_value}") ++ set(${_name} "${_value}" CACHE STRING "From environment" FORCE) ++ endif() ++endfunction() ++ ++# Reads os.environ and prints `_envfwd_apply("" "")` for each ++# selected variable, escaping the value for a CMake double-quoted argument. ++set(_envfwd_script [==[ ++import os, re, sys ++ ++select = re.compile(r"^(BUILD_|USE_|CMAKE_)|(EXITCODE|EXITCODE__TRYRUN_OUTPUT)$") ++ ++def q(s): ++ # Escape for a CMake double-quoted argument. Backslash and quote are ++ # structural; '$' is escaped to suppress ${}/$ENV{} expansion. ';' and ++ # newlines are literal inside quotes and need no escaping. ++ return s.replace("\\", "\\\\").replace('"', '\\"').replace("$", "\\$") ++ ++sys.stdout.write("\n".join( ++ '_envfwd_apply("%s" "%s")' % (q(name), q(value)) ++ for name, value in os.environ.items() ++ if select.search(name) ++)) ++]==]) ++ + execute_process( +- COMMAND "${CMAKE_COMMAND}" -E environment +- OUTPUT_VARIABLE _all_env +- OUTPUT_STRIP_TRAILING_WHITESPACE ++ COMMAND "${Python_EXECUTABLE}" -c "${_envfwd_script}" ++ OUTPUT_VARIABLE _envfwd_code ++ RESULT_VARIABLE _envfwd_rc + ) +-string(REPLACE "\n" ";" _env_lines "${_all_env}") +-foreach(_line IN LISTS _env_lines) +- if(_line MATCHES "^([A-Za-z_0-9]+)=(.*)") +- set(_var_name "${CMAKE_MATCH_1}") +- set(_var_value "${CMAKE_MATCH_2}") +- # Only forward vars with BUILD_/USE_/CMAKE_ prefix or *EXITCODE* suffix. +- string(REGEX MATCH "^(BUILD_|USE_|CMAKE_)" _has_prefix "${_var_name}") +- string(REGEX MATCH "(EXITCODE|EXITCODE__TRYRUN_OUTPUT)$" _has_suffix "${_var_name}") +- if(NOT _has_prefix AND NOT _has_suffix) +- continue() +- endif() +- if(NOT DEFINED ${_var_name}) +- set(${_var_name} "${_var_value}" CACHE STRING "From environment" FORCE) +- endif() +- endif() +-endforeach() ++if(NOT _envfwd_rc EQUAL 0) ++ message(FATAL_ERROR ++ "EnvVarForwarding: failed to read the environment via Python (exit ${_envfwd_rc}).") ++endif() ++cmake_language(EVAL CODE "${_envfwd_code}") + + # Low-priority aliases + foreach(_alias IN LISTS _LOW_PRIORITY_ALIASES) diff --git a/repos/spack_repo/builtin/packages/py_torch/package.py b/repos/spack_repo/builtin/packages/py_torch/package.py index c17b5061546..6c76063cb1a 100644 --- a/repos/spack_repo/builtin/packages/py_torch/package.py +++ b/repos/spack_repo/builtin/packages/py_torch/package.py @@ -593,6 +593,19 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): working_dir="third_party/fbgemm", ) + # Make Pytorch build work in air gapped environments (without internet access) + # This forwards six source folder path to NNPACK which forwards it to PeachPy + # for versions @2.5:2.11 + patch("air_gapped_nnpack_cmake_older.patch", when="@2.5:2.11") + # for version @2.12: (env forwarding mechanism changed) + # This error has been raised upstream https://github.com/pytorch/pytorch/pull/188263 + patch("air_gapped_nnpack_cmake.patch", when="@2.12:") + + # Backport the generic environment forwarding fix from PyTorch PR 188242. + # PyTorch 2.12--2.13 parse the entire environment as a CMake list, which + # can lose USE_* selections when unrelated values contain semicolons. + patch("envvar-forwarding-188242.patch", when="@2.12:2.13") + def patch(self): # https://github.com/pytorch/pytorch/issues/52208 filter_file( @@ -742,6 +755,13 @@ def enable_or_disable(variant, keyword="USE", var=None): # cmake/External/nnpack.cmake enable_or_disable("nnpack") + if "+nnpack" in self.spec and "py-six" in self.spec: + # NNPACK/PeachPy wires this path into PYTHONPATH for codegen. + # Point it at Spack's installed py-six to avoid network fetches. + env.set( + "PYTHON_SIX_SOURCE_DIR", + self["py-six"].module.python_purelib, + ) enable_or_disable("numa") if "+numa" in self.spec: diff --git a/repos/spack_repo/builtin/packages/py_uv_build/package.py b/repos/spack_repo/builtin/packages/py_uv_build/package.py index 641597e3726..ec5a4b598d1 100644 --- a/repos/spack_repo/builtin/packages/py_uv_build/package.py +++ b/repos/spack_repo/builtin/packages/py_uv_build/package.py @@ -22,3 +22,5 @@ class PyUvBuild(PythonPackage): depends_on("python@3.8:", type=("build", "run")) depends_on("py-maturin@1", type="build") + + depends_on("bzip2") diff --git a/repos/spack_repo/builtin/packages/py_wrapt/package.py b/repos/spack_repo/builtin/packages/py_wrapt/package.py index b1ab0ab8d2f..36417d7941a 100644 --- a/repos/spack_repo/builtin/packages/py_wrapt/package.py +++ b/repos/spack_repo/builtin/packages/py_wrapt/package.py @@ -28,7 +28,10 @@ class PyWrapt(PythonPackage): with default_args(type="build"): depends_on("c") - depends_on("py-setuptools@62:", when="@2.1:") + # Upstream repo indicates py-setuptools@62, but a newer version + # is required to compile this package. + # See: https://github.com/spack/spack-packages/pull/5365 + depends_on("py-setuptools@77:", when="@2.1:") depends_on("py-setuptools@38.3:") with default_args(type=("build", "run")): diff --git a/repos/spack_repo/builtin/packages/py_xarray/package.py b/repos/spack_repo/builtin/packages/py_xarray/package.py index f7210ecd9d9..e8821d6bbc5 100644 --- a/repos/spack_repo/builtin/packages/py_xarray/package.py +++ b/repos/spack_repo/builtin/packages/py_xarray/package.py @@ -88,8 +88,8 @@ class PyXarray(PythonPackage): depends_on("py-packaging@21.3:", when="@2023.7:") depends_on("py-packaging@20:", when="@0.21:") depends_on("py-pandas@2.2:", when="@2025.7:") - depends_on("py-pandas@2.0:", when="@2024.7:") - depends_on("py-pandas@1.4:", when="@2023.7:") + depends_on("py-pandas@2.0:2.1", when="@2024.7:2025.6") + depends_on("py-pandas@1.4:2.1", when="@2023.7:2024.6") depends_on("py-pandas@1.1:", when="@0.20:") depends_on("py-pandas@1:", when="@0.18:") depends_on("py-pandas@0.25:", when="@0.15:") diff --git a/repos/spack_repo/builtin/packages/python/package.py b/repos/spack_repo/builtin/packages/python/package.py index 66459dd2a13..3e0698c37b1 100644 --- a/repos/spack_repo/builtin/packages/python/package.py +++ b/repos/spack_repo/builtin/packages/python/package.py @@ -220,7 +220,7 @@ class Python(Package): depends_on("pkgconfig", type="build") depends_on("gettext +libxml2", when="+libxml2") depends_on("iconv", when="~libxml2") - depends_on("gettext ~libxml2", when="~libxml2 ^[virtuals=iconv]gettext") + depends_on("gettext ~libxml2", when="~libxml2 ^[virtuals=iconv] libiconv") # Optional dependencies # See detect_modules() in setup.py for details diff --git a/repos/spack_repo/builtin/packages/qt/package.py b/repos/spack_repo/builtin/packages/qt/package.py index fa5bd7e942f..4129f85699a 100644 --- a/repos/spack_repo/builtin/packages/qt/package.py +++ b/repos/spack_repo/builtin/packages/qt/package.py @@ -660,10 +660,13 @@ def common_config_args(self): if "+gui" in spec: use_spack_dep("freetype") + if spec.satisfies("platform=linux") or spec.satisfies("platform=freebsd"): config_args.append("-fontconfig") - # Avoid sporadic vkconvenience bug by explicitly disabling vulkan - config_args.append("-no-vulkan") + + if spec.satisfies("@5.10:5"): + # Avoid sporadic vkconvenience bug by explicitly disabling vulkan + config_args.append("-no-vulkan") else: config_args.append("-no-freetype") config_args.append("-no-gui") diff --git a/repos/spack_repo/builtin/packages/r_affy/package.py b/repos/spack_repo/builtin/packages/r_affy/package.py index 7f0c3d929f1..49081612adf 100644 --- a/repos/spack_repo/builtin/packages/r_affy/package.py +++ b/repos/spack_repo/builtin/packages/r_affy/package.py @@ -24,6 +24,8 @@ class RAffy(RPackage): depends_on("c", type="build") # generated + depends_on("r@:4.4", type=("build", "run"), when="@:1.83.0") + depends_on("r-biocgenerics@0.1.12:", type=("build", "run")) depends_on("r-biobase@2.5.5:", type=("build", "run")) depends_on("r-affyio@1.13.3:", type=("build", "run")) diff --git a/repos/spack_repo/builtin/packages/r_fs/package.py b/repos/spack_repo/builtin/packages/r_fs/package.py index db9a58ce076..7da0142da8d 100644 --- a/repos/spack_repo/builtin/packages/r_fs/package.py +++ b/repos/spack_repo/builtin/packages/r_fs/package.py @@ -35,5 +35,7 @@ class RFs(RPackage): depends_on("r@3.4:", when="@1.6.2:") depends_on("r@3.1:") + depends_on("libuv", when="@2.1.0:") + # Historical dependencies depends_on("r-rcpp", when="@:1.3.1") diff --git a/repos/spack_repo/builtin/packages/raja/package.py b/repos/spack_repo/builtin/packages/raja/package.py index f666d0ed74d..d0aeaf150b5 100644 --- a/repos/spack_repo/builtin/packages/raja/package.py +++ b/repos/spack_repo/builtin/packages/raja/package.py @@ -2,8 +2,11 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os import re +import shutil import socket +from textwrap import dedent from spack_repo.builtin.build_systems.cached_cmake import ( CachedCMakePackage, @@ -267,6 +270,8 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("c", type="build") depends_on("blt", type="build") + # TODO(smith84): Edit the following line after the June 2026 RAJA suite release + depends_on("blt@0.7.2:", type="build", when="@develop") depends_on("blt@0.7.1:", type="build", when="@2025.09.0:") depends_on("blt@0.7.0:", type="build", when="@2025.03.0:") depends_on("blt@0.6.2:", type="build", when="@2024.02.1:") @@ -278,6 +283,7 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("blt@0.4.0:0.4.1", type="build", when="@0.13.0") depends_on("blt@0.3.6:0.4.1", type="build", when="@:0.12.0") conflicts("^blt@:0.3.6", when="+rocm") + conflicts("^blt@:0.7.1", when="+cuda ^cuda@13:", msg="CUDA 13+ requires BLT 0.7.2 or newer") depends_on("camp") depends_on("camp+openmp", when="+openmp") @@ -285,7 +291,7 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("camp+sycl", when="+sycl") # TODO(johnbowen42): Remove the following line after the June 2026 RAJA suite release depends_on("camp@main commit=e75ab64c029aa27c80593715cb2a3ccad7453c8c", when="@develop") - depends_on("camp@2025.12:", when="@2025.12:") + depends_on("camp@2025.12", when="@2025.12.0:2025.12.2") depends_on("camp@2025.09", when="@2025.09") depends_on("camp@2025.03", when="@2025.03") depends_on("camp@2024.07", when="@2024.07") @@ -337,8 +343,12 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): "please use a newer release.", ) - # https://github.com/spack/spack-packages/pull/2059#issuecomment-3443184517 - conflicts("^cuda@13:", when="+cuda") + depends_on("cuda@12:", when="+cuda") + conflicts( + "^cuda@13:", + when="@:2025.12.2 +cuda", + msg="RAJA versions up to and including 2025.12.2 do not support CUDA 13+", + ) def _get_sys_type(self, spec): sys_type = spec.architecture @@ -576,72 +586,169 @@ def initconfig_package_entries(self): def cmake_args(self): return [] - @property - def build_relpath(self): - """Relative path to the cmake build subdirectory.""" - return join_path("..", self.build_dirname) + @run_after("build") + @on_package_attributes(run_tests=True) + def check_build(self): + """Run RAJA's unit test target after build when tests are enabled.""" + with working_dir(self.build_directory): + print("Running RAJA Unit Tests...") + make("test") + + examples_src_dir = "examples" + using_with_cmake_dir = join_path("examples", "using-with-cmake") + + def _rewrite_host_config(self, path): + """Replace compiler wrappers in cached install-test files.""" + kwargs = {"backup": False, "ignore_absent": True} + compiler_paths = { + "CMAKE_C_COMPILER": getattr(self.compiler, "cc", None), + "CMAKE_CXX_COMPILER": getattr(self.compiler, "cxx", None), + "CMAKE_Fortran_COMPILER": getattr(self.compiler, "fc", None), + "CMAKE_CUDA_HOST_COMPILER": getattr(self.compiler, "cxx", None), + } + + for key, value in compiler_paths.items(): + if value: + filter_file( + rf"set\({key}.*\)", f'set({key} "{value}" CACHE PATH "")', path, **kwargs + ) @run_after("install") - def setup_build_tests(self): - """Copy the build test files after the package is installed to a - relative install test subdirectory for use during `spack test run`.""" - # Now copy the relative files - cache_extra_test_sources(self, self.build_relpath) + def setup_install_tests(self): + """Install and cache standalone test sources, using staged or build outputs + when available.""" - # Ensure the path exists since relying on a relative path at the - # same level as the normal stage source path. - mkdirp(install_test_root(self)) + cache_extra_test_sources(self, [self.examples_src_dir]) - @property - def _extra_tests_path(self): - # TODO: The tests should be converted to re-build and run examples - # TODO: using the installed libraries. - return join_path(install_test_root(self), self.build_relpath, "bin") - - def run_example(self, exe, expected): - """run and check outputs of the example""" - with working_dir(self._extra_tests_path): - example = which(exe) - if example is None: - raise SkipTest(f"{exe} was not built") + src_dir = join_path(self.stage.source_path, "test", "install", "using-with-cmake") + dst_dir = join_path(install_test_root(self), self.using_with_cmake_dir) - out = example(output=str.split, error=str.split) - check_outputs(expected, out) + if os.path.exists(src_dir): + shutil.rmtree(dst_dir, ignore_errors=True) + install_tree(src_dir, dst_dir) + self._rewrite_host_config(join_path(dst_dir, "host-config.cmake")) - def test_line_of_sight(self): - """check line of sight example""" - self.run_example( - "ex5_line-of-sight_solution", - [r"C-style sequential", r"RAJA sequential", r"result -- PASS"], - ) + src_dir = join_path(self.build_directory, "examples", "using-with-cmake") + dst_dir = join_path(install_test_root(self), self.using_with_cmake_dir) - def test_stencil_offset_layout(self): - """check stencil offset layout""" - self.run_example( - "ex6_stencil-offset-layout_solution", [r"RAJA Views \(permuted\)", r"result -- PASS"] - ) + if os.path.exists(src_dir): + install_tree(src_dir, dst_dir) + self._rewrite_host_config(join_path(dst_dir, "host-config.cmake")) + else: + tty.msg("Can't install host-config.cmake\n") + + def _run_common_check_install(self, test_dir): + """Verify that the using-with-cmake example can build against the installed + RAJA package.""" + + example_stage_dir = join_path(test_dir, "examples", "using-with-cmake") + with working_dir(join_path(example_stage_dir, "build"), create=True): + host_config = join_path("../", "host-config.cmake") + if not os.path.exists(host_config): + raise SkipTest(f"{os.path.abspath(host_config)} not found, cannot build example") + cmake_args = ["-C", host_config, "../"] + cmake = self.spec["cmake"].command + make_exe = which("make", required=True) + cmake(*cmake_args) + make_exe() + example = Executable("./using-with-cmake") + example() + make_exe("clean") - def test_tiled_matrix(self): - """check tiled matrix transpose""" - self.run_example( - "ex8_tiled-matrix-transpose_solution", - [r"C-version", r"RAJA sequential", r"result -- PASS"], - ) + @run_after("install") + @on_package_attributes(run_tests=True) + def check_install(self): + """Installation-time verification that the using-with-cmake example can build against the + installed RAJA package.""" - def test_dynamic_tile(self): - """check kernel dynamic tile""" - self.run_example("kernel-dynamic-tile", [r"Running index", r"(24,24)"]) + src_dir = join_path(install_test_root(self)) + dst_dir = join_path(self.stage.path, "spack-test") - def test_plugin_example(self): - """check plugin example""" - self.run_example("plugin-example", [r"Launching host kernel for the 10 time"]) + if os.path.exists(src_dir): + install_tree(src_dir, dst_dir) + self._run_common_check_install(dst_dir) + else: + raise SkipTest("examples directory not found, cannot build example") + + def test_check_install(self): + """Stand-alone verification that the using-with-cmake example can build against the + installed RAJA package.""" + + self._run_common_check_install(self.test_suite.current_test_cache_dir) + + def _write_example_cmakelists(self, path, exe, source): + cmake_contents = dedent(f"""\ + cmake_minimum_required(VERSION 3.23) + project(raja_package_test LANGUAGES CXX) + + if(NOT DEFINED RAJA_DIR OR NOT EXISTS + ${{RAJA_DIR}}/lib/cmake/raja/raja-config.cmake) + message(FATAL_ERROR "Missing required 'RAJA_DIR' variable pointing to + an installed RAJA") + endif() + + find_package(RAJA REQUIRED + NO_DEFAULT_PATH + PATHS ${{RAJA_DIR}}/lib/cmake/raja) + + add_executable({exe} ../{source}) + target_link_libraries({exe} RAJA) + """) + + with open(path, "w", encoding="utf-8") as f: + f.write(cmake_contents) + + def build_and_run_example(self, exe, expected): + """Build an example from the cached test sources and verify its output.""" + + examples_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir) + build_dir = join_path(examples_dir, f"build-{exe}") + with working_dir(build_dir, create=True): + cmake = self.spec["cmake"].command + make_exe = which("make", required=True) + host_config = join_path("../using-with-cmake", "host-config.cmake") + if not os.path.exists(host_config): + raise SkipTest("host-config.cmake not found, cannot build example") + self._write_example_cmakelists("CMakeLists.txt", exe, f"{exe}.cpp") + cmake_args = ["-C", host_config, "."] + cmake(*cmake_args) + make_exe() + exe_path = join_path(".", exe) + if not os.path.exists(exe_path): + raise SkipTest(f"{exe} was not built") + example = Executable(exe_path) + out = example(output=str, error=str) + check_outputs(expected, out) + make_exe("clean") + + def test_daxpy(self): + """Check daxpy tutorial""" + self.build_and_run_example("tut_daxpy", [r"daxpy", r"result -- PASS"]) + + # TODO: this test seems to hang or take a long time? + # SGS 2026-05-22: Did not see hangs/long execution times on LC systems or Redhat workstation + # clarify with Cody where this was occuring. + # def test_matrix_multiply(self): + # """check batched matrix multiple tutorial""" + # self.build_and_run_example( + # "tut_matrix-multiply", [r"matrix multiplication", r"result -- PASS"] + # ) + + def test_launch_basic(self): + """Check basic raja::launch tutorial.""" + if "+cuda" in self.spec or "+rocm" in self.spec: + self.build_and_run_example( + "tut_launch_basic", [r"Running RAJA-Teams", r"result -- PASS"] + ) + else: + raise SkipTest("CUDA or ROCm support is required to run this example") - def test_matrix_multiply(self): - """check batched matrix multiple tutorial""" - self.run_example( - "tut_batched-matrix-multiply", [r"batched matrix multiplication", r"result -- PASS"] + def test_halo_exchange(self): + """Check halo exchange tutorial.""" + self.build_and_run_example( + "tut_halo-exchange", [r"RAJA halo exchange example", r"result -- PASS"] ) def test_wave_equation(self): - """check wave equation""" - self.run_example("wave-eqn", [r"Max Error = 2", r"Evolved solution to time"]) + """Check wave equation.""" + self.build_and_run_example("wave-eqn", [r"Max Error = 2", r"Evolved solution to time"]) diff --git a/repos/spack_repo/builtin/packages/rayleigh/package.py b/repos/spack_repo/builtin/packages/rayleigh/package.py index 38d22b10c71..526fcd36949 100644 --- a/repos/spack_repo/builtin/packages/rayleigh/package.py +++ b/repos/spack_repo/builtin/packages/rayleigh/package.py @@ -20,6 +20,7 @@ class Rayleigh(MakefilePackage): maintainers("tukss") version("main", branch="main") + version("1.3.0", sha256="1a436f995edb12aa572ed67ea48f46eb5acc23981fe5fdca2363f8fced8b52ac") version("1.2.0", sha256="e90acf18d47f6066fa68fd7b16c70ad9781a00be9e97467e9a388773e21e9e09") version("1.1.0", sha256="93fbbdbde6088807638e4dcbd4d622203fd4753c1831bab2cb8eaeca5cba45c3") version("1.0.1", sha256="9c9e3b0b180f32a889f158e2ea2967f4ac2bb2124f5d264f230efb8c8f19ea36") @@ -59,6 +60,7 @@ def configure_args(self): if spec.satisfies("^openblas"): args.append("--openblas") + args.append("--with-blas={}".format(spec["openblas"].prefix)) elif not spec.satisfies("^cray-libsci"): args.append("--with-lapack={}".format(spec["lapack"].prefix)) args.append("--with-blas={}".format(spec["blas"].prefix)) diff --git a/repos/spack_repo/builtin/packages/readline/package.py b/repos/spack_repo/builtin/packages/readline/package.py index dcb1f511941..c511c3345c4 100644 --- a/repos/spack_repo/builtin/packages/readline/package.py +++ b/repos/spack_repo/builtin/packages/readline/package.py @@ -97,3 +97,8 @@ def flag_handler(self, name, flags): flags.append("-g") return (None, flags, None) return (flags, None, None) + + def configure_args(self): + config_args = ["--with-curses"] + + return config_args diff --git a/repos/spack_repo/builtin/packages/realm/package.py b/repos/spack_repo/builtin/packages/realm/package.py index 12db4850fbf..69cf6f8db24 100644 --- a/repos/spack_repo/builtin/packages/realm/package.py +++ b/repos/spack_repo/builtin/packages/realm/package.py @@ -51,9 +51,7 @@ class Realm(CMakePackage, CudaPackage, ROCmPackage): for arch in CudaPackage.cuda_arch_values: depends_on(f"ucc cuda_arch={arch}", when=f"network=ucx +cuda cuda_arch={arch}") depends_on(f"gasnet +cuda cuda_arch={arch}", when=f"network=gasnet +cuda cuda_arch={arch}") - depends_on( - f"kokkos+cuda+cuda_lambda cuda_arch={arch}", when=f"+kokkos+cuda cuda_arch={arch}" - ) + depends_on(f"kokkos+cuda cuda_arch={arch}", when=f"+kokkos+cuda cuda_arch={arch}") for arch in ROCmPackage.amdgpu_targets: depends_on(f"ucc amdgpu_target={arch}", when=f"network=ucx +rocm amdgpu_target={arch}") @@ -65,6 +63,7 @@ class Realm(CMakePackage, CudaPackage, ROCmPackage): depends_on("kokkos@4:", when="+kokkos") depends_on("kokkos+openmp", when="+kokkos+openmp") depends_on("kokkos~openmp", when="+kokkos~openmp") + requires("^kokkos+cuda_lambda", when="+cuda+kokkos ^kokkos@4") # force same compiler as kokkos if static build depends_on("kokkos %gcc", when="+kokkos~shared %gcc") diff --git a/repos/spack_repo/builtin/packages/recola_sm/package.py b/repos/spack_repo/builtin/packages/recola_sm/package.py index b1463ae5c3d..21d20ee37cb 100644 --- a/repos/spack_repo/builtin/packages/recola_sm/package.py +++ b/repos/spack_repo/builtin/packages/recola_sm/package.py @@ -22,6 +22,8 @@ class RecolaSm(CMakePackage): version("2.2.3", sha256="9ebdc4fd8ca48789de0b6bbb2ab7e4845c92d19dfe0c3f67866cbf114d6242a5") + depends_on("c", type="build") + depends_on("cxx", type="build") depends_on("fortran", type="build") # generated depends_on("collier") diff --git a/repos/spack_repo/builtin/packages/root/package.py b/repos/spack_repo/builtin/packages/root/package.py index 5ea7aa0f32f..57a31157a16 100644 --- a/repos/spack_repo/builtin/packages/root/package.py +++ b/repos/spack_repo/builtin/packages/root/package.py @@ -428,7 +428,7 @@ class Root(CMakePackage): # (interpreter/llvm-project/clang) and builds it against the external LLVM, so # vanilla LLVM is sufficient here. ROOT's patches to llvm-project only touch # clang/, not the LLVM core. - depends_on("llvm@20.1.0:20.1", when="@6.36: ~builtin_llvm") + depends_on("llvm@20.1.0:20.1+polly+clang", when="@6.36: ~builtin_llvm") depends_on("googletest", when="@6.28.00:", type="test") diff --git a/repos/spack_repo/builtin/packages/scale/package.py b/repos/spack_repo/builtin/packages/scale/package.py index 542b804ba38..6bc4606b2a0 100644 --- a/repos/spack_repo/builtin/packages/scale/package.py +++ b/repos/spack_repo/builtin/packages/scale/package.py @@ -35,7 +35,7 @@ class Scale(MakefilePackage): depends_on("fortran", type="build") # generated depends_on("mpi@2:", type=("build", "link", "run")) - depends_on("netcdf-c") + depends_on("netcdf-c@:4.8.9") # scale depends upon old nc-config that supports --fflags depends_on("netcdf-fortran") depends_on("parallel-netcdf") diff --git a/repos/spack_repo/builtin/packages/seacas/package.py b/repos/spack_repo/builtin/packages/seacas/package.py index 0e6aace15e9..7df25c59a9a 100644 --- a/repos/spack_repo/builtin/packages/seacas/package.py +++ b/repos/spack_repo/builtin/packages/seacas/package.py @@ -277,6 +277,18 @@ class Seacas(CMakePackage): conflicts("@2024-06-27 platform=windows") + # Require mpi +fortran only when +fortran + conflicts( + "^mpich ~fortran", + when="+fortran ^[virtuals=mpi] mpich", + msg="MPICH Fortran support required for SEACAS Fortran support.", + ) + conflicts( + "^openmpi ~fortran", + when="+fortran ^[virtuals=mpi] openmpi", + msg="OpenMPI Fortran support required for SEACAS Fortran support.", + ) + # Remove use of variable in array assignment (triggers c2057 on MSVC) # See https://github.com/sandialabs/seacas/issues/438 patch( @@ -296,6 +308,8 @@ def flag_handler(self, name: str, flags: List[str]): def setup_run_environment(self, env: EnvironmentModifications) -> None: env.prepend_path("PYTHONPATH", self.prefix.lib) + if self.spec.satisfies("+legacy"): + env.set("ACCESS", self.prefix) def cmake_args(self): spec = self.spec @@ -344,10 +358,11 @@ def cmake_args(self): [ define("CMAKE_C_COMPILER", spec["mpi"].mpicc), define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx), - define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc), define("MPI_BASE_DIR", spec["mpi"].prefix), ] ) + if "+fortran" in spec: + options.append(define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc)) # ########## What applications should be built ############# # Check whether they want everything; if so, do the easy way... diff --git a/repos/spack_repo/builtin/packages/sparse/package.py b/repos/spack_repo/builtin/packages/sparse/package.py index 48382bbbe83..3985bfb76b1 100644 --- a/repos/spack_repo/builtin/packages/sparse/package.py +++ b/repos/spack_repo/builtin/packages/sparse/package.py @@ -22,17 +22,22 @@ class Sparse(MakefilePackage): variant("pic", default=True, description="Build with position independent code") + # Remove implicit usage of time() for newer compilers + patch( + "spTest_time_patch.patch", + sha256="e10ee8e790bfbc198ba065bf3f9b4b4526b61997dfc238c922c8e5c429043657", + ) + depends_on("c", type="build") # generated def edit(self, spec, prefix): with working_dir("./src"): makefile = FileFilter("Makefile") - if "+pic" in self.spec: - makefile.filter( - "CFLAGS = .*", "CFLAGS = -O2 {0}".format(self.compiler.cc_pic_flag) - ) - else: - makefile.filter("CFLAGS = .*", "CFLAGS = -O2") + makefile.filter( + "CFLAGS = .*", + f"CFLAGS = -O2 {self.compiler.c99_flag} " + + (self.compiler.cc_pic_flag if spec.satisfies("+pic") else ""), + ) makefile.filter("CC = .*", "CC = {0}".format(spack_cc)) makefile.filter("LIBRARY = .*", "LIBRARY = ../lib/libsparse.a") diff --git a/repos/spack_repo/builtin/packages/sparse/spTest_time_patch.patch b/repos/spack_repo/builtin/packages/sparse/spTest_time_patch.patch new file mode 100644 index 00000000000..1c857c33ad7 --- /dev/null +++ b/repos/spack_repo/builtin/packages/sparse/spTest_time_patch.patch @@ -0,0 +1,24 @@ +diff --git a/src/spTest.c b/src/spTest.c +index 20ab7cc..9e98134 100644 +--- a/src/spTest.c ++++ b/src/spTest.c +@@ -28,6 +28,9 @@ + * Copyright (c) 1985-2003 by Kenneth S. Kundert + */ + ++#include ++#include ++ + #ifndef lint + static char copyright[] = + "Sparse1.4: Copyright (c) 1985-2003 by Kenneth S. Kundert"; +@@ -137,9 +140,9 @@ extern int strcmp(), strncmp(), strlen(); + double + Time() + { +- struct time {long user, system, childuser, childsystem;} time; ++ struct tms time; + (void)times(&time); +- return (double)time.user / (double)HZ; ++ return (double)time.tms_utime / (double)HZ; + } diff --git a/repos/spack_repo/builtin/packages/sphexa/package.py b/repos/spack_repo/builtin/packages/sphexa/package.py index 53104457437..b6f2cf0dee8 100644 --- a/repos/spack_repo/builtin/packages/sphexa/package.py +++ b/repos/spack_repo/builtin/packages/sphexa/package.py @@ -16,7 +16,7 @@ class Sphexa(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/sphexa-org/sphexa" url = "https://github.com/sphexa-org/sphexa/archive/v0.0.0.tar.gz" git = "https://github.com/sphexa-org/sphexa.git" - maintainers = ["sekelle"] + maintainers("sekelle") license("MIT") diff --git a/repos/spack_repo/builtin/packages/sumo/package.py b/repos/spack_repo/builtin/packages/sumo/package.py index f8e29980f0c..c53b8171d34 100644 --- a/repos/spack_repo/builtin/packages/sumo/package.py +++ b/repos/spack_repo/builtin/packages/sumo/package.py @@ -30,6 +30,7 @@ class Sumo(CMakePackage): variant("gl2ps", default=False, description="gl2ps support") variant("eigen", default=False, description="eigen support") + depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated extends("python") diff --git a/repos/spack_repo/builtin/packages/tau/cuptipc.patch b/repos/spack_repo/builtin/packages/tau/cuptipc.patch new file mode 100644 index 00000000000..76157cb061a --- /dev/null +++ b/repos/spack_repo/builtin/packages/tau/cuptipc.patch @@ -0,0 +1,9 @@ +--- spack-src/include/Profile/CuptiPCSampling.h 2026-06-05 08:57:22.469499004 -0700 ++++ spack-src-patched/include/Profile/CuptiPCSampling-patched.h 2026-06-05 08:57:17.266421112 -0700 +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + // CUDA headers + #include diff --git a/repos/spack_repo/builtin/packages/tau/package.py b/repos/spack_repo/builtin/packages/tau/package.py index b39684716d1..b7e6af5917d 100644 --- a/repos/spack_repo/builtin/packages/tau/package.py +++ b/repos/spack_repo/builtin/packages/tau/package.py @@ -271,6 +271,7 @@ class Tau(Package): patch("tau-rocm-disable-llvm-plugin.patch", when="@2.33.2 +rocm") # https://github.com/UO-OACISS/tau2/commit/523df968dd17ffad74f0d944ecbb958ba0e8c6e8 patch("tau-rocm-disable-rocprofiler-default.patch", when="@2.34.0 +rocm") + patch("cuptipc.patch", when="@2.34.1:2.35.1 +cuda") filter_compiler_wrappers("Makefile", relative_root="include") filter_compiler_wrappers("Makefile.tau*", relative_root="lib") @@ -282,6 +283,11 @@ def set_compiler_options(self, spec): if self.spec.satisfies("%oneapi"): useropt.append("-Wno-error=implicit-function-declaration") + if "+dyninst" in spec and self.spec.satisfies("@2.32.1:2.35.2"): + tbb = spec["intel-tbb"] + if tbb.satisfies("@2021.1:"): + useropt.append("-DDYNINST_TBB_HAS_VERSION_H") + ########## # Selecting a compiler with TAU configure is quite tricky: # 1 - compilers are mapped to a given set of strings diff --git a/repos/spack_repo/builtin/packages/toml11/package.py b/repos/spack_repo/builtin/packages/toml11/package.py index 0307a4d30b8..cc963757149 100644 --- a/repos/spack_repo/builtin/packages/toml11/package.py +++ b/repos/spack_repo/builtin/packages/toml11/package.py @@ -42,6 +42,7 @@ class Toml11(CMakePackage): "cxx_std", default="11", description="C++ standard", values=("11", "14", "17"), multi=False ) + depends_on("c", type="build", when="@:3") depends_on("cxx", type="build") # generated @when("@3.8.0:") diff --git a/repos/spack_repo/builtin/packages/viskores/device-lib-private-vk11.patch b/repos/spack_repo/builtin/packages/viskores/device-lib-private-vk11.patch index 523ae1e5898..0a13dc108f0 100644 --- a/repos/spack_repo/builtin/packages/viskores/device-lib-private-vk11.patch +++ b/repos/spack_repo/builtin/packages/viskores/device-lib-private-vk11.patch @@ -43,20 +43,23 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f0838151..52cb9f274 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -420,6 +420,27 @@ if (TARGET viskoresdiympi_nompi) +@@ -420,6 +420,30 @@ if (TARGET viskoresdiympi_nompi) set(lib_args "${lib_args} \\ -lviskoresdiympi_nompi") endif() +# Also add depended device libraries +macro(_viskores_add_imported_lib_to_list target_name) + if(TARGET ${target_name}) -+ foreach(prop in IMPORTED_LOCATION_RELEASE IMPORTED_LOCATION IMPORTED_LOCATION_DEBUG) -+ get_target_property(libfile ${target_name} ${prop}) -+ if(libfile) -+ set(lib_args "${lib_args} \\\n ${libfile}") -+ return() -+ endif() -+ endforeach() ++ get_target_property(target_type ${target_name} TYPE) ++ if(NOT ${target_type} STREQUAL "INTERFACE_LIBRARY") ++ foreach(prop in IMPORTED_LOCATION_RELEASE IMPORTED_LOCATION IMPORTED_LOCATION_DEBUG) ++ get_target_property(libfile ${target_name} ${prop}) ++ if(libfile) ++ set(lib_args "${lib_args} \\\n ${libfile}") ++ break() ++ endif() ++ endforeach() ++ endif() + endif() +endmacro() +_viskores_add_imported_lib_to_list(Kokkos::kokkos) diff --git a/repos/spack_repo/builtin/packages/vtk/package.py b/repos/spack_repo/builtin/packages/vtk/package.py index 861f111c011..947a4c95765 100644 --- a/repos/spack_repo/builtin/packages/vtk/package.py +++ b/repos/spack_repo/builtin/packages/vtk/package.py @@ -222,7 +222,7 @@ class Vtk(CMakePackage): depends_on("seacas@2022-10-14", when="@9.2:9.3") depends_on("seacas@2024-06-27", when="@9.4:") - depends_on("nlohmann-json", when="@9.2:") + depends_on("nlohmann-json+multiple_headers", when="@9.2:") # Freetype@2.10.3 no longer exports FT_CALLBACK_DEF, this # patch replaces FT_CALLBACK_DEF with simple extern "C" diff --git a/repos/spack_repo/builtin/packages/win_file/package.py b/repos/spack_repo/builtin/packages/win_file/package.py index c70862f4b8b..3b7f5715d48 100644 --- a/repos/spack_repo/builtin/packages/win_file/package.py +++ b/repos/spack_repo/builtin/packages/win_file/package.py @@ -24,8 +24,6 @@ class WinFile(Package): version("5.45", sha256="11b8f3abf647c711bc50ef8451c8d6e955f11c4afd8b0a98f2ac65e9b6e10d5e") - depends_on("c", type="build") - @classmethod def determine_version(cls, exe): output = Executable(exe)("--version", output=str, error=str) diff --git a/repos/spack_repo/builtin/packages/win_gpg/package.py b/repos/spack_repo/builtin/packages/win_gpg/package.py index e0aa633ade2..168432988e4 100644 --- a/repos/spack_repo/builtin/packages/win_gpg/package.py +++ b/repos/spack_repo/builtin/packages/win_gpg/package.py @@ -25,8 +25,6 @@ class WinGpg(Package): version("2.4.5", sha256="249ab87bd06abea3140054089bad44d9a5d1531413590576da609142db2673ec") - depends_on("c", type="build") - @classmethod def determine_version(cls, exe): output = Executable(exe)("--version", output=str, error=str) diff --git a/repos/spack_repo/builtin/packages/wrf/package.py b/repos/spack_repo/builtin/packages/wrf/package.py index 9fc058d009a..141abb67a1e 100644 --- a/repos/spack_repo/builtin/packages/wrf/package.py +++ b/repos/spack_repo/builtin/packages/wrf/package.py @@ -500,6 +500,7 @@ def run_compile_script(self): # and the custom compile script will always return zero regardless of # success or failure result_buf = csh( + "-f", "./compile", "-j", num_jobs, diff --git a/repos/spack_repo/builtin/packages/xbae/fix_build_with_gcc14.patch b/repos/spack_repo/builtin/packages/xbae/fix_build_with_gcc14.patch new file mode 100644 index 00000000000..aba798dddeb --- /dev/null +++ b/repos/spack_repo/builtin/packages/xbae/fix_build_with_gcc14.patch @@ -0,0 +1,172 @@ +--- src/Methods.c 2006-05-26 10:57:25.000000000 +0200 ++++ src/Methods.c 2026-06-23 18:33:50.333270805 +0200 +@@ -1688,7 +1688,7 @@ + * The event must have occurred in a legal position + * otherwise control wouldn't have made it here + */ +- xbaeEventToRowColumn(mw, event, &r, &c, &x, &y); ++ xbaeEventToRowColumn((Widget)mw, event, &r, &c, &x, &y); + x -= mw->matrix.cell_shadow_thickness; + y -= mw->matrix.cell_shadow_thickness; + position = XmTextXYToPos(TextField(mw), x, y); +--- examples/tests/leak2.c 2003-06-21 11:38:46.000000000 +0200 ++++ examples/tests/leak2.c 2026-06-23 18:33:50.321046959 +0200 +@@ -8,6 +8,7 @@ + + #include + #include ++#include + #include + + #include +@@ -20,7 +21,7 @@ + + XtResource resources[] = { + { "numIter", "NumIter", XtRInt, sizeof(int), +- XtOffsetOf(AppRes, numIter), XtRImmediate, 1000 }, ++ XtOffsetOf(AppRes, numIter), XtRImmediate, (XtPointer)(intptr_t)1000 }, + }; + + int +--- examples/matrix/matrix.c 2006-05-15 17:57:04.000000000 +0200 ++++ examples/matrix/matrix.c 2026-06-23 18:33:50.319133901 +0200 +@@ -29,6 +29,7 @@ + #include + #endif + #include ++#include + #ifdef USE_EDITRES + #include + #include +--- examples/input/pattern.c 2003-10-20 21:12:46.000000000 +0200 ++++ examples/input/pattern.c 2026-06-23 18:33:50.307984385 +0200 +@@ -128,7 +128,7 @@ + { + Widget toplevel, rc, pattern, cw, radio, frame; + XtAppContext app; +- XmString true, false, begin, centre, end; ++ XmString xm_true, xm_false, begin, centre, end; + + toplevel = XtVaAppInitialize(&app, "Input", + NULL, 0, +@@ -167,8 +167,8 @@ + XmNoverwriteMode, False, + NULL); + +- true = XmStringCreateSimple("True"); +- false = XmStringCreateSimple("False"); ++ xm_true = XmStringCreateSimple("True"); ++ xm_false = XmStringCreateSimple("False"); + + cw = XtVaCreateManagedWidget( + "XmNautofill", xbaeCaptionWidgetClass, rc, +@@ -180,8 +180,8 @@ + + radio = XmVaCreateSimpleRadioBox( + frame, "XmNautoFill", 0, autoFillToggle, +- XmVaRADIOBUTTON, false, NULL, NULL, NULL, +- XmVaRADIOBUTTON, true, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_false, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_true, NULL, NULL, NULL, + NULL); + + XtVaSetValues(radio, XmNtraversalOn, False, NULL); +@@ -198,8 +198,8 @@ + + radio = XmVaCreateSimpleRadioBox( + frame, "XmNconvertCase", 1, convertCaseToggle, +- XmVaRADIOBUTTON, false, NULL, NULL, NULL, +- XmVaRADIOBUTTON, true, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_false, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_true, NULL, NULL, NULL, + NULL); + + XtVaSetValues(radio, XmNtraversalOn, False, NULL); +@@ -231,8 +231,8 @@ + + radio = XmVaCreateSimpleRadioBox( + frame, "XmNoverwriteMode", 0, overwriteModeToggle, +- XmVaRADIOBUTTON, false, NULL, NULL, NULL, +- XmVaRADIOBUTTON, true, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_false, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_true, NULL, NULL, NULL, + NULL); + + XtVaSetValues(radio, XmNtraversalOn, False, NULL); +@@ -261,8 +261,8 @@ + + XtManageChild(radio); + +- XmStringFree(true); +- XmStringFree(false); ++ XmStringFree(xm_true); ++ XmStringFree(xm_false); + XmStringFree(begin); + XmStringFree(centre); + XmStringFree(end); +--- examples/input/input.c 2001-03-30 09:52:02.000000000 +0200 ++++ examples/input/input.c 2026-06-23 18:33:50.307871214 +0200 +@@ -126,7 +126,7 @@ + { + Widget toplevel, rc, pattern, cw, radio, frame; + XtAppContext app; +- XmString true, false, begin, centre, end; ++ XmString xm_true, xm_false, begin, centre, end; + + toplevel = XtVaAppInitialize(&app, "Input", + NULL, 0, +@@ -160,8 +160,8 @@ + + XtAddCallback(input, XmNvalidateCallback, validateCB, NULL); + +- true = XmStringCreateSimple("True"); +- false = XmStringCreateSimple("False"); ++ xm_true = XmStringCreateSimple("True"); ++ xm_false = XmStringCreateSimple("False"); + + cw = XtVaCreateManagedWidget( + "XmNautofill", xbaeCaptionWidgetClass, rc, +@@ -173,8 +173,8 @@ + + radio = XmVaCreateSimpleRadioBox( + frame, "XmNautoFill", 0, autoFillToggle, +- XmVaRADIOBUTTON, false, NULL, NULL, NULL, +- XmVaRADIOBUTTON, true, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_false, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_true, NULL, NULL, NULL, + NULL); + + XtVaSetValues(radio, XmNtraversalOn, False, NULL); +@@ -191,8 +191,8 @@ + + radio = XmVaCreateSimpleRadioBox( + frame, "XmNconvertCase", 1, convertCaseToggle, +- XmVaRADIOBUTTON, false, NULL, NULL, NULL, +- XmVaRADIOBUTTON, true, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_false, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_true, NULL, NULL, NULL, + NULL); + + XtVaSetValues(radio, XmNtraversalOn, False, NULL); +@@ -224,8 +224,8 @@ + + radio = XmVaCreateSimpleRadioBox( + frame, "XmNoverwriteMode", 0, overwriteModeToggle, +- XmVaRADIOBUTTON, false, NULL, NULL, NULL, +- XmVaRADIOBUTTON, true, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_false, NULL, NULL, NULL, ++ XmVaRADIOBUTTON, xm_true, NULL, NULL, NULL, + NULL); + + XtVaSetValues(radio, XmNtraversalOn, False, NULL); +@@ -254,8 +254,8 @@ + + XtManageChild(radio); + +- XmStringFree(true); +- XmStringFree(false); ++ XmStringFree(xm_true); ++ XmStringFree(xm_false); + XmStringFree(begin); + XmStringFree(centre); + XmStringFree(end); diff --git a/repos/spack_repo/builtin/packages/xbae/package.py b/repos/spack_repo/builtin/packages/xbae/package.py index 027c4e69b2a..e01604b105c 100644 --- a/repos/spack_repo/builtin/packages/xbae/package.py +++ b/repos/spack_repo/builtin/packages/xbae/package.py @@ -25,3 +25,13 @@ class Xbae(AutotoolsPackage): depends_on("libxpm") depends_on("libxt") depends_on("motif") + + # Fix build with GCC 14 and newer + patch("fix_build_with_gcc14.patch", level=0) + + def flag_handler(self, name, flags): + # The package does not build with C dialects newer than gnu17, so set gnu17 + # for GCC 15 and newer which default to gnu23 + if name == "cflags" and self.spec.satisfies("%gcc@15:"): + flags.append("-std=gnu17") + return (flags, None, None) diff --git a/repos/spack_repo/builtin/packages/xolotl/package.py b/repos/spack_repo/builtin/packages/xolotl/package.py index 8ac5902a77a..6e65ba35704 100644 --- a/repos/spack_repo/builtin/packages/xolotl/package.py +++ b/repos/spack_repo/builtin/packages/xolotl/package.py @@ -26,6 +26,7 @@ class Xolotl(CMakePackage, CudaPackage): version("3.1.0", sha256="68a495ab0c3efb495189f73474d218eb591099b90d52d427ac868b63e8fc2ee8") depends_on("cxx", type="build") + depends_on("c", type="build") depends_on("mpi") depends_on("boost +log +program_options") @@ -38,6 +39,8 @@ class Xolotl(CMakePackage, CudaPackage): conflicts("+openmp", when="+cuda", msg="Can't use both OpenMP and CUDA") depends_on("petsc ~fortran +kokkos") + depends_on("kokkos@4.4", when="@3.1.0") + depends_on("kokkos-kernels@4.4", when="@3.1.0") depends_on("petsc +int64", when="+int64") depends_on("petsc +openmp", when="+openmp") diff --git a/repos/spack_repo/builtin/packages/zip/package.py b/repos/spack_repo/builtin/packages/zip/package.py index dd648fb5abb..82a31ca2842 100644 --- a/repos/spack_repo/builtin/packages/zip/package.py +++ b/repos/spack_repo/builtin/packages/zip/package.py @@ -19,7 +19,7 @@ class Zip(MakefilePackage): version("3.0", sha256="f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("bzip2") @@ -44,6 +44,9 @@ class Zip(MakefilePackage): # Adopt patch from Homebrew for newer clang # https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/z/zip.rb patch("xcode15.patch", when="%apple-clang@15:") + # LLVM clang 16+ also treats implicit function declarations as errors, + # which breaks the unix/configure feature checks the same way + patch("xcode15.patch", when="%clang@16:") executables = ["^zip$"] diff --git a/stacks/e4s-rocm-external/spack.yaml b/stacks/e4s-rocm-external/spack.yaml index 1a73c8171c5..c9d911ceefb 100644 --- a/stacks/e4s-rocm-external/spack.yaml +++ b/stacks/e4s-rocm-external/spack.yaml @@ -244,6 +244,7 @@ spack: - gasnet +rocm amdgpu_target=gfx90a - heffte +rocm amdgpu_target=gfx90a - kokkos +rocm amdgpu_target=gfx90a + - kokkos-fft device_backend=hipfft +tests ^kokkos +rocm amdgpu_target=gfx90a - legion +rocm amdgpu_target=gfx90a %c,cxx=gcc - libceed +rocm amdgpu_target=gfx90a - mfem +rocm amdgpu_target=gfx90a