[Pkg-rust-maintainers] Bug#1025101: rust-zstd-safe: Disabling std feature disables code

Christopher Hoskin mans0954 at debian.org
Tue Nov 29 20:11:04 GMT 2022


Source: rust-zstd-safe
Version: 5.0.2-1
Severity: normal

Dear Maintainer,

I'm trying to build the elan package[1] against lib-rust-zstd and I'm running 
into errors like the following:
```
error[E0277]: the trait bound `Vec<_>: WriteBuf` is not satisfied
   --> /usr/share/cargo/registry/elan-1.4.2/debian/cargo_registry/zstd-0.11.2/src/bulk/compressor.rs:135:39
    |
135 |         self.compress_to_buffer(data, &mut buffer)?;
    |              ------------------       ^^^^^^^^^^^ the trait `WriteBuf` is not implemented for `Vec<_>`
    |              |
    |              required by a bound introduced by this call
    |
```
I think this is because the WriteBuf implementation for Vec<_> in the 
rust-zstd-safe Debian package is disabled by the `std` feature flag [2].

Is there a way you could get rust-zstd-safe to use the Debian libzstd without disabling this code that elan depends upon?

(N.B. Hitherto I have patched out zstd support in elan [3], but the lean
community are now depending on zstd support, so the elan package is useless
without it.)

Thanks,

Christopher Hoskin

[1] https://tracker.debian.org/pkg/elan
[2] https://sources.debian.org/src/rust-zstd-safe/5.0.2-1/src/lib.rs/#L1273
[3] https://salsa.debian.org/debian/elan/-/blob/debian/latest/debian/patches/0002-Revert-feat-support-tar.zst-archives.patch


*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.0.0-4-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_USER
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



More information about the Pkg-rust-maintainers mailing list