kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
423 stars 50 forks source link

Test failure for `dependencies::resolve_test` #75

Closed orhun closed 1 year ago

orhun commented 1 year ago

Hello!

I'm trying to package cargo-deb for Arch Linux community and I'm getting the following error during cargo test:

test dependencies::resolve_test ... FAILED

failures:

---- dependencies::resolve_test stdout ----
thread 'dependencies::resolve_test' panicked at 'called `Result::unwrap()` on an `Err` value: CommandError("dpkg-shlibdeps", "/build/cargo-deb/src/cargo-deb-1.42.2/target/debug/deps/cargo_deb-bca004bd35b19c19", [100, 112, 107, 103, 45, 115, 104, 108, 105, 98, 100, 101, 112, 115, 58, 32, 101, 114, 114, 111, 114, 58, 32, 110, 111, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 121, 32, 105, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 32, 102, 111, 117, 110, 100, 32, 102, 111, 114, 32, 47, 108, 105, 98, 47, 108, 105, 98, 108, 122, 109, 97, 46, 115, 111, 46, 53, 32, 40, 117, 115, 101, 100, 32, 98, 121, 32, 47, 98, 117, 105, 108, 100, 47, 99, 97, 114, 103, 111, 45, 100, 101, 98, 47, 115, 114, 99, 47, 99, 97, 114, 103, 111, 45, 100, 101, 98, 45, 49, 46, 52, 50, 46, 50, 47, 116, 97, 114, 103, 101, 116, 47, 100, 101, 98, 117, 103, 47, 100, 101, 112, 115, 47, 99, 97, 114, 103, 111, 95, 100, 101, 98, 45, 98, 99, 97, 48, 48, 52, 98, 100, 51, 53, 98, 49, 57, 99, 49, 57, 41, 10, 72, 105, 110, 116, 58, 32, 99, 104, 101, 99, 107, 32, 105, 102, 32, 116, 104, 101, 32, 108, 105, 98, 114, 97, 114, 121, 32, 97, 99, 116, 117, 97, 108, 108, 121, 32, 99, 111, 109, 101, 115, 32, 102, 114, 111, 109, 32, 97, 32, 112, 97, 99, 107, 97, 103, 101, 46, 10])', src/dependencies.rs:61:37

failures:
    dependencies::resolve_test

The error message corresponds to:

dpkg-shlibdeps: error: no dependency information found for /lib/liblzma.so.5 (used by /build/cargo-deb/src/cargo-deb-1.42.2/target/debug/deps/cargo_deb-bca004bd35b19c19)
Hint: check if the library actually comes from a package.

This is also the same as running:

$ dpkg-shlibdeps -O /build/cargo-deb/src/cargo-deb-1.42.2/target/debug/deps/cargo_deb-bca004bd35b19c19

dpkg-shlibdeps: error: no dependency information found for /lib/liblzma.so.5 (used by /build/cargo-deb/src/cargo-deb-1.42.2/target/debug/deps/cargo_deb-bca004bd35b19c19)
Hint: check if the library actually comes from a package.

I'm not experienced in Debian packaging/tooling so any guidance would help!

orhun commented 1 year ago

I'm able to avoid this by using --ignore-missing-info but that's known to be a discouraged option:

Do not fail if dependency information can't be found for a shared library (since dpkg 1.14.8). Usage of this option is discouraged, all libraries should provide dependency information (either with shlibs files, or with symbols files) even if they are not yet used by other packages.

kornelski commented 1 year ago

It looks like your Debian lzma package is broken, or perhaps installed from some other source not integrated with apt?

orhun commented 1 year ago

I'm not actually using Debian and /usr/lib/liblzma.so.5 comes from xz package on Arch Linux.

kornelski commented 1 year ago

In that case it's an expected failure. The dependency resolution needs a working dpkg.