diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2023-08-17 23:03:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-17 14:03:14 -0700 |
commit | ec500adb50517c9cd8e9d73bb69ee9c7460fd319 (patch) | |
tree | 577400c6196624c06409b5bccc5ae06c02cc9508 | |
parent | 30f5c746147425b65d962b54074d6a7575f78714 (diff) | |
download | spack-ec500adb50517c9cd8e9d73bb69ee9c7460fd319.tar.gz spack-ec500adb50517c9cd8e9d73bb69ee9c7460fd319.tar.bz2 spack-ec500adb50517c9cd8e9d73bb69ee9c7460fd319.tar.xz spack-ec500adb50517c9cd8e9d73bb69ee9c7460fd319.zip |
`zlib-api`: use `zlib-ng +compat` by default (#39358)
In the HPC package manager, we want the fastest `zlib` implementation by default. `zlib-ng` is up to 4x faster than stock `zlib`, and it can do things like take advantage of AVX-512 instructions. This PR makes `zlib-ng` the default `zlib-api` provider (`zlib-api` was introduced earlier, in #37372).
As far as I can see, the only issues you can encounter are:
1. Build issues with packages that heavily rely on `zlib` internals. In Gitlab CI only one out of hundreds of packages had that issue (it extended zlib with deflate stuff, and used its own copy of zlib sources).
2. Packages that like to detect `zlib-ng` separately and rely on `zlib-ng` internals. The only issue I've found with this among the hundreds of packages built in CI is `perl` trying to report more specific zlib-ng version details, and relied on some internals that got refactored. But yeah... that warrants a patch / conflict and is nothing special.
At runtime, you cannot really have any issues, given that zlib and zlib-ng export the exact same symbols (and zlib-ng tests this in their CI).
You can't really have issues with externals when using zlib-ng either. The only type of issue is when system zlib is rather new, and not marked as external; if another external uses new symbols, and Spack builds an older zlib/zlib-ng, then the external might not find the new symbols. But this is a configuration issue, and it's not an issue caused by zlib-ng, as the same would happen with older Spack zlib.
* zlib-api: use zlib-ng +compat by default
* make a trivial change to zlib-ng to trigger a rebuild
* add `haampie` as maintainer
-rw-r--r-- | etc/spack/defaults/packages.yaml | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/zlib-ng/package.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index aaddf5ac6b..24d19ac4cb 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -60,7 +60,7 @@ packages: xxd: [xxd-standalone, vim] yacc: [bison, byacc] ziglang: [zig] - zlib-api: [zlib, zlib-ng+compat] + zlib-api: [zlib-ng+compat, zlib] permissions: read: world write: user diff --git a/var/spack/repos/builtin/packages/zlib-ng/package.py b/var/spack/repos/builtin/packages/zlib-ng/package.py index a5615574ec..c02ca28a86 100644 --- a/var/spack/repos/builtin/packages/zlib-ng/package.py +++ b/var/spack/repos/builtin/packages/zlib-ng/package.py @@ -12,6 +12,9 @@ class ZlibNg(AutotoolsPackage, CMakePackage): homepage = "https://github.com/zlib-ng/zlib-ng" url = "https://github.com/zlib-ng/zlib-ng/archive/2.0.0.tar.gz" + git = "https://github.com/zlib-ng/zlib-ng.git" + + maintainers("haampie") version("2.1.3", sha256="d20e55f89d71991c59f1c5ad1ef944815e5850526c0d9cd8e504eaed5b24491a") version("2.1.2", sha256="383560d6b00697c04e8878e26c0187b480971a8bce90ffd26a5a7b0f7ecf1a33") |