summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-05-13glibc: detect from "Free Software Foundation" not "gnu" (#44154)Harmen Stoppels1-2/+2
which should be more generic
2024-05-13spack uninstall: improve error message for dependent environment (#44149)Greg Becker1-0/+2
2024-05-13spack checksum: do not add expand=False to wheels (#44118)Adam J. Stewart1-11/+1
2024-05-12clang: support cxx20_flag and cxx23_flag (#43438)Wouter Deconinck2-1/+33
* clang: support cxx20_flag and cxx23_flag * clang: coverage test cxx{}_flag and c{}_flag additions
2024-05-11Bump version on `develop` to v0.23dev0 (#44137)Todd Gamblin1-1/+1
2024-05-11oci: improve default_retry (#44132)Harmen Stoppels1-3/+12
Apparently urllib can throw a range of different exceptions: 1. HTTPError 2. URLError with e.reason set to the actual exception 3. TimeoutError from getresponse, which is not wrapped
2024-05-10Buildcache/ensure symlinks proper prefix (#43851)John W. Parent7-13/+29
* archive: relative links only Ensure all links written into tarfiles generated from Spack prefixes do not contain symlinks pointing outside the prefix * binary_distribution: limit extraction to prefix Ensure files extracted from spackballs are not links pointing outside of the prefix * Ensure rpaths are properly set on Windows * hard error on extraction of absolute links * refactor for non link-modifying approach * Restore tarball extraction to original impl * use custom readlink * cleanup symlink module * make lstrip
2024-05-10Windows: Non config changes to support Gitlab CI (#43965)John W. Parent8-115/+102
* Quote python for shlex * Remove python path quoting patch * spack env: Allow `C` "protocol" for config_path When running spack on windows, a path beginning with `C://...` is a valid path. * Remove makefile from ci rebuild * GPG use llnl.util.filesystem.getuid * Cleanup process_command * Remove unused lines * Fix tyop in encode_path * Double quote arguments * Cleanup process_command * Pass cdash args with = * Escape parens in CMD script * escape parens doesn't only apply to paths * Install deps * sfn prefix * use sfn with libxml2 * Add hash to dep install * WIP * REview * Changes missed in prior review commit * Style * Ensure we handle Windows paths with config scopes * clarify docstring * No more MAKE_COMMAND * syntax cleanup * Actually correct is_path_url * Correct call * raise on other errors * url2path behaves differently on unix * Ensure proper quoting * actually prepend slash in slash_hash --------- Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com> Co-authored-by: Mike VanDenburgh <michael.vandenburgh@kitware.com>
2024-05-10PythonExtension: fix issue where package does not extend python (#44109)Harmen Stoppels1-8/+12
2024-05-09Fix filtering external specs (#44093)Massimiliano Culpo3-0/+48
When an include filter on externals is present, implicitly include libcs. Also, do not penalize deprecated versions if they come from externals.
2024-05-08Bump removal version in deprecation messages (#44064)Massimiliano Culpo3-6/+6
2024-05-07Remove dead environment creation code (#44065)Tamara Dahlgren1-8/+0
2024-05-07build(deps): bump pygments from 2.17.2 to 2.18.0 in /lib/spack/docs (#44044)dependabot[bot]1-1/+1
Bumps [pygments](https://github.com/pygments/pygments) from 2.17.2 to 2.18.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.17.2...2.18.0) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07Include concrete environments with `include_concrete` (#33768)Richarda Butler8-42/+1104
Add the ability to include any number of (potentially nested) concrete environments, e.g.: ```yaml spack: specs: [] concretizer: unify: true include_concrete: - /path/to/environment1 - /path/to/environment2 ``` or, from the CLI: ```console $ spack env create myenv $ spack -e myenv add python $ spack -e myenv concretize $ spack env create --include-concrete myenv included_env ``` The contents of included concrete environments' spack.lock files are included in the environment's lock file at creation time. Any changes to included concrete environments are only reflected after the environment is re-concretized from the re-concretized included environments. - [x] Concretize included envs - [x] Save concrete specs in memory by hash - [x] Add included envs to combined env's lock file - [x] Add test - [x] Update documentation Co-authored-by: Kayla Butler <<butler59@llnl.gov> Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.co m> Co-authored-by: Todd Gamblin <tgamblin@llnl.gov> Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-05-07Update the tutorial command to point to releases/v0.22 (#44056)Massimiliano Culpo1-1/+1
2024-05-07Remove spurious ASP debug lines (#44051)Massimiliano Culpo1-0/+3
2024-05-07certs: fix interpolation and disallow relative paths (#44030)psakievich5-64/+60
2024-05-07Warn users of the future removal of platform=cray (#43980)Massimiliano Culpo1-0/+6
2024-05-07llnl.util.tty.color._force_color: init in global scope (#44036)Harmen Stoppels2-18/+27
Currently SPACK_COLOR=always is not respected in the build process on macOS, because the global `_force_color` is re-evaluated in global scope during module setup, where it is always `None`. So, move global init bits from main.py to the module itself.
2024-05-07Respect requests when filtering reused specs (#44042)Massimiliano Culpo2-1/+54
Some specs which were excluded from reuse, are currently added back to the solve when we traverse dependencies of other reusable specs. This fixes the issue by keeping track of what we can explicitly reuse.
2024-05-06python: always use a venv (#40773)Harmen Stoppels12-293/+257
This commit adds a layer of indirection to improve build isolation with and without external Python, as well as usability of environment views. It adds `python-venv` as a dependency to all packages that `extends("python")`, which has the following advantages: 1. Build isolation: only `PYTHONPATH` is considered in builds, not user / system packages 2. Stable install layout: fixes the problem on Debian, RHEL and Fedora where external / system python produces `bin/local` subdirs in Spack install prefixes. 3. Environment views are Python virtual environments (and if you add `py-pip` things like `pip list` work) Views work whether they're symlink, hardlink or copy type. This commit additionally makes `spec["python"].command` return `spec["python-venv"].command`. The rationale is that packages in repos we do not own do not pass the underlying python to the build system, which could still result in incorrectly computed install layouts. Other attributes like `libs`, `headers` should be on `python` anyways and need no change.
2024-05-06Remove Fedora 37 and 38, Ubuntu 18 from CI (#44006)Massimiliano Culpo6-45/+7
2024-05-06clingo bootstrap: remove 3.12 patch and concretizer workarounds (#44028)Harmen Stoppels1-4/+0
2024-05-06bootstrap: lazy bootstrapping of clingo and GnuPG (#44026)Harmen Stoppels4-4/+12
Currently bootstrapping from source fails because clingo requires gnupg requires clingo. This commit stops eager bootstrapping. We don't need `patchelf` nor `gnupg` generally. They're bootstrapped when needed.
2024-05-06External package detection for compilers (#43464)Greg Becker6-48/+202
This creates shared infrastructure for compiler packages to implement the detailed search capabilities from the `spack compiler find` command for the `spack external find` command. After this commit, `spack compiler find` can be replaced with `spack external find --tag compiler`, with the exception of mixed toolchains.
2024-05-06Update vendored archspec to v0.2.4 (#44005)Massimiliano Culpo8-17/+77
2024-05-06`spack env create <env>`: dir if dir-like (#44024)Harmen Stoppels3-44/+53
A named env cannot contain `.` and `/`. So when a user runs `spack env create ./here` do not error but treat it as `spack env create -d ./here`. Also fix help string of `spack env create`, which seems to have been copied from `activate` incorrectly.
2024-05-06build(deps): bump black from 24.4.0 to 24.4.2 in /lib/spack/docs (#43878)dependabot[bot]1-1/+1
Bumps [black](https://github.com/psf/black) from 24.4.0 to 24.4.2. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/24.4.0...24.4.2) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-04build(deps): bump mypy from 1.9.0 to 1.10.0 in /lib/spack/docs (#43834)dependabot[bot]1-1/+1
Bumps [mypy](https://github.com/python/mypy) from 1.9.0 to 1.10.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-03concretizer args: --fresh-roots == --reuse-deps (#43988)Harmen Stoppels2-2/+9
Since reuse is the default now, `--reuse-deps` can be confusing, as it technically does not imply roots are fresh. So add `--fresh-roots`, which is also easier to discover when running `spack concretize --fre<tab>`
2024-05-02Spec.satisfies: fix a bug with concrete spec from JSON (#43968)Massimiliano Culpo2-3/+25
Fix a bug triggered by missing a virtual on some transitive edge, in a subdag of a pure build dependency.
2024-05-02docs: re-enable google analytics (#43974)Todd Gamblin1-0/+12
We recently switched to using the new ReadTheDocs with "addons". That includes its own analytics, which is nice, but we also want to continue using our GA4 analytics. Adding GA4 is no longer supported by RTD, so we have to add it manually. - [x] re-add the gtag to all pages, manually Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-05-02libc: detect ARM flavor (#43959)jdomke1-3/+3
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-05-02Ignore external packages when pushing to buildcache automatically ↵Adrien Bernede1-0/+4
(--autopush) (#43930)
2024-05-02Windows: auto-add WGL/SDK as externals (#43752)John W. Parent5-4/+77
Adds a pre-concretization check for the Windows SDK and WGL (Windows GL) packages as non-buildable externals. This is a redo of https://github.com/spack/spack/pull/43459, but makes sure to modify the configuration scope outside of the bootstrap scope: whichever is highest-precedence in the user's environment at the time the concretization runs, which should either be an env scope or the ~ scope. Adds pytest fixture mocking the check for WGL and WSDK as if they were present.
2024-05-01Allow more control over which specs are reused (#42782)Massimiliano Culpo4-54/+357
This PR gives users finer control over which specs are reused during concretization. The value of the `concretizer:reuse` config option now can take an object with the following properties: - `roots`: true if reusing roots, false if reusing just dependencies - `exclude`: list of constraints used to select reusable specs - `include`: list of constraints used to select reusable specs - `from`: allows to select the sources of reused specs ### Examples #### Reuse only specs compiled with GCC ```yaml concretizer: reuse: roots: true include: - "%gcc" ``` #### `openmpi` must be used from externals, and it must be the only external used ```yaml concretizer: reuse: roots: true from: - type: local exclude: - "openmpi" - type: buildcache exclude: - "openmpi" - type: external include: - "openmpi" ```
2024-05-01containers: add ubuntu 24.04 (#43881)Wouter Deconinck2-0/+10
* containers: add ubuntu 24.04 * containers: use python3-boto3 pkg instead of pip install
2024-05-01build(deps): bump pytest from 8.1.1 to 8.2.0 in /lib/spack/docs (#43908)dependabot[bot]1-1/+1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.2.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.1.1...8.2.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-30PackageStillNeededError: add pkg that needs spec to exception msg (#43845)Wouter Deconinck1-1/+6
* PackageStillNeededError: add pkg that needs spec to exception msg * PackageStillNeededError: f-string with short fmt and hash * PackageStillNeededError: split long string
2024-04-30hack: drop glibc and musl in old concretizer (#43914)Harmen Stoppels1-1/+9
The old concretizer creates a cyclic graph when expanding virtuals for `iconv`, which is a bug. This hack drops glibc and musl as possible providers for `iconv` in the old concretizer to work around it.
2024-04-29compiler.py: fix early return (#43898)Harmen Stoppels2-7/+18
2024-04-29Run audits on windowsGregory Becker2-5/+5
Add debug log for external detection tests. The debug log is used to print which test is being executed. Skip version audit on Windows where appropriate
2024-04-29Fix concretization when installing missing compilers (#43876)Massimiliano Culpo2-2/+29
Restore the previous behavior when config:install_missing_compilers is True. The libc of the missing compiler is inferred from the Python process.
2024-04-27gcc: generate spec file and fix external libc default paths after install ↵Harmen Stoppels6-32/+103
from cache (#43839) Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-04-26containers: Add Fedora 40, 39 (#43847)Jonathon Anderson2-2/+30
2024-04-26ASP-based solver: update os compatibility for macOS (#43862)Massimiliano Culpo1-0/+2
2024-04-26[intel-oneap-*] no redistribution (#43826)Robert Cohn1-2/+2
2024-04-26spack audit externals: allow selecting platforms and checking extra ↵Massimiliano Culpo3-2/+95
attributes (#43782)
2024-04-26ldflags=* are compiler flags, not linker flags (#43820)Harmen Stoppels2-6/+8
We run `extend spack_flags_list SPACK_LDFLAGS` for `$mode in ld|ccld`. That's problematic, cause `ccld` needs `-Wl,--flag` whereas `ld` needs `--flag` directly. Only `-L` and `-l` are common to compiler & linker. In all build systems `LDFLAGS` is for the compiler not the linker, cause any linker flag `-x` can be passed as a compiler flag `-Wl,-x`, and there are many compiler flags that affect the linker invocation, like `-fopenmp`, `-fuse-ld=`, `-fsanitize=` etc. So don't pass `LDFLAGS` to the linker directly. This way users can set `ldflags: -Wl,--allow-shlib-undefined` in compilers.yaml to work around an issue where the linker tries to resolve the `libcuda.so.1` stub lib which cannot be located by design in `cuda`.
2024-04-25build_environment.py: expand SPACK_MANAGED_DIRS with realpath (#43844)Harmen Stoppels2-16/+19