library-not-linked-against-libc
Hi,
W: libglew1: library-not-linked-against-libc ./usr/lib/libGLEW.so.1.1.3
N:
N: The package installs a library which is not dynamically linked against
N: libc.
N:
N: Usually this is a bug. Otherwise, please contact
N: lintian-maint@debian.org about this so that this exception would be
N: recognized in future versions of Lintian.
N:
glew-1.1.3$ readelf -s lib/libGLEW.so.1.1.3 | grep UND
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
494: 00000000 81 FUNC GLOBAL DEFAULT UND glXQueryExtensionsString
891: 00000000 114 FUNC GLOBAL DEFAULT UND glXGetProcAddressARB
904: 00000000 59 FUNC GLOBAL DEFAULT UND glXQueryVersion
906: 00000000 0 FUNC GLOBAL DEFAULT UND glGetString
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
627: 00000000 81 FUNC GLOBAL DEFAULT UND glXQueryExtensionsString
1024: 00000000 114 FUNC GLOBAL DEFAULT UND glXGetProcAddressARB
1037: 00000000 59 FUNC GLOBAL DEFAULT UND glXQueryVersion
1039: 00000000 0 FUNC GLOBAL DEFAULT UND glGetString
glew-1.1.3$ readelf -d lib/libGLEW.so.1.1.3 | grep NEEDED
0x00000001 (NEEDED) Shared library: [libXmu.so.6]
0x00000001 (NEEDED) Shared library: [libXi.so.6]
0x00000001 (NEEDED) Shared library: [libGLU.so.1]
0x00000001 (NEEDED) Shared library: [libGL.so.1]
0x00000001 (NEEDED) Shared library: [libXext.so.6]
0x00000001 (NEEDED) Shared library: [libX11.so.6]
do tell me why I need to link against libc. If lintian is trying to
figure out if a library lacks interlibrary dependency information, it
should look if there are no NEEDED tags in the dynamic section.
Otherwise I fail to see what the problem is.
Looking at the check that outputs this warning, It's really scary:
my $lib;
my $no_libc = 1;
$needs_depends_line = 1;
@needed = @{$NEEDED{$file}};
for $lib (@needed) {
# linked against libc5?
if ($lib =~ m/^libc\.so\.5/o) {
^^^^^^^^^^^
what if there's a library libc.so.50?
we are a bit too eager to use regexes, aren't
we?
# yes.
# libc5-compat ?
if (($file =~ m/libc5-compat/) or
($file =~ m/i486-linuxlibc1/)) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Make that $file =~ m/^(:?libc5-compat|i486-linuxlibc1)\b/
or better
my %compat_libc = map { $_ => 1 } qw/libc5-compat i486-linuxlibc1/;
...
next if exists $compat_libc{$file};
# ok, ignore it
} else {
print "W: $pkg $type: libc5-binary $file\n" unless $libc5_bi
nary{$file}++;
}
}
if ($lib =~ m/^libc/o) {
^^^^
what about the other 200+ libraries matching
^libc, hmm?
$no_libc = 0;
}
}
if ($no_libc and not $file =~ m,/libc\b,) {
^^^^^^
not to mention a handful of
library packages that match
this
if ($info =~ m/shared object/) {
print "W: $pkg $type: library-not-linked-against-libc $file\n";
} else {
print "W: $pkg $type: program-not-linked-against-libc $file\n";
}
}
Cheers,
--
Marcelo
Reply to: