Skip to content

zlib-rs as a system libz.so replacement? #419

@mgorny

Description

@mgorny

On conda-forge/conda-forge.github.io#2638 (comment), adding zlib-rs as a potential provider for libz.so.1 was suggested. However, FWICS this isn't really supported right now. Besides the library being built under a different name, if I replace my system zlib.so.1 with it, I'm getting the following errors:

wget: /usr/lib64/libz.so.1: no version information available (required by /usr/lib64/libgnutls.so.30)
wget: /usr/lib64/libz.so.1: no version information available (required by /usr/lib64/libgio-2.0.so.0)

Presumably for better ABI compatibility, the library would need to export versioned symbols like zlib does.

abi-dumper suggests:

# abidiff /usr/lib64/libz.so.1 /usr/lib64/libz_rs.so.1
ELF SONAME changed
Functions changes summary: 0 Removed, 0 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
Function symbols changes summary: 48 Removed, 0 Added function symbols not referenced by debug info
Variable symbols changes summary: 1 Removed, 0 Added variable symbol not referenced by debug info

SONAME changed from 'libz.so.1' to 'libz_rs.so.1'

48 Removed function symbols not referenced by debug info:

  [D] adler32_combine64@@ZLIB_1.2.3.3
  [D] adler32_combine@@ZLIB_1.2.2
  [D] adler32_z@@ZLIB_1.2.9
  [D] compressBound@@ZLIB_1.2.0
  [D] crc32_combine64@@ZLIB_1.2.3.3
  [D] crc32_combine@@ZLIB_1.2.2
  [D] crc32_combine_gen64@@ZLIB_1.2.12
  [D] crc32_combine_gen@@ZLIB_1.2.12
  [D] crc32_combine_op@@ZLIB_1.2.12
  [D] crc32_z@@ZLIB_1.2.9
  [D] deflateBound@@ZLIB_1.2.0
  [D] deflateGetDictionary@@ZLIB_1.2.9
  [D] deflatePending@@ZLIB_1.2.5.1
  [D] deflatePrime@@ZLIB_1.2.0.8
  [D] deflateResetKeep@@ZLIB_1.2.5.2
  [D] deflateSetHeader@@ZLIB_1.2.2
  [D] deflateTune@@ZLIB_1.2.2.3
  [D] gzbuffer@@ZLIB_1.2.3.5
  [D] gzclearerr@@ZLIB_1.2.0.2
  [D] gzclose_r@@ZLIB_1.2.3.5
  [D] gzclose_w@@ZLIB_1.2.3.5
  [D] gzdirect@@ZLIB_1.2.2.3
  [D] gzfread@@ZLIB_1.2.9
  [D] gzfwrite@@ZLIB_1.2.9
  [D] gzgetc_@@ZLIB_1.2.5.2
  [D] gzoffset64@@ZLIB_1.2.3.5
  [D] gzoffset@@ZLIB_1.2.3.5
  [D] gzopen64@@ZLIB_1.2.3.3
  [D] gzprintf
  [D] gzseek64@@ZLIB_1.2.3.3
  [D] gztell64@@ZLIB_1.2.3.3
  [D] gzungetc@@ZLIB_1.2.0.2
  [D] gzvprintf@@ZLIB_1.2.7.1
  [D] inflateBack@@ZLIB_1.2.0
  [D] inflateBackEnd@@ZLIB_1.2.0
  [D] inflateBackInit_@@ZLIB_1.2.0
  [D] inflateCodesUsed@@ZLIB_1.2.9
  [D] inflateCopy@@ZLIB_1.2.0
  [D] inflateGetDictionary@@ZLIB_1.2.7.1
  [D] inflateGetHeader@@ZLIB_1.2.2
  [D] inflateMark@@ZLIB_1.2.3.4
  [D] inflatePrime@@ZLIB_1.2.2.4
  [D] inflateReset2@@ZLIB_1.2.3.4
  [D] inflateResetKeep@@ZLIB_1.2.5.2
  [D] inflateUndermine@@ZLIB_1.2.3.3
  [D] inflateValidate@@ZLIB_1.2.9
  [D] uncompress2@@ZLIB_1.2.9
  [D] zlibCompileFlags@@ZLIB_1.2.0.2

1 Removed variable symbol not referenced by debug info:

  [D] z_vstring

Is such a support a possible goal for the project?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions