This queue is for tickets about the XML-LibXSLT CPAN distribution.

Report information
The Basics
Id:
83028
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
JANPAZ [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Normal
Broken in:
1.80
Fixed in:
(no value)

Attachments
XML-LibXSLT-1.92-Do-not-link-against-perl-extension-libraries.patch XML-LibXSLT-1.95-Do-not-link-to-Config-libs.patch



Subject: Shouldn't Makefile.PL use $Config{perllibs} instead of $Config{libs}?
Hello, XML::LibXSLT's Makefile.PL does $config{LIBS}.=' '.$Config{libs}; Thus it appends to the gcc command all libraries needed by perl _and_ by extensions. Wouldn't it be more correct to use $Config{perllibs}? The man Config says "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). We've hit the issue when trying to install XML::LibXSLT on OpenShift: https://bugzilla.redhat.com/show_bug.cgi?id=905369 Basically, the $Config{libs} contains -lgdbm on RHEL 6 but that is not installed by default (nor by perl-devel). I've then opened bugzilla against RHEL 6 https://bugzilla.redhat.com/show_bug.cgi?id=905482 to address that but in offline communication, usage of perllibs was suggested. I understand that this is to certain extend a packaging issue within RHEL but on the other hand, if XML::LibXSLT does not need the libraries needed by the extensions only to build, it might get away with perllibs, instead of libs.
From: ppisar@redhat.com
Dne Út 29.led.2013 09:28:21, JANPAZ napsal(a):
Show quoted text
> Hello, > > XML::LibXSLT's Makefile.PL does > > $config{LIBS}.=' '.$Config{libs}; > > Thus it appends to the gcc command all libraries needed by perl _and_ by > extensions. Wouldn't it be more correct to use $Config{perllibs}?
Attached patch implements it. -- Petr
Subject: XML-LibXSLT-1.92-Do-not-link-against-perl-extension-libraries.patch
From f1b7d486cbb1fb62f0e5c141f3012a38278a90bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Thu, 8 Jan 2015 16:37:23 +0100 Subject: [PATCH] Do not link against perl extension libraries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CPAN RT #83028 Signed-off-by: Petr Písař <ppisar@redhat.com> --- Makefile.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index ce33f36..dd8468f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -192,7 +192,7 @@ if (have_library($::is_Win32 ? "libexslt" : "exslt")) { $config{DEFINE} .= " -DHAVE_EXSLT" } -$config{LIBS}.=' '.$Config{libs}; +$config{LIBS}.=' '.$Config{perllibs}; if ($DEBUG) { print "LIBS: $config{LIBS}\n"; -- 1.9.3
From: ppisar@redhat.com
Dne Čt 08.led.2015 10:58:26, ppisar napsal(a):
Show quoted text
> Dne Út 29.led.2013 09:28:21, JANPAZ napsal(a):
> > Hello, > > > > XML::LibXSLT's Makefile.PL does > > > > $config{LIBS}.=' '.$Config{libs}; > > > > Thus it appends to the gcc command all libraries needed by perl _and_ by > > extensions. Wouldn't it be more correct to use $Config{perllibs}?
>
Both variables are wrong. XML-LibXSLT should not use any of them <https://www.nntp.perl.org/group/perl.perl5.porters/2017/08/msg245959.html>.
From: ppisar@redhat.com
Dne Pá 18.srp.2017 02:29:38, ppisar napsal(a):
Show quoted text
> Both variables are wrong. XML-LibXSLT should not use any of them > <https://www.nntp.perl.org/group/perl.perl5.porters/2017/08/msg245959.html>.
And this patch removes the flags.
Subject: XML-LibXSLT-1.95-Do-not-link-to-Config-libs.patch
From 6a2e22d0d50d2fec26424cb0dcc44eb086c880db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Fri, 18 Aug 2017 11:35:33 +0200 Subject: [PATCH] Do not link to $Config{libs} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $Config{libs} as well as $Config{perllibs} are not designed for passing them to linker when building non-core XS modules. They brought in dependency on unnecessary libraries. This patch can break Win32 platform as the linker works differently there. CPAN RT #83028 Signed-off-by: Petr Písař <ppisar@redhat.com> --- Makefile.PL | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index fc0a370..4cc57a9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -198,8 +198,6 @@ if (have_library($::is_Win32 ? "libexslt" : "exslt")) { $config{DEFINE} .= " -DHAVE_EXSLT" } -$config{LIBS}.=' '.$Config{libs}; - if ($DEBUG) { print "LIBS: $config{LIBS}\n"; print "INC: $config{INC}\n"; -- 2.9.5


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.