#1154461 elan: FTBFS: error[E0277]: the trait bound `PathBuf: From<std::result::Result<Cow<'_, str>, ZipError>>` is not satisfied

#1154461#5
Date:
2026-11-19 12:43:11 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202611/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:elan, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
help: use the `?` operator to extract the `Cow<'_, str>` value, propagating a `Result::Err` value to the caller
   |
88 |             if entry.name()?.ends_with('/') {
   |                            +

error[E0277]: the trait bound `PathBuf: From<std::result::Result<Cow<'_, str>, ZipError>>` is not satisfied
  --> src/elan-dist/src/component/package.rs:91:27
   |
91 |             let relpath = PathBuf::from(entry.name());
   |                           ^^^^^^^ the trait `From<std::result::Result<Cow<'_, str>, ZipError>>` is not implemented for `PathBuf`
   |
   = help: `PathBuf` implements trait `From<T>`:
             From<&T>
             From<Box<Path>>
             From<Cow<'_, Path>>
             From<normpath::base::BasePathBuf>
             From<std::ffi::OsString>
             From<std::string::String>

error[E0277]: the trait bound `OffsetDateTime: TryFrom<DateTime>` is not satisfied
   --> src/elan-dist/src/component/package.rs:120:25
    |
120 | ...   let mtime = OffsetDateTime::try_from(entry.last_modified().unwrap_or_else(zip::DateTime::default_for_write))?.unix_timestamp_...
    |                   ^^^^^^^^^^^^^^ the trait `From<DateTime>` is not implemented for `OffsetDateTime`
    |
help: `OffsetDateTime` implements trait `From<T>`
   --> /usr/share/cargo/registry/time-0.3.55/src/interop/offsetdatetime_systemtime.rs:59:1
    |
 59 | impl From<SystemTime> for OffsetDateTime {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `From<SystemTime>`
    |
   ::: /usr/share/cargo/registry/time-0.3.55/src/interop/offsetdatetime_timestamp.rs:80:1
    |
 80 | impl From<Timestamp> for OffsetDateTime {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `From<Timestamp>`
    |
   ::: /usr/share/cargo/registry/time-0.3.55/src/interop/offsetdatetime_utcdatetime.rs:71:1
    |
 71 | impl From<UtcDateTime> for OffsetDateTime {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `From<UtcDateTime>`
    = note: required for `DateTime` to implement `Into<OffsetDateTime>`
    = note: required for `OffsetDateTime` to implement `TryFrom<DateTime>`

error[E0277]: `?` couldn't convert the error to `errors::Error`
   --> src/elan-dist/src/component/package.rs:120:121
    |
120 | ... let mtime = OffsetDateTime::try_from(entry.last_modified().unwrap_or_else(zip::DateTime::default_for_write))?.unix_timestamp_na...
    |                 ------------------------------------------------------------------------------------------------^ the trait `From<Infallible>` is not implemented for `errors::Error`
    |                 |
    |                 this can't be annotated with `?` because it has type `Result<_, Infallible>`
    |
note: `errors::Error` needs to implement `From<Infallible>`
   --> src/elan-dist/src/errors.rs:10:1
    |
 10 | / error_chain! {
 11 | |     links {
 12 | |         Utils(elan_utils::Error, elan_utils::ErrorKind);
...   |
108 | | }
    | |_^
    = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
    = help: `errors::Error` implements trait `From<T>`:
              From<&str>
              From<elan_utils::Error>
              From<errors::ErrorKind>
              From<std::io::Error>
              From<std::string::String>
              From<temp::Error>
              From<time::error::ComponentRange>
    = note: this error originates in the macro `impl_error_chain_processed` which comes from the expansion of the macro `error_chain` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `OffsetDateTime: From<DateTime>` is not satisfied
   --> src/elan-dist/src/component/package.rs:120:25
    |
120 | ... let mtime = OffsetDateTime::try_from(entry.last_modified().unwrap_or_else(zip::DateTime::default_for_write))?.unix_timestamp_na...
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<DateTime>` is not implemented for `OffsetDateTime`
    |
help: `OffsetDateTime` implements trait `From<T>`
   --> /usr/share/cargo/registry/time-0.3.55/src/interop/offsetdatetime_systemtime.rs:59:1
    |
 59 | impl From<SystemTime> for OffsetDateTime {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `From<SystemTime>`
    |
   ::: /usr/share/cargo/registry/time-0.3.55/src/interop/offsetdatetime_timestamp.rs:80:1
    |
 80 | impl From<Timestamp> for OffsetDateTime {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `From<Timestamp>`
    |
   ::: /usr/share/cargo/registry/time-0.3.55/src/interop/offsetdatetime_utcdatetime.rs:71:1
    |
 71 | impl From<UtcDateTime> for OffsetDateTime {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `From<UtcDateTime>`
    = note: required for `DateTime` to implement `Into<OffsetDateTime>`
    = note: required for `OffsetDateTime` to implement `TryFrom<DateTime>`

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
warning: `elan-dist` (lib) generated 1 warning
error: could not compile `elan-dist` (lib) due to 5 previous errors; 1 warning emitted

Caused by:
  process didn't exit successfully: `CARGO=/usr/bin/cargo CA [too-long-redacted] _64-linux-gnu` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
warning: hiding a lifetime that's elided elsewhere is confusing
    --> /usr/share/cargo/registry/clap-2.34.0/src/app/mod.rs:1879:25
     |
1879 |     fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
     |                         ^^^^^            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
     |                         |
     |                         the lifetime is elided here
     |
     = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
     = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
     |
1879 |     fn default_vals_ifs(&self) -> Option<map::Values<'_, (&'n str, Option<&'e OsStr>, &'e OsStr)>> {
     |                                                      +++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> /usr/share/cargo/registry/clap-2.34.0/src/app/parser.rs:458:21
    |
458 |     pub fn required(&self) -> Iter<&str> {
    |                     ^^^^^     ^^^^^^^^^^
    |                     |         |    |
    |                     |         |    the same lifetime is elided here
    |                     |         the same lifetime is hidden here
    |                     the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
458 |     pub fn required(&self) -> Iter<'_, &str> {
    |                                    +++

warning: hiding a lifetime that's elided elsewhere is confusing
    --> /usr/share/cargo/registry/clap-2.34.0/src/app/parser.rs:2130:18
     |
2130 |     pub fn flags(&self) -> Iter<FlagBuilder<'a, 'b>> {
     |                  ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
     |                  |
     |                  the lifetime is elided here
     |
     = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
     |
2130 |     pub fn flags(&self) -> Iter<'_, FlagBuilder<'a, 'b>> {
     |                                 +++

warning: hiding a lifetime that's elided elsewhere is confusing
    --> /usr/share/cargo/registry/clap-2.34.0/src/app/parser.rs:2134:17
     |
2134 |     pub fn opts(&self) -> Iter<OptBuilder<'a, 'b>> {
     |                 ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
     |                 |
     |                 the lifetime is elided here
     |
     = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
     |
2134 |     pub fn opts(&self) -> Iter<'_, OptBuilder<'a, 'b>> {
     |                                +++

warning: hiding a lifetime that's elided elsewhere is confusing
    --> /usr/share/cargo/registry/clap-2.34.0/src/app/parser.rs:2138:24
     |
2138 |     pub fn positionals(&self) -> map::Values<PosBuilder<'a, 'b>> {
     |                        ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
     |                        |
     |                        the lifetime is elided here
     |
     = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
     |
2138 |     pub fn positionals(&self) -> map::Values<'_, PosBuilder<'a, 'b>> {
     |                                              +++

warning: hiding a lifetime that's elided elsewhere is confusing
    --> /usr/share/cargo/registry/clap-2.34.0/src/app/parser.rs:2142:24
     |
2142 |     pub fn subcommands(&self) -> Iter<App> {
     |                        ^^^^^     ^^^^^^^^^
     |                        |         |    |
     |                        |         |    the same lifetimes are hidden here
     |                        |         the same lifetime is hidden here
     |                        the lifetime is elided here
     |
     = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
     |
2142 |     pub fn subcommands(&self) -> Iter<'_, App<'_, '_>> {
     |                                       +++    ++++++++

warning: hiding a lifetime that's elided elsewhere is confusing
  --> /usr/share/cargo/registry/clap-2.34.0/src/args/any_arg.rs:42:25
   |
42 |     fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>>;
   |                         ^^^^^            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
   |                         |
   |                         the lifetime is elided here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
   |
42 |     fn default_vals_ifs(&self) -> Option<map::Values<'_, (&'n str, Option<&'e OsStr>, &'e OsStr)>>;
   |                                                      +++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> /usr/share/cargo/registry/clap-2.34.0/src/args/any_arg.rs:127:25
    |
127 |     fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
    |                         ^^^^^            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
    |                         |
    |                         the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
127 |     fn default_vals_ifs(&self) -> Option<map::Values<'_, (&'n str, Option<&'e OsStr>, &'e OsStr)>> {
    |                                                      +++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> /usr/share/cargo/registry/clap-2.34.0/src/args/arg_builder/flag.rs:138:25
    |
138 |     fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
    |                         ^^^^^            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
    |                         |
    |                         the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
138 |     fn default_vals_ifs(&self) -> Option<map::Values<'_, (&'n str, Option<&'e OsStr>, &'e OsStr)>> {
    |                                                      +++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> /usr/share/cargo/registry/clap-2.34.0/src/args/arg_builder/option.rs:192:25
    |
192 |     fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
    |                         ^^^^^            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
    |                         |
    |                         the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
192 |     fn default_vals_ifs(&self) -> Option<map::Values<'_, (&'n str, Option<&'e OsStr>, &'e OsStr)>> {
    |                                                      +++

warning: hiding a lifetime that's elided elsewhere is confusing
  --> /usr/share/cargo/registry/clap-2.34.0/src/args/arg_builder/positional.rs:81:29
   |
81 |     pub fn name_no_brackets(&self) -> Cow<str> {
   |                             ^^^^^     ^^^^^^^^ the same lifetime is hidden here
   |                             |
   |                             the lifetime is elided here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
   |
81 |     pub fn name_no_brackets(&self) -> Cow<'_, str> {
   |                                           +++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> /usr/share/cargo/registry/clap-2.34.0/src/args/arg_builder/positional.rs:209:25
    |
209 |     fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
    |                         ^^^^^            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
    |                         |
    |                         the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
209 |     fn default_vals_ifs(&self) -> Option<map::Values<'_, (&'n str, Option<&'e OsStr>, &'e OsStr)>> {
    |                                                      +++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> /usr/share/cargo/registry/clap-2.34.0/src/args/arg_matcher.rs:190:18
    |
190 |     pub fn entry(&mut self, arg: &'a str) -> Entry<&'a str, MatchedArg> {
    |                  ^^^^^^^^^                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
    |                  |
    |                  the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
190 |     pub fn entry(&mut self, arg: &'a str) -> Entry<'_, &'a str, MatchedArg> {
    |                                                    +++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> /usr/share/cargo/registry/clap-2.34.0/src/args/arg_matcher.rs:202:17
    |
202 |     pub fn iter(&self) -> Iter<&str, MatchedArg> {
    |                 ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^
    |                 |         |    |
    |                 |         |    the same lifetime is elided here
    |                 |         the same lifetime is hidden here
    |                 the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
202 |     pub fn iter(&self) -> Iter<'_, &str, MatchedArg> {
    |                                +++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> /usr/share/cargo/registry/clap-2.34.0/src/fmt.rs:132:15
    |
132 |     fn format(&self) -> AnsiString {
    |               ^^^^^     ^^^^^^^^^^ the same lifetime is hidden here
    |               |
    |               the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
132 |     fn format(&self) -> AnsiString<'_> {
    |                                   ++++

warning: hiding a lifetime that's elided elsewhere is confusing
  --> /usr/share/cargo/registry/clap-2.34.0/src/osstringext.rs:20:14
   |
20 |     fn split(&self, b: u8) -> OsSplit;
   |              ^^^^^            ^^^^^^^ the same lifetime is hidden here
   |              |
   |              the lifetime is elided here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
   |
20 |     fn split(&self, b: u8) -> OsSplit<'_>;
   |                                      ++++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> /usr/share/cargo/registry/clap-2.34.0/src/osstringext.rs:169:14
    |
169 |     fn split(&self, b: u8) -> OsSplit {
    |              ^^^^^            ^^^^^^^ the same lifetime is hidden here
    |              |
    |              the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
169 |     fn split(&self, b: u8) -> OsSplit<'_> {
    |                                      ++++

warning: `clap` (lib) generated 45 warnings
dh_auto_test: error: /usr/share/cargo/bin/cargo build returned exit code 101
make: *** [debian/rules:19: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------