Tip for Obtaining Application Dependencies

To check what all libraries is an application linked to, run the ldd tool (available on most Unices):
ldd /usr/bin/qbittorrentThis should return you a list of libraries like:

linux-gate.so.1 =>  (0xffffe000)
libtorrent.so.0 => /usr/lib/libtorrent.so.0 (0xb7e98000)
libQtXml.so.4 => /usr/lib/qt4/lib/libQtXml.so.4 (0xb7e61000)
libQtGui.so.4 => /usr/lib/qt4/lib/libQtGui.so.4 (0xb7a43000)
libpng.so.3 => /usr/lib/libpng.so.3 (0xb7a1d000)
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0xb7a14000)
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0xb79fc000)
libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0xb79f4000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0xb79ea000)
libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0xb79e6000)
libXcursor.so.1 => /usr/X11R6/lib/libXcursor.so.1 (0xb79dd000)
libXinerama.so.1 => /usr/X11R6/lib/libXinerama.so.1 (0xb79da000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7971000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7941000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb7932000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb7866000)
libQtCore.so.4 => /usr/lib/qt4/lib/libQtCore.so.4 (0xb7753000)
libz.so.1 => /lib/libz.so.1 (0xb7740000)
libdl.so.2 => /lib/libdl.so.2 (0xb773c000)
libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb76ea000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb760d000)
libm.so.6 => /lib/i686/libm.so.6 (0xb75e8000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb75dd000)
libc.so.6 => /lib/i686/libc.so.6 (0xb74ae000)
libboost_filesystem.so.1 => /usr/lib/libboost_filesystem.so.1 (0xb749f000)
libboost_date_time.so.1 => /usr/lib/libboost_date_time.so.1 (0xb7492000)
libboost_thread.so.1 => /usr/lib/libboost_thread.so.1 (0xb7486000)
libXfixes.so.3 => /usr/X11R6/lib/libXfixes.so.3 (0xb7481000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7461000)
/lib/ld-linux.so.2 (0xb7f9e000)
librt.so.1 => /lib/i686/librt.so.1 (0xb744e000)

qbittorrent being a QT based application and as you can see it clearly depends on libQtXml, libQtGui and libQtCore. Based on this information, I can now add those dependencies for the qbittorrent package alongside the libtorrent library. Most of the other libs are sub-dependant libraries.

NOTE: This also means qbittorrent is not statically linked to any of the above libraries. So if libQtGui was statically linked in qbittorrent, then it won’t appear in the above list and you don’t have to worry about it being a dependency for the qbittorrent package.

This entry was posted in RPM. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">