[Bug 1481324] devel dubpackage: dependencies correction

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

 



https://bugzilla.redhat.com/show_bug.cgi?id=1481324



--- Comment #15 from Tomasz Kłoczko <kloczko.tomasz@xxxxxxxxx> ---
> The explanation is I patched perl-XML-LibXSLT's Makefile.PL to use
> $Config{perllibs} instead of $Config{libs}. The original upstream code is
> still affected.
> 
> You can see <http://grep.cpan.me/?q=%5C%24Config%5C%7Blibs%5C%7D> for all
> CPAN distributions that uses the $Config{libs} value. Maybe they are wrong.

So look on this.

[tkloczko@domek XML-LibXSLT-1.95]$ rm blib/arch/auto/XML/LibXSLT/LibXSLT.so;
make
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- LibXSLT.bs
blib/arch/auto/XML/LibXSLT/LibXSLT.bs 644
rm -f blib/arch/auto/XML/LibXSLT/LibXSLT.so
gcc  -shared -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
-L/usr/local/lib -fstack-protector-strong  LibXSLT.o perl-libxml-mm.o  -o
blib/arch/auto/XML/LibXSLT/LibXSLT.so  \
   -L/usr/lib64 -lxslt -lxml2 -lz -llzma -ldl -lm -lexslt -llzma -lgcrypt -ldl
-lgpg-error -lpthread -lresolv -lnsl -ldl -lm -lcrypt -lutil -lc -lperl   \

chmod 755 blib/arch/auto/XML/LibXSLT/LibXSLT.so
Manifying 1 pod document

so you have here all gcc command with all params and this is generating DSO
object which according to elf header uses libraries:

[tkloczko@domek XML-LibXSLT-1.95]$ objdump -x
blib/arch/auto/XML/LibXSLT/LibXSLT.so | grep NEEDED
  NEEDED               libxslt.so.1
  NEEDED               libxml2.so.2
  NEEDED               libz.so.1
  NEEDED               liblzma.so.5
  NEEDED               libdl.so.2
  NEEDED               libm.so.6
  NEEDED               libexslt.so.0
  NEEDED               libgcrypt.so.20
  NEEDED               libgpg-error.so.0
  NEEDED               libpthread.so.0
  NEEDED               libresolv.so.2
  NEEDED               libnsl.so.1
  NEEDED               libcrypt.so.1
  NEEDED               libutil.so.1
  NEEDED               libc.so.6
  NEEDED               libperl.so.5.26

Now I'll try exactly the same gcc command but with -Wl,--as-needed to allow
pass gcc to linker --as-needed whic removed from ELF header all SONAME
libraries which in reality are not used by this binary:

[tkloczko@domek XML-LibXSLT-1.95]$ gcc  -shared -Wl,--as-needed -Wl,-z,relro
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib
-fstack-protector-strong  LibXSLT.o perl-libxml-mm.o  -o
blib/arch/auto/XML/LibXSLT/LibXSLT.so     -L/usr/lib64 -lxslt -lxml2 -lz -llzma
-ldl -lm -lexslt -llzma -lgcrypt -ldl -lgpg-error -lpthread -lresolv -lnsl -ldl
-lm -lcrypt -lutil -lc -lperl; objdump -x blib/arch/auto/XML/LibXSLT/LibXSLT.so
| grep NEEDED
  NEEDED               libxslt.so.1
  NEEDED               libxml2.so.2
  NEEDED               libexslt.so.0
  NEEDED               libpthread.so.0
  NEEDED               libc.so.6
  NEEDED               libperl.so.5.26

Do you see the difference? Do you see that except libc which is added by
standard gcc spec NONE of the perllib libraries are used by this module?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
perl-devel mailing list -- perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to perl-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]

  Powered by Linux