Commit Graph

89 Commits

Author SHA1 Message Date
Tamara Dahlgren
9278c0df21
binutils: convert to new stand-alone test process (#37690) 2023-05-29 11:59:09 +02:00
Harmen Stoppels
af9b9f6baf
binutils: enable debug section compression with zlib by default (#37359) 2023-05-05 14:14:48 +02:00
Chris Green
c110bcc5af
libintl, iconv, gettext: account for libc provider and externals (#35450)
* libiconv can be provided by libc, so update packages which depend on
  libiconv to require the iconv virtual instead
* Many packages need special consideration when locating iconv depending
  on whether it is provided by libc (no prefix provided) or the libiconv
  package (in that case we want to provide a prefix)
* It was also noticed that when an iconv external was provided, that
  there was interference with linking (this should generally be handled
  by Spack's compiler wrappers and bears further investigation)
* Like iconv, libintl can be provided by libc or another package, namely
  gettext. It is not converted to a provider like libiconv because it
  provides additional routines. The logic is similar to that of iconv
  but instead of checking the provider, we check whether the gettext
  installation includes libintl.
2023-05-02 18:18:30 -07:00
Massimiliano Culpo
a1703fa437
binutils: deprecate old version, build static on darwin (#36646)
The issue comes from libctf.
2023-04-05 09:20:09 +02:00
Harmen Stoppels
88548ba76f
binutils 2.40: add missing zstd dep (#36598) 2023-04-03 06:41:38 +02:00
Adam J. Stewart
603569e321
Style: black 23, skip magic trailing comma (#35351)
* Style: black 23, skip magic trailing commas

* isort should use same line length as black

* Fix unused import

* Update version of black used in CI

* Update new packages

* Update new packages
2023-02-16 23:06:12 -06:00
Massimiliano Culpo
ddecf07045
Use the maintainers directive in all packages (#35201) 2023-02-01 21:07:25 -08:00
Harmen Stoppels
c329f7de33
binutils: v2.30, 2.39, 2.40 (#35128)
- Add `binutils +pgo`
- Add dejagnu build dep and fix its deps
- Default to -O3 -g0 when using gcc/clang to make binutils faster and
  smaller
2023-01-26 10:28:26 +01:00
Harmen Stoppels
fce95e2efb
license year bump (#34921)
* license bump year
* fix black issues of modified files
* mypy
* fix 2021 -> 2023
2023-01-18 14:30:17 -08:00
Jon Rood
7ee4499f2b
Add texinfo dependency for binutils through version 2.38. (#34173) 2022-12-08 03:08:37 +01:00
Massimiliano Culpo
30c9ff50dd
Allow for packages with multiple build-systems (#30738)
This commit extends the DSL that can be used in packages
to allow declaring that a package uses different build-systems
under different conditions.

It requires each spec to have a `build_system` single valued
variant. The variant can be used in many context to query, manipulate
or select the build system associated with a concrete spec.

The knowledge to build a package has been moved out of the
PackageBase hierarchy, into a new Builder hierarchy. Customization
of the default behavior for a given builder can be obtained by
coding a new derived builder in package.py.

The "run_after" and "run_before" decorators are now applied to
methods on the builder. They can also incorporate a "when="
argument to specify that a method is run only when certain
conditions apply.

For packages that do not define their own builder, forwarding logic
is added between the builder and package (methods not found in one
will be retrieved from the other); this PR is expected to be fully
backwards compatible with unmodified packages that use a single
build system.
2022-10-26 20:17:32 +02:00
Todd Gamblin
f52f6e99db black: reformat entire repository with black 2022-07-31 13:29:20 -07:00
Tom Scogland
18c2f1a57a
refactor: packages import spack.package explicitly (#30404)
Explicitly import package utilities in all packages, and corresponding fallout.

This includes:

* rename `spack.package` to `spack.package_base`
* rename `spack.pkgkit` to `spack.package`
* update all packages in builtin, builtin_mock and tutorials to include `from spack.package import *`
* update spack style
  * ensure packages include the import
  * automatically add the new import and remove any/all imports of `spack` and `spack.pkgkit`
    from packages when using `--fix`
  * add support for type-checking packages with mypy when SPACK_MYPY_CHECK_PACKAGES
    is set in the environment
* fix all type checking errors in packages in spack upstream
* update spack create to include the new imports
* update spack repo to inject the new import, injection persists to allow for a deprecation period

Original message below:
 
As requested @adamjstewart, update all packages to use pkgkit.  I ended up using isort to do this,
so repro is easy:

```console
$ isort -a 'from spack.pkgkit import *' --rm 'spack' ./var/spack/repos/builtin/packages/*/package.py
$ spack style --fix
```

There were several line spacing fixups caused either by space manipulation in isort or by packages
that haven't been touched since we added requirements, but there are no functional changes in here.

* [x] add config to isort to make sure this is maintained going forward
2022-05-28 12:55:44 -04:00
eugeneswalker
e691d6df64
binutils@2.38 %gcc: add -fPIC -fcommon -Wl,-z,notext (#30345) 2022-05-02 15:38:07 +02:00
luker
f40780310b
CrayPE_binutils package fix for CCE (#30338) 2022-04-29 09:36:52 +02:00
Derek Ryan Strong
f66139dfe4
Add fix for binutils 2.38 +gas makeinfo issue (#30209)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-27 12:11:48 +02:00
Glenn Johnson
c6556b7a06
Adjust binutils detection (#29188)
The `spack external find binutils` command was failing to find my system
binutils because the regex was not matching. The name of the executable
follows the string 'GNU' that I tested with three different
installations so I changed the regex to look for that. On my CentOS-7
system, the version had the RPM details so I set the version to capture
the first three parts of the version.
2022-02-24 17:52:45 -08:00
Harmen Stoppels
39fcafaf45
binutils: add v2.38 (#29067) 2022-02-19 06:02:34 -07:00
Massimiliano Culpo
7fd94fc4bc
spack external find: change default behavior (#29031)
See https://github.com/spack/spack/issues/25353#issuecomment-1041868116

This commit changes the default behavior of
```
$ spack external find
```
from searching all the possible packages Spack knows about to
search only for the ones tagged as being a "build-tool".

It also introduces a `--all` option to restore the old behavior.
2022-02-18 11:51:01 -07:00
Tom Scogland
a0bd6c8817
binutils: add external detection (#29022) 2022-02-17 08:45:24 +01:00
Todd Gamblin
93377942d1 Update copyright year to 2022 2022-01-14 22:50:21 -08:00
Mark W. Krentel
2edfccf61d
binutils: fix parallel make for version 2.36 (#26611)
There was a bug in 2.36.* of missing Makefile dependencies.  The
previous workaround was to require 2.36 to be built serially.  This is
now fixed upstream in 2.37 and this PR adds the patch to restore
parallel make to 2.36.
2021-10-12 19:01:46 +02:00
Harmen Stoppels
b9e72557e8
Remove .99 from version ranges (#26422)
In most cases, .99 can be omitted thanks to #26402 .
2021-10-03 09:09:02 -04:00
Vanessasaurus
8e61f54260
start of work to add spack audit packages-https checker (#25670)
This PR will add a new audit, specifically for spack package homepage urls (and eventually
other kinds I suspect) to see if there is an http address that can be changed to https.

Usage is as follows:

```bash
$ spack audit packages-https <package>
```
And in list view:

```bash
$ spack audit list
generic:
  Generic checks relying on global variables

configs:
  Sanity checks on compilers.yaml
  Sanity checks on packages.yaml

packages:
  Sanity checks on specs used in directives

packages-https:
  Sanity checks on https checks of package urls, etc.
```

I think it would be unwise to include with packages, because when run for all, since we do requests it takes a long time. I also like the idea of more well scoped checks - likely there will be other addresses for http/https within a package that we eventually check. For now, there are two error cases - one is when an https url is tried but there is some SSL error (or other error that means we cannot update to https):

```bash
$ spack audit packages-https zoltan
PKG-HTTPS-DIRECTIVES: 1 issue found
1. Error with attempting https for "zoltan": 
    <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'www.cs.sandia.gov'. (_ssl.c:1125)>
```
This is either not fixable, or could be fixed with a change to the url or (better) contacting the site owners to ask about some certificate or similar.

The second case is when there is an http that needs to be https, which is a huge issue now, but hopefully not after this spack PR.

```bash
$ spack audit packages-https xman
Package "xman" uses http but has a valid https endpoint.
```

And then when a package is fixed:

```bash
$ spack audit packages-https zlib
PKG-HTTPS-DIRECTIVES: 0 issues found.
```
And that's mostly it. :)

Signed-off-by: vsoch <vsoch@users.noreply.github.com>

Co-authored-by: vsoch <vsoch@users.noreply.github.com>
2021-09-02 08:46:27 +02:00
Massimiliano Culpo
6fb8122187
binutils: add v2.37 (#25356) 2021-08-11 02:52:42 -07:00
eugeneswalker
4cd53cadb0
binutils: fix NameError from commit de8027 (#23715) 2021-05-18 09:03:08 +02:00
lukebroskop
de8027a820
CrayPE fix for binutils (#23500)
Allow for multiple definitions at link time (for CrayPE)

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2021-05-17 09:26:15 -07:00
Harmen Stoppels
b768d7bb09
lzo, lz4, xz, binutils: add libs multi-valued variant (#23474) 2021-05-12 12:31:02 +02:00
Michael Kuhn
d2cc248192
binutils: Improve flag_handler (#22642)
`flag_handler` currently passes all flags via injection. This makes it
impossible to override the default flags provided by autotools (for
instance, `binutils cflags='-O2'` will still build with `-O2 -g`).
Instead, use injection for our workaround flags and pass other flags to
the build system.
2021-05-10 10:03:24 +02:00
Harmen Stoppels
3578132e76
Another binutils fix (#23337)
* Building binutils with gold implies building ld

* add +ld to llvm to make the old concretizer happy and add +gas to gcc since that's used in the package.py

* Remove sys
2021-05-02 23:27:43 +02:00
Harmen Stoppels
94f894b1b2
binutils: default to +plugins (#23309) 2021-04-28 13:51:26 +02:00
Harmen Stoppels
173954e568
binutils: drop overly strict conflicts for assembler/linker (#23122)
This has been checked with gcc on ubuntu 16.04, which ships binutils 2.26 by
default, using spack's binutils 2.36. Only the combination +gas and ~ld
seems to trigger this incompatibility with debug symbols (gcc -g -O2
main.c fails with the error in the comment above the conflict)
2021-04-20 09:27:12 +02:00
Harmen Stoppels
0f47464df4
binutils: add option for assembler, constrain 'as' and 'ld' variants (#23065)
Avoid that the user builds the assembler without the linker, because you
may run into problems when the host linker is old:

https://wiki.gentoo.org/wiki/Binutils_2.32_upgrade_notes/elfutils_0.175:_unable_to_initialize_decompress_status_for_section_.debug_info
2021-04-19 11:55:39 +02:00
Harmen Stoppels
e7d392c49a
Fix issue where binutils builds ld with ~ld (#22959)
Let's be very explicit and always add --enable or --disable.
2021-04-13 16:31:44 +02:00
Mark W. Krentel
14c1d58b5a
binutils: add versions 2.35.2 and 2.36.1 (#22019)
Starting with 2.36, the Makefiles are missing some dependencies for
linking libctf and thus require serial make install.
2021-03-01 08:53:55 -08:00
Todd Gamblin
a8ccb8e116 copyrights: update all files with license headers for 2021
- [x] add `concretize.lp`, `spack.yaml`, etc. to licensed files
- [x] update all licensed files to say 2013-2021 using
      `spack license update-copyright-year`
- [x] appease mypy with some additions to package.py that needed
      for oneapi.py
2021-01-02 12:12:00 -08:00
Greg Becker
77b2e578ec
spack test (#15702)
Users can add test() methods to their packages to run smoke tests on
installations with the new `spack test` command (the old `spack test` is
now `spack unit-test`). spack test is environment-aware, so you can
`spack install` an environment and then run `spack test run` to run smoke
tests on all of its packages. Historical test logs can be perused with
`spack test results`. Generic smoke tests for MPI implementations, C,
C++, and Fortran compilers as well as specific smoke tests for 18
packages.

Inside the test method, individual tests can be run separately (and
continue to run best-effort after a test failure) using the `run_test`
method. The `run_test` method encapsulates finding test executables,
running and checking return codes, checking output, and error handling.

This handles the following trickier aspects of testing with direct
support in Spack's package API:

- [x] Caching source or intermediate build files at build time for
      use at test time.
- [x] Test dependencies,
- [x] packages that require a compiler for testing (such as library only
      packages).

See the packaging guide for more details on using Spack testing support.
Included is support for package.py files for virtual packages. This does
not change the Spack interface, but is a major change in internals.

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
Co-authored-by: wspear <wjspear@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2020-11-18 02:39:02 -08:00
fodinabor
472c365b58
binutils: Fix checksum for 2.35.1 (#19901)
As noted in #19899 and introduced by #19827
2020-11-13 12:55:58 -06:00
Tim Haines
a1e9d584e1
binutils: add version 2.35.1 (#19827) 2020-11-12 19:05:24 -06:00
Adam J. Stewart
741bb9bafe
install/install_tree: glob support (#18376)
* install/install_tree: glob support

* Add unit tests

* Update existing packages

* Raise error if glob finds no files, document function raises
2020-09-03 10:47:19 -07:00
eugeneswalker
9befc43708
binutils: add build dep: diffutils (provides cmp) (#18361) 2020-08-28 11:31:43 -07:00
eugeneswalker
f7d156af05
binutils: add version 2.35 (#18291) 2020-08-26 11:54:33 -05:00
Massimiliano Culpo
14599f09be
Separate Apple Clang from LLVM Clang (#17110)
* Separate Apple Clang from LLVM Clang

Apple Clang is a compiler of its own. All places
referring to "-apple" suffix have been updated.

* Hack to use a dash in 'apple-clang'

To be able to use autodoc from Sphinx we need
a valid Python name for the module that contains
Apple's Clang code.

* Updated packages to account for the existence of apple-clang

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Added unit test for XCode related functions

Co-authored-by: Gregory Becker <becker33@llnl.gov>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2020-06-25 11:18:48 -05:00
Michael Kuhn
154504da71
binutils: fix build with gcc@10: (#16661)
The issue seems to be fixed in the development version already.
2020-05-15 13:13:04 +02:00
Carson Woods
3cbc26cfa6
Add additional configuration options for binutils (#15753) 2020-03-29 23:05:11 -05:00
Michael Kuhn
e01817cb15
binutils: Add missing texinfo dependency (#15444) 2020-03-11 19:34:24 -05:00
Mathias Anselmann
da677b3cb8
update binutils to 2.34 (#15401) 2020-03-10 10:15:31 +01:00
Seth R. Johnson
a1e3a1653a
Mark binutils-related conflicts (#15075)
* Mark conflicts with binutils on darwin

* Explicitly require binutils bootstrapping and mark conflict with nvptx

* Disable gold variant by default on darwin
2020-02-20 12:00:48 -06:00
Mark W. Krentel
5053dfa259 binutils, libiberty: add version 2.33.1 2020-01-22 21:50:10 -08:00
Todd Gamblin
4af6303086
copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00