Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1025101: rust-zstd-safe: Disabling std feature disables code

30 views
Skip to first unread message

Christopher Hoskin

unread,
Nov 29, 2022, 3:20:04 PM11/29/22
to
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

Peter Green

unread,
Dec 1, 2022, 5:40:04 AM12/1/22
to
> 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?

It seems there wasn't any good reason to disable the "std" feature in zstd-safe
(unlike some of the other features) so I re-enabled it and uploaded. I also
uploaded an update to the zstd package to bring it into line with zstd-sys and
zstd-safe and make it installable.

With those packages it seems elan can be built with zstd re-enabled and a simple
bump to the dependency. A debdiff for the elan changes I used to test is
attatched.
elan.debdiff
0 new messages