develooper Front page | perl.perl5.porters | Postings from August 2017

Re: The meaning of $Config{libs} and $Config{perllibs}

Thread Previous | Thread Next
Leon Timmermans
August 17, 2017 16:52
Re: The meaning of $Config{libs} and $Config{perllibs}
Message ID:
On Thu, Aug 17, 2017 at 8:44 AM, Petr Pisar <> wrote:

> Hello,
> XML-LibXML blindly passes $Config{libs} value to linker flags. If perl is
> built with GDBM support, the $Config{libs} contains -lgdbm. If
> (not
> to confuse with, GNU/Linux makes distinction between libraries
> for building and for running) is removed from the system, XML-LibXML fails
> <>. Naturally
> 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
> <> and
> <>.

Yes, this looks like a bug in XML-LibXSLT to me. While apparently it fixed
some compilation issue ten years ago[1], it doesn't sound like the right
solution at all (at least under unix, on Windows perllibs is always added
to the linker flags because of the way that PE linking works).


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About