+2007-11-28 Raphael Hertzog <hertzog@debian.org>
+
+ * scripts/dpkg-shlibdeps.pl: Do not fail if it
+ can't find unversioned libraries, just output a warning.
+ Consequently skip the check on symbols when some libs were not
+ found because one can not be sure that the symbols was not
+ provided by the missing library.
+
2007-11-28 Raphael Hertzog <hertzog@debian.org>
* scripts/dpkg-shlibdeps.pl (find_packages): Make sure to always
* Dpkg::Shlibs::find_library() now returns canonicalized paths.
* dpkg-shlibdeps always tries the realpath() of a lib as fallback when
trying to identify the package of a lib (and not only for symlinks).
+ * dpkg-shlibdeps doesn't fail any more if it can't find unversioned
+ libraries on the presumption that they are just private libraries. Outputs
+ a warning instead.
-- Guillem Jover <guillem@debian.org> Sat, 24 Nov 2007 07:38:13 +0200
# Load symbols files for all needed libraries (identified by SONAME)
my %libfiles;
my %altlibfiles;
+ my %soname_notfound;
foreach my $soname (@sonames) {
my $lib = my_find_library($soname, $obj->{RPATH}, $obj->{format}, $file);
- failure(_g("couldn't find library %s (note: only packages with " .
- "'shlibs' files are looked into)."), $soname)
- unless defined($lib);
+ unless (defined $lib) {
+ $soname_notfound{$soname} = 1;
+ my $msg = _g("couldn't find library %s needed by %s (its RPATH is '%s').\n" .
+ "Note: libraries are not searched in other binary packages " .
+ "that do not have any shlibs file.\nTo help dpkg-shlibdeps " .
+ "find private libraries, you might need to set LD_LIBRARY_PATH.");
+ if (scalar(split_soname($soname))) {
+ failure($msg, $soname, $file, join(":", @{$obj->{RPATH}}));
+ } else {
+ warning($msg, $soname, $file, join(":", @{$obj->{RPATH}}));
+ }
+ next;
+ }
$libfiles{$lib} = $soname;
my $reallib = realpath($lib);
if ($reallib ne $lib) {
my %used_sonames = map { $_ => 0 } @sonames;
my $nb_warnings = 0;
my $nb_skipped_warnings = 0;
+ # Disable warnings about missing symbols when we have not been able to
+ # find all libs
+ my $disable_warnings = scalar(keys(%soname_notfound));
foreach my $sym ($obj->get_undefined_dynamic_symbols()) {
my $name = $sym->{name};
if ($sym->{version}) {
} else {
my $syminfo = $dumplibs_wo_symfile->locate_symbol($name);
if (not defined($syminfo)) {
+ next if $disable_warnings;
# Complain about missing symbols only for executables
# and public libraries
if ($obj->is_executable() or $obj->is_public_library()) {
"them all)."), $nb_skipped_warnings) if $nb_skipped_warnings;
# Warn about un-NEEDED libraries
foreach my $soname (@sonames) {
- unless ($used_sonames{$soname}) {
+ unless ($soname_notfound{$soname} or $used_sonames{$soname}) {
warning(_g("%s shouldn't be linked with %s (it uses none of its " .
"symbols)."), $file, $soname);
}