[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Q: shared-lib-without-dependency-information / no autopackage test



On Thu, Feb 27, 2020 at 07:48:23PM +0100, gregor herrmann wrote:
> On Thu, 27 Feb 2020 21:27:59 +0900, Hideki Yamane wrote:
> 
> >  1. lintian warning
> > 
> > > W: libarray-base-perl: shared-lib-without-dependency-information usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Array/Base/Base.so
> >  How to specify to be it as shared object? (-shared)
> 
> I have no answer to that question but I have also seen this
> phenomenon recently in other package; and I would also like to that
> 1) what change in the toolchain is the cause and 2) if this is a
> problem

Looks like it's a change in gcc 8 -> 9.

Comparing the output of 'objdump -T' when linking with gcc-8 vs. gcc-9
("perl Build.PL --config ld=gcc-8"):

  -0000000000000000  w   DF *UND*	0000000000000000  GLIBC_2.2.5 __cxa_finalize
  +0000000000000000  w   D  *UND*	0000000000000000 __cxa_finalize

  -0000000000001f30 g    DF .text	00000000000001f3  Base        boot_Array__Base
  +0000000000001f30 g    DF .text	00000000000001f3 boot_Array__Base

The __cxa_finalize change seems to result in libc6 not added to
${shlibs:Depends} anymore. I suppose it's the only symbol that
the Perl XS DSOs have that's needed from libc.

The libc6 symbols file has

 __cxa_finalize@GLIBC_2.2.5 2.2.5

My best guess is that the 'DF' -> 'D' difference is what causes this.
IIUC the 'F' flag means that the name is the name of a function.
Having __cxa_finalize turn into a non-function symbol doesn't make
much sense to me though.

Looking further with 'strace -f -eexecve', linking with gcc-9 adds an
extra '--as-needed' flag to the ld call, and indeed calling ld manually
without that flag makes the issue go away.

So presumably this is fallout from

gcc-9 (9-20190125-2) experimental; urgency=medium
 [...]
  * Turn on ld --as-needed by default on Debian development versions.
 [...]
 -- Matthias Klose <doko@debian.org>  Fri, 25 Jan 2019 11:58:44 +0100

I'm not sure where this leaves us. I suspect that the libc6 dependency
was always there sort of "by chance". The Perl XS DSO plugins don't
necessarily need anything from libc6. Possibly lintian should just
shut up about this.
-- 
Niko Tyni   ntyni@debian.org


Reply to: