How to use zlib-ng in place of zlib

249 visualitzacions
Ves al primer missatge no llegit

Gregory Sjaardema

no llegida,
19 de maig 2021, 18:30:4919/5/21
a Spack
The zlib-ng package provides a "next generation" optimized implementation of zlib functionality.  If built with the `+compat` option, then it provides a drop-in replacement for zlib including a `libz.a` and `libz.so` and `zlib.h` with the correct defines/symbols.

I would like to use zlib-ng instead of zlib in a spack build, but am unsure as to how to do this in the best way.

Is there a way to tell spack that whereever `zlib` is needed to instead replace it with `zlib-ng+compat` ?

I don't want to have to go to all packages that have a zlib dependency and add a `zlib-ng` variant, instead it seems like there should be a place where I can specify that zlib-ng provides `libz.so` and then everything proceeds automatically.

Thanks,
..Greg

Rob Groner

no llegida,
20 de maig 2021, 9:28:5020/5/21
a Spack
What you're looking for is in the packages.yaml file.  In there, you can indicate that a certain package provides another package or capability.

packages:
  all:
    providers:
      zlib: [zlib-ng]

Take a look in the docs, I think this is covered there.  It's the way you indicate what packages are providing mpi or blas, etc.
Respon a tots
Respon a l'autor
Reenvia
0 missatges nous