[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dpkg-shlibdeps: warning: dependency on.... (they use none of its symbols)



Dear mentors,

I am getting this warning when I build a package which I maintain called quickplot:

dpkg-shlibdeps: warning: dependency on libcairomm-1.0.so.1 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).
dpkg-shlibdeps: warning: dependency on libfontconfig.so.1 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).
dpkg-shlibdeps: warning: dependency on libatk-1.0.so.0 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgio-2.0.so.0 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgdk_pixbuf-2.0.so.0 could be avoided
if "debian/quickplot/usr/bin/quickplot" were not uselessly linked against it
(they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgmodule-2.0.so.0 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).
dpkg-shlibdeps: warning: dependency on libcairo.so.2 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpango-1.0.so.0 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgiomm-2.4.so.1 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpangocairo-1.0.so.0 could be avoided
if "debian/quickplot/usr/bin/quickplot" were not uselessly linked against it
(they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libfreetype.so.6 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpangoft2-1.0.so.0 could be avoided if
"debian/quickplot/usr/bin/quickplot" were not uselessly linked against it (they
use none of its symbols).


I have researched and read about it. In the first place, I found that
dh_shlibdeps is a wrapper of dpkg-shlibdeps. It is the responsible of
calculating all the shared libraries dependencies for executables, and it is
called in debian/rules after the executables are compiled and before dh_gencontrol.

Those warnings would mean either that quickplot is not using those libraries'
symbols at all or that those libraries are not providing symbols correctly (I am
not so sure about this last argument). After two days reading, I stumble, when
reading in Wikipedia¹ into readelf which displays information about ELF files.
When I passed it to the binary I got:


$ readelf -a debian/quickplot/usr/bin/quickplot | grep NEEDED

muammar@obey:~/src/main/programs/quickplot/quickplot-0.8.15$ readelf
-a debian/quickplot/usr/bin/quickplot |grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libgtkmm-2.4.so.1]
 0x00000001 (NEEDED)                     Shared library: [libgiomm-2.4.so.1]
 0x00000001 (NEEDED)                     Shared library: [libgdkmm-2.4.so.1]
 0x00000001 (NEEDED)                     Shared library: [libatkmm-1.6.so.1]
 0x00000001 (NEEDED)                     Shared library: [libgtk-x11-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpangomm-1.4.so.1]
 0x00000001 (NEEDED)                     Shared library: [libcairomm-1.0.so.1]
 0x00000001 (NEEDED)                     Shared library: [libglibmm-2.4.so.1]
 0x00000001 (NEEDED)                     Shared library: [libsigc-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgdk-x11-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libatk-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpangoft2-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library:
[libgdk_pixbuf-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library:
[libpangocairo-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgio-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libcairo.so.2]
 0x00000001 (NEEDED)                     Shared library: [libpango-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libfreetype.so.6]
 0x00000001 (NEEDED)                     Shared library: [libfontconfig.so.1]
 0x00000001 (NEEDED)                     Shared library: [libgobject-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgmodule-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libglib-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libsndfile.so.1]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]

Furthermore, I executed ldd which prints dependencies on Shared Libraries:

$ ldd debian/quickplot/usr/bin/quickplot
       linux-gate.so.1 =>  (0xb7efe000)
       libgtkmm-2.4.so.1 => /usr/lib/libgtkmm-2.4.so.1 (0xb7baf000)
       libgiomm-2.4.so.1 => /usr/lib/libgiomm-2.4.so.1 (0xb7b4a000)
       libgdkmm-2.4.so.1 => /usr/lib/libgdkmm-2.4.so.1 (0xb7b01000)
       libatkmm-1.6.so.1 => /usr/lib/libatkmm-1.6.so.1 (0xb7abc000)
       libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb771d000)
       libpangomm-1.4.so.1 => /usr/lib/libpangomm-1.4.so.1 (0xb76ef000)
       libcairomm-1.0.so.1 => /usr/lib/libcairomm-1.0.so.1 (0xb76d5000)
       libglibmm-2.4.so.1 => /usr/lib/libglibmm-2.4.so.1 (0xb767d000)
       libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0 (0xb7677000)
       libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb75ec000)
       libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb75d1000)
       libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb75a9000)
       libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb758f000)
       libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb7585000)
       libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xb7518000)
       libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb74a0000)
       libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb745c000)
       libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb73e4000)
       libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb73b9000)
       libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb737c000)
       libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7378000)
       libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb72c2000)
       libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0xb725b000)
       libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb716d000)
       libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7147000)
       libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb713a000)
       libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb6fd9000)
       libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb6fc0000)
       libz.so.1 => /usr/lib/libz.so.1 (0xb6faa000)
       libX11.so.6 => /usr/lib/libX11.so.6 (0xb6e8c000)
       libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xb6e89000)
       libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb6e86000)
       libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb6e81000)
       libXext.so.6 => /usr/lib/libXext.so.6 (0xb6e72000)
       libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb6e69000)
       libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb6e66000)
       libXi.so.6 => /usr/lib/libXi.so.6 (0xb6e5d000)
       libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb6e56000)
       libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb6e4c000)
       libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb6e48000)
       libpcre.so.3 => /usr/lib/libpcre.so.3 (0xb6e19000)
       libselinux.so.1 => /lib/libselinux.so.1 (0xb6e00000)
       libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xb6dbe000)
       libdirectfb-1.2.so.0 => /usr/lib/libdirectfb-1.2.so.0 (0xb6d44000)
       libfusion-1.2.so.0 => /usr/lib/libfusion-1.2.so.0 (0xb6d3b000)
       libdirect-1.2.so.0 => /usr/lib/libdirect-1.2.so.0 (0xb6d24000)
       libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb6d00000)
       libxcb-render-util.so.0 => /usr/lib/libxcb-render-util.so.0 (0xb6cfc000)
       libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0xb6cf4000)
       libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb6cdb000)
       libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb6cb5000)
       libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0xb6c62000)
       libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0xb6b69000)
       libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb6b3f000)
       libogg.so.0 => /usr/lib/libogg.so.0 (0xb6b3a000)
       /lib/ld-linux.so.2 (0xb7eff000)
       libXau.so.6 => /usr/lib/libXau.so.6 (0xb6b37000)
       libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6b32000)

So, if I look into the output of those two commands the libraries that
dpkg-shlibdeps warn me of, I can see that they seem to be used by the binary.
Maybe this is a bug in the libraries and not in quickplot.
I don't know if I am right in this, I have had to read lots of documents to
think this. The solution should be to avoid linking quickplot to those
libraries. I have researched how to do it, but I
haven't found how can I do it. I thought to override the automatic detected
shared libraries with an shlibs.local file, but I am not sure if this is a good
workaround. Could somebody help me with this? I'll appreciate any argument and
thoughts from all of you.


Thanks for reading,

1. http://en.wikipedia.org/wiki/Executable_and_Linkable_Format
-- 
Muammar El Khatib.
Linux user: 403107.
GPG Key = 127029F1
http://muammar.me | http://proyectociencia.org
  ,''`.
 : :' :
 `. `'
   `-


Reply to: