dpkg-shlibdeps: warning: dependency could be avoided

dpkg-shlibdeps: warning: dependency on $(lib) could be avoided if $(object) were not uselessly linked against it (they use none of its symbols).

I didn’t like this build time warning at all. In the library packaging guide a found a nifty trick, add this line to the debian/rules (this is cdbs, don’t know how it is done with debhelper scripts)


This worked for the executable and I’ve saved 300 bytes!!!!! Yeah =D

It didn’t work for the library though =( Bummer.


2 Responses to dpkg-shlibdeps: warning: dependency could be avoided

  1. Craig says:

    I had this exact issue, and it was really driving me nuts. Your suggestion worked great, and I’m using it in the Debian geoclue package.

  2. dmitrijledkov says:

    On a side-note later I’ve realised that there could be another reason. Upstream sometimes overdoes with import statements, hence the binary gets linked with too many libraries. If you know how to program dig into upstream code and try to minimise amount of libraries used…… and try to get patch upstream…… unless they are hostile and hate everything debian related =D lol

%d bloggers like this: