Bug#916672: libzvbi-chains.so: undefined symbols: needs -ldl

2019-01-21 Thread Eriberto
Em seg, 17 de dez de 2018 às 05:06, Paul Wise  escreveu:
>
> Package: libzvbi0
> Version: 0.2.35-15
> Severity: normal
> File: /usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0.0.0
> User: debian...@lists.debian.org
> Usertags: undefined-symbol adequate
>
> libzvbi-chains.so needs to link with -ldl, see the output of adequate,
> symtree and objdump below. I detected this on amd64 but the Debian
> build log scanner also detected dpkg-buildpackage complaining about it
> on most architectures, see the w3m/getbuildlog output below.


Thanks a lot Paul! Your explanation was very useful.

I will fix it now, adding -ldl to DEB_LDFLAGS_MAINT_APPEND.

Cheers,

Eriberto



Bug#916672: libzvbi-chains.so: undefined symbols: needs -ldl

2018-12-16 Thread Paul Wise
Package: libzvbi0
Version: 0.2.35-15
Severity: normal
File: /usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0.0.0
User: debian...@lists.debian.org
Usertags: undefined-symbol adequate

libzvbi-chains.so needs to link with -ldl, see the output of adequate,
symtree and objdump below. I detected this on amd64 but the Debian
build log scanner also detected dpkg-buildpackage complaining about it
on most architectures, see the w3m/getbuildlog output below.

I filed this bug at severity minor since I'm not sure if there are any
programs using the zvbi-chains lib or if they already use the libdl
symbols and link with the -ldl flag or not.

This bug report brought to you by adequate:

http://bonedaddy.net/pabs3/log/2013/02/23/inadequate-software/

$ adequate libzvbi0
libzvbi0:amd64: undefined-symbol 
/usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0.0.0 => dlsym

$ man adequate | grep -A4  undefined-symbol
   undefined-symbol
   The symbol has not been found in the libraries linked with the 
binary.
   Either the binary either needs to be linked with an additional 
shared library,
   or the dependency on the shared library package that provides this 
symbol is too weak.

   References: Debian Policy §3.5, §8.6, §10.2.

$ lddtree /usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0.0.0
libzvbi-chains.so.0.0.0 => /usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0.0.0 
(interpreter => none)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
ld-linux-x86-64.so.2 => /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6

$ symtree /usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0.0.0
/usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0.0.0
libpthread.so.0 => 
pthread_testcancel,accept,recv,connect,__errno_location,send
libm.so.6 => !?! useless link !?!
libpng16.so.16 => !?! useless link !?!
libz.so.1 => !?! useless link !?!
libc.so.6 => 
socket,fflush,strcpy,gai_strerror,strrchr,dcgettext,connect,__fdelt_chk,inet_ntoa,time,__stack_chk_fail,__lxstat,unlink,listen,select,realloc,getpid,strdup,strftime,chmod,__assert_fail,gmtime,strtol,mmap,calloc,strlen,send,openlog,getaddrinfo,__errno_location,bind,getnameinfo,__syslog_chk,getsockopt,__fprintf_chk,gethostbyaddr,fputc,recv,fputs,memcpy,memcpy,__vsnprintf_chk,setsockopt,malloc,__ctype_b_loc,getenv,stderr,munmap,__snprintf_chk,readlink,strncasecmp,fwrite,gettimeofday,__memcpy_chk,accept,__strcpy_chk,__cxa_finalize,freeaddrinfo,__vasprintf_chk,strcmp,strerror,__asprintf_chk,free
WEAK => _ITM_deregisterTMCloneTable,__gmon_start__,_ITM_registerTMCloneTable
UNRESOLVED => dlsym

$ objdump -T /lib/x86_64-linux-gnu/libdl.so.2 | grep -E "($(symtree 
/usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0.0.0 | sed -n 's/UNRESOLVED => 
//p' | tr , '|'))$"
13b0 gDF .text  00b9  GLIBC_2.2.5 dlsym

$ w3m -dump https://qa.debian.org/bls/packages/z/zvbi.html | grep -A2 symbol
  • W shlibs-symbol-not-found (alpha, amd64, arm64, armel, armhf, hppa, i386,
ia64, m68k, mips, mips64el, mipsel, powerpc, powerpcspe, ppc64, ppc64el,
riscv64, s390x, sh4, sparc64, x32)

$ w3m -dump https://qa.debian.org/bls/bytag/W-shlibs-symbol-not-found.html | 
grep -A12 description
description

The build logs contains a like like

dpkg-shlibdeps: warning: symbol NAME used by BINARY found in none of the 
libraries.

Possible reasons:

  • A library not linked with a library needed.
While this can sometimes make sense in order to allow the using binary to
decide which of multiple available implementations to use, it means that
dependency information might be incorrect, optimisations like prelinking
might fail and stuff like that.

$ chronic getbuildlog zvbi last

$ grep 'dpkg-shlibdeps: warning: symbol .* used by .* found in none of the 
libraries' *.log
zvbi_0.2.35-15_alpha.log:dpkg-shlibdeps: warning: symbol dlsym used by 
debian/libzvbi0/usr/lib/alpha-linux-gnu/libzvbi-chains.so.0.0.0 found in none 
of the libraries
zvbi_0.2.35-15_amd64.log:dpkg-shlibdeps: warning: symbol dlsym used by 
debian/libzvbi0/usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0.0.0 found in none 
of the libraries
zvbi_0.2.35-15_arm64.log:dpkg-shlibdeps: warning: symbol dlsym used by 
debian/libzvbi0/usr/lib/aarch64-linux-gnu/libzvbi-chains.so.0.0.0 found in none 
of the libraries
zvbi_0.2.35-15_armel.log:dpkg-shlibdeps: warning: symbol dlsym used by 
debian/libzvbi0/usr/lib/arm-linux-gnueabi/libzvbi-chains.so.0.0.0 found in none 
of the libraries
zvbi_0.2.35-15_armhf.log:dpkg-shlibdeps: warning: symbol dlsym used by 
debian/libzvbi0/usr/lib/arm-linux-gnueabihf/libzvbi-chains.so.0.0.0 found in 
none of the libraries
zvbi_0.2.35-15_hppa.log:dpkg-shlibdeps: warning: symbol dlsym used by 
debian/libzvbi0/usr/lib/hppa-linux-gnu/libzvbi-chains.so.0.0.0 found