If you’re using debhelper to build a package, you may find the following tricks helpful. The code snippets are from my debian/rules file, but the arguments can obviously be passed directly to dh_shlibdeps.
First, to have shlibdeps ignore all of your package (ie, don’t calculate dependencies for any of the packages you are currently building), use this:
DEB_DH_SHLIBDEPS_ARGS_ALL := -X*Note that this isn’t advised when creating packages, but is helpful to ignore shlibdeps errors when working out other issues.
Second, add a path to the directories searched for dependancies, use this:
DEB_DH_SHLIBDEPS_ARGS_ALL := -l/path/to/add
This helps when you are linking to a shared library in a package that you are also generating, but is not installed on the build system. Multiple paths can be added, separated by colons. If you’re getting errors for missing dependency information for some libs, just create a debian/shlibs.local file, providing the missing information. For example, if the error was something like:
dpkg-shlibdeps: error: no dependency information found for /some/dir/myreferencedlib.so.2 (used by debian/something/im/making). dh_shlibdeps: dpkg-shlibdeps returned exit code 2
and you know that myreferencedlib depends on the package “foo”, just make the debian/shlibs.local file contain:
myreferencedlib 2 foothe format is lib, space, major version, space, dependancies. The major version can be determined from the filename (in this example, myreferencedlib.so.2 has a major version of “2″). The shlibs.local usage is preferable to not computing dependancies, but ideally all shared libs should have associated shlibs information.
Here’s some links to more info:
- http://man.he.net/man1/dpkg-shlibdeps
- http://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-shlibslocal
- http://man.he.net/man1/dh_shlibdeps
- http://www.tin.org/bin/man.cgi?section=1&topic=dh_makeshlibs
cheers!
{ 1 comment… read it below or add one }
Thanks, you saved by day = )