summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2022-11-25Track locks by (dev, ino); close file handlers between tests (#34122)Harmen Stoppels3-21/+37
2022-11-24docs: update info on XCode requirements (#34097)Valentin Volkl1-2/+3
2022-11-23Control Werror by converting to Wno-error (#30882)Tom Scogland5-0/+176
Using `-Werror` is good practice for development and testing, but causes us a great deal of heartburn supporting multiple compiler versions, especially as newer compiler versions add warnings for released packages. This PR adds support for suppressing `-Werror` through spack's compiler wrappers. There are currently three modes for the `flags:keep_werror` setting: * `none`: (default) cancel all `-Werror`, `-Werror=*` and `-Werror-*` flags by converting them to `-Wno-error[=]*` flags * `specific`: preserve explicitly selected warnings as errors, such as `-Werror=format-truncation`, but reverse the blanket `-Werror` * `all`: keeps all `-Werror` flags These can be set globally in config.yaml, through the config command-line flags, or overridden by a particular package (some packages use Werror as a proxy for determining support for other compiler features). We chose to use this approach because: 1. removing `-Werror` flags entirely broke *many* build systems, especially autoconf based ones, because of things like checking `-Werror=feature` and making the assumption that if that did not error other flags related to that feature would also work 2. Attempting to preserve `-Werror` in some phases but not others caused similar issues 3. The per-package setting came about because some packages, even with all these protections, still use `-Werror` unsafely. Currently there are roughly 3 such packages known.
2022-11-23`url_exists` related improvements (#34095)Harmen Stoppels2-64/+78
For reasons beyond me Python thinks it's a great idea to upgrade HEAD requests to GET requests when following redirects. So, this PR adds a better `HTTPRedirectHandler`, and also moves some ad-hoc logic around for dealing with disabling SSL certs verification. Also, I'm stumped by the fact that Spack's `url_exists` does not use HEAD requests at all, so in certain cases Spack awkwardly downloads something first to see if it can download it, and then downloads it again because it knows it can download it. So, this PR ensures that both urllib and botocore use HEAD requests. Finally, it also removes some things that were there to support currently unsupported Python versions. Notice that the HTTP spec [section 10.3.2](https://datatracker.ietf.org/doc/html/rfc2616.html#section-10.3.2) just talks about how to deal with POST request on redirect (whether to follow or not): > If the 301 status code is received in response to a request other > than GET or HEAD, the user agent MUST NOT automatically redirect the > request unless it can be confirmed by the user, since this might > change the conditions under which the request was issued. > Note: When automatically redirecting a POST request after > receiving a 301 status code, some existing HTTP/1.0 user agents > will erroneously change it into a GET request. Python has a comment about this, they choose to go with the "erroneous change". But they then mess up the HEAD request while following the redirect, probably because they were too busy discussing how to deal with POST. See https://github.com/python/cpython/pull/99731
2022-11-23Revert "gitlab: Add shared PR mirror to places pipelines look for binaries. ↵Harmen Stoppels3-17/+0
(#33746)" (#34087) This reverts commit 5c4137baf19b9e271a2f13e886d6b875aab067dd.
2022-11-23rocm: add minimum versions for amdgpu_targets (#34030)Cory Bloor1-0/+23
2022-11-23Build System docs: consistent headers (#34047)Adam J. Stewart8-30/+30
2022-11-22cmd/checksum: allow adding new versions to package (#24532)Michael Kuhn3-8/+98
This adds super-lazy maintainer mode to `spack checksum`: Instead of only printing the new checksums to the terminal, `-a` and `--add-to-package` will add the new checksums to the `package.py` file and open it in the editor afterwards for final checks.
2022-11-22spack uninstall: use topo order (#34053)Harmen Stoppels2-50/+17
2022-11-22Revert "Warn about removal of deprecated format strings (#33829)" (#34056)Massimiliano Culpo2-5/+2
This reverts commit 7f9af8d4a0bfbb1577e5ac9982624d8d0cb9b9ca.
2022-11-22Warn about removal of deprecated format strings (#33829)Greg Becker2-2/+5
Co-authored-by: becker33 <becker33@users.noreply.github.com>
2022-11-22Windows: add registry query and SDK/WDK packages (#33021)John W. Parent8-68/+552
* Add a WindowsRegistryView class, which can query for existing package installations on Windows. This is particularly important because some Windows packages (including those added here) do not allow two simultaneous installs, and this can be queried in order to provide a clear error message. * Consolidate external path detection logic for Windows into WindowsKitExternalPaths and WindowsCompilerExternalPaths objects. * Add external-only packages win-sdk and wgl * Add win-wdk (including external detection) which depends on win-sdk * Replace prior msmpi implementation with a source-based install (depends on win-wdk). This install can control the install destination (unlike the binary installation). * Update MSVC compiler to choose vcvars based on win-sdk dependency * Provide "msbuild" module-level variable to packages during build * When creating symlinks on Windows, need to explicitly specify when a symlink target is a directory * executables_in_path no-longer defaults to using PATH (this is now expected to be taken care of by the caller)
2022-11-21Spec traversal: add option for topological ordering (#33817)Harmen Stoppels2-99/+371
Spec traversals can now specify a topological ordering. A topologically- ordered traversal with input specs X1, X2... will * include all of X1, X2... and their children * be ordered such that a given node is guaranteed to appear before any of its children in the traversal Other notes: * Input specs can be children of other input specs (this is useful if a user specifies a set of specs to uninstall: some of those specs might be children of others) * `direction="parents"` will produce a reversed topological order (children always come before parents). * `cover="edges"` will generate a list of edges L such that (a) input edges will always appear before output edges and (b) if you create a list with the destination of each edge in L the result is topologically ordered
2022-11-21Speed-up a few unit-tests (#34044)Massimiliano Culpo3-3/+3
* test_suite.py: speed up slow test by using mock packages * Don't resolve the sha during unit-tests * Skip long-running test that fails, instead of executing it
2022-11-21ci: restore ability to reproduce gitlab job failures (#33953)Scott Wittenburg1-3/+18
2022-11-21uninstall: fix accidental cubic complexity (#34005)Harmen Stoppels3-17/+66
* uninstall: fix accidental cubic complexity Currently spack uninstall runs in worst case cubic time complexity thanks to traversal during traversal during traversal while collecting the specs to be uninstalled. Also brings down the number of error messages printed to something linear in the amount of matching specs instead of quadratic.
2022-11-19spack find: remove deprecated "--bootstrap" option (#34015)Massimiliano Culpo2-29/+0
2022-11-19package_base.py: Fix #34006: test msg needs to be a string (#34007)Chris Green2-2/+10
2022-11-18PackageBase should not define builder legacy attributes (#33942)Chris Green4-11/+17
* Add a regression test for 33928 * PackageBase should not set `(build|install)_time_test_callbacks` * Fix audits by preserving the current semantic Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-11-18Improve error message for requirements (#33988)Massimiliano Culpo1-1/+1
refers #33985
2022-11-17Hdf5 package: build on Windows (#31141)Jared Popelar2-1/+3
* Enable hdf5 build (including +mpi) on Windows * This includes updates to hdf5 dependencies openssl (minor edit) and bzip2 (more-extensive edits) * Add binary-based installation of msmpi (this is currently the only supported MPI implementation in Spack for Windows). Note that this does not install to the Spack-specified prefix. This implementation will be replaced with a source-based implementation Co-authored-by: John Parent <john.parent@kitware.com>
2022-11-17Waf build system: fix typo in legacy_attributes (#33958)Chris Green1-1/+1
Fix erroneous duplication of `build_time_test_callbacks` in `legacy_attributes`: one of the duplicates should be `install_time_test_callbacks`
2022-11-17docs: fix typo in multiple build systems (#33965)Harmen Stoppels1-1/+1
2022-11-17relocate.py: small refactor for file_is_relocatable (#33967)Harmen Stoppels4-39/+31
2022-11-17Remove deprecated subcommands from "spack bootstrap" (#33964)Massimiliano Culpo2-42/+23
These commands are slated for removal in v0.20
2022-11-17Add sgid notice when running on AFS (#30247)Michael Kuhn1-0/+7
2022-11-17lib/spack/spack/store.py: Fix #28170 for padding relocation (#33122)Brian Vanderwende1-0/+1
2022-11-16initial implementation of slingshot detection (#33793)Greg Becker1-0/+4
2022-11-16Upstreams: add canonicalize path (#33946)psakievich1-1/+3
2022-11-16Windows bootstrapping: remove unneeded call to add dll to PATH (#33622)John W. Parent1-7/+0
#32942 fixed bootstrapping on Windows by having the core Spack code explicitly add the Clingo package bin/ directory as a DLL path. Since then, #33400 has been merged, which ensures that the Python module installed by the Spack `clingo` package can find the DLLs in bin/. Note that this only works for Spack instances which have been bootstrapped after #33400: for installations bootstrapped before then, you will need to run `spack clean -b` (this would only be needed for Spack instances running on Windows).
2022-11-16SIP build system: fix "python not defined in builder" (#33906)Stephen Sachs1-1/+1
Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-11-16docs updates for spack env depfile (#33937)Harmen Stoppels1-6/+10
2022-11-16spack env depfile in Gitlab CI should use `install-deps/pkg-version-hash` ↵Harmen Stoppels1-3/+1
target (#33936)
2022-11-16Change code suggestions to output black formatter compliant code (#33931)Kevin Broch1-2/+2
2022-11-16Getting Started: Python 2 is no longer supported (#33927)Adam J. Stewart1-1/+1
2022-11-15docs: fix typo (#33926)Michael Kuhn1-2/+2
2022-11-15Show time per phase (#33874)Harmen Stoppels2-16/+11
2022-11-15depfile: improve tab completion (#33773)Harmen Stoppels1-14/+30
This PR allows you to do: ``` spack env create -d . spack -e . add python spack -e . concretize spack -e . env depfile -o Makefile make in<tab> # -> install make install-<tab> # -> install-deps/ make install-deps/py<tab> # -> install-deps/python-x.y.z-hash make install/zl<tab> # -> install/zlib-x.y.z-hash make SP<tab> # -> make SPACK make SPACK_<tab> # -> make SPACK_INSTALL_FLAGS= ```
2022-11-15Fixup: start the timer before the phase (#33917)Harmen Stoppels1-2/+1
2022-11-15Fix incorrect timer (#33900)Harmen Stoppels5-65/+305
Revamp the timer so we always have a designated begin and end. Fix a bug where the phase timer was stopped before the phase started, resulting in incorrect timing reports in timers.json.
2022-11-15External find now searches all dynamic linker paths (#33800)Brian Van Essen3-12/+211
Add spack.ld_so_conf.host_dynamic_linker_search_paths Retrieve the current host runtime search paths for shared libraries; for GNU and musl Linux we try to retrieve the dynamic linker from the current Python interpreter and then find the corresponding config file (e.g. ld.so.conf or ld-musl-<arch>.path). Similar can be done for BSD and others, but this is not implemented yet. The default paths are always returned. We don't check if the listed directories exist. Use this in spack external find for libraries. Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-11-15Remove exit(0) (#33896)Harmen Stoppels2-9/+7
Since they cause --backtrace to report backtraces even with exit code 0
2022-11-15Stop using `six` in Spack (#33905)Massimiliano Culpo83-618/+329
Since we dropped support for Python 2.7, there's no need so use `six` anymore. We still need to vendor it until we update our vendored dependencies.
2022-11-14gitlab: Add shared PR mirror to places pipelines look for binaries. (#33746)Scott Wittenburg3-0/+17
While binaries built for PRs that get merged must still be rebuilt in develop pipelines, they can be used by other PRs that find they would otherwise need to rebuild them. Now that spackbot is managing copying PR binaries from merged PRs into a shared location, keeping it pruned to a reasonable size, and making sure the indices are up to date, spack can use these mirrors as a potential source of binaries.
2022-11-14Add `$date` option to the list of config variables (#33875)psakievich3-0/+13
I'm finding I often want the date in my paths and it would be nice if spack had a config variable for this. Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-11-14rocm: add all GFX9, GFX10 and GFX11 amdgpu_targets (#33871)Cory Bloor1-2/+17
This change adds all documented AMDGPU processors from GFX9 through GFX11 and sorts the list.
2022-11-14Bump version to v0.20.0.dev0Todd Gamblin1-1/+1
2022-11-14Get rid of context for exceptions outside PackageBase (#33887)Harmen Stoppels1-0/+2
2022-11-14Fix a bug/typo in a config_values.py fixture (#33886)Massimiliano Culpo1-1/+1
2022-11-14Remove support for running with Python 2.7 (#33063)Massimiliano Culpo58-4197/+254
* Remove CI jobs related to Python 2.7 * Remove Python 2.7 specific code from Spack core * Remove externals for Python 2 only * Remove llnl.util.compat