Skip to content

Commit ec500ad

Browse files
authored
zlib-api: use zlib-ng +compat by default (spack#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 spack#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
1 parent 30f5c74 commit ec500ad

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

etc/spack/defaults/packages.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ packages:
6060
xxd: [xxd-standalone, vim]
6161
yacc: [bison, byacc]
6262
ziglang: [zig]
63-
zlib-api: [zlib, zlib-ng+compat]
63+
zlib-api: [zlib-ng+compat, zlib]
6464
permissions:
6565
read: world
6666
write: user

var/spack/repos/builtin/packages/zlib-ng/package.py

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ class ZlibNg(AutotoolsPackage, CMakePackage):
1212

1313
homepage = "https://github.com/zlib-ng/zlib-ng"
1414
url = "https://github.com/zlib-ng/zlib-ng/archive/2.0.0.tar.gz"
15+
git = "https://github.com/zlib-ng/zlib-ng.git"
16+
17+
maintainers("haampie")
1518

1619
version("2.1.3", sha256="d20e55f89d71991c59f1c5ad1ef944815e5850526c0d9cd8e504eaed5b24491a")
1720
version("2.1.2", sha256="383560d6b00697c04e8878e26c0187b480971a8bce90ffd26a5a7b0f7ecf1a33")

0 commit comments

Comments
 (0)