Hello,
XML-LibXML blindly passes $Config{libs} value to linker flags. If perl is
built with GDBM support, the $Config{libs} contains -lgdbm. If libgdbm.so (not
to confuse with libgdm.so.4, GNU/Linux makes distinction between libraries
for building and for running) is removed from the system, XML-LibXML fails
<https://rt.cpan.org/Public/Bug/Display.html?id=83028>. Naturally XML-LibXML
does not need GDBM library at all.
I think the $Config{libs} is not supposed to be used by non-core XS modules.
It's more a documentation variable showing how perl was configured.
I recommended to XML-LibXML replacing $Config{libs} with $Config{perllibs},
but even the $Config{perllibs} contains many libraries that are not helpfull
for non-core extensions. E.g. my Perl 5.26.0 has
$Config{libs} = '-lpthread -lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat'
$Config{perllibs} = '-lpthread -lresolv -lnsl -ldl -lm -lcrypt -lutil -lc'
Documentation reads:
"libs"
From libs.U:
This variable holds the additional libraries we want to use. It is up
to the Makefile to deal with it. The list can be empty.
"perllibs"
From End.U:
The list of libraries needed by Perl only (any libraries needed by
extensions only will by dropped, if using dynamic loading).
Am I right this is a bug in XML-LibXML CPAN distribution? Or is it a bug in
how my Perl is packaged because it allows uninstalling development GDBM files?
This question comes from two contradicting Fedora/RHEL user's requests
<https://bugzilla.redhat.com/show_bug.cgi?id=905482> and
<https://bugzilla.redhat.com/show_bug.cgi?id=1481324>.
-- Petr
Thread Next