mmstick / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
615 stars 50 forks source link

Binaries not being stripped #60

Closed vorner closed 6 years ago

vorner commented 6 years ago

Hello

It seems the binaries are not being stripped. I guess from two things:

root@39ede564bef9:/target/debian# ls -l usr/bin/pcaptain
-rwxr-xr-x 1 root root 5763920 Mar 22 10:29 usr/bin/pcaptain
root@39ede564bef9:/target/debian# strip usr/bin/pcaptain 
root@39ede564bef9:/target/debian# ls -l usr/bin/pcaptain
-rwxr-xr-x 1 root root 2395096 Mar 22 10:30 usr/bin/pcaptain

Am I doing something wrong?

Also, a -dbg package would be great, to contained the stripped-off symbols 😇.

kornelski commented 6 years ago

Does it work with version from master? Does it always fail, or only in cross-compilation? Can you provide a test-case?

vorner commented 6 years ago

I'll get to more experiments later on (maybe tomorrow, maybe over the weekend). What I observed however is that it always failed (cross-compiling or not, on debian stretch and on gentoo).

vorner commented 6 years ago

Test case: unmodified new binary project (cargo new --bin not-stripped).

Happens on master branch as well.

Today I tested with strable rust version, but at least one instance was with a recent nightly.

The easiest way to test it is to unpack the data.tar.xz archive in target/debian and look into that.

kornelski commented 6 years ago

Fixed. Thanks for the report.

vorner commented 6 years ago

Thank you, it really seems to have helped (tested in the native way for now) :-).