Skip Menu |
 

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

Report information
The Basics
Id: 69394
Status: open
Priority: 0/
Queue: XML-LibXSLT

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

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Documentation/MakeFile.PL should check for libz first.
On a reasonably fresh system without many development libraries installed ( debian ), the installation of this module is a little ambiguous.

Looking at the output it gives, it indicates that "there is no libxslt available" , ie:

looking for -lxslt... no
libxslt not found
Try setting LIBS and INC values on the command line
Or get libxslt and libxml2 from
  http://www.libxml.org/
If you install via RPMs, make sure you also install the -devel
RPMs, as this is where the headers (.h files) are.

However, this is insufficient to get it to build. Even after installing libxslt1-dev , this message persists, and for all intents and purposes, it looks "broken".

Looking in the source of Makefile.PL I see "-lz" in the code that it uses to test of libxslt is compilable against or not, and on my system, libz-dev has yet to be installed.

And without libz's devel packages, this code will repeatedly report "no libxslt", even though libxslt does in fact exist.

installing libz-dev instantly solves this problem and it then generates a working Makefile.

So it should probably test for libz *first* and report if that doesn't work, before proceeding to testing libxslt.
 

( Or at very least, document somewhere in the output/README that you'll need these development headers too )
 

Download (untitled) / with headers
text/plain 1.4k
Hi Kent, On Sun Jul 10 22:40:38 2011, KENTNL wrote: Show quoted text
> On a reasonably fresh system without many development libraries
installed ( Show quoted text
> debian ), the installation of this module is a little ambiguous. > > Looking at the output it gives, it indicates that "there is no libxslt > available" , ie: > > looking for -lxslt... no > libxslt not found > Try setting LIBS and INC values on the command line > Or get libxslt and libxml2 from > http://www.libxml.org/ > If you install via RPMs, make sure you also install the -devel > RPMs, as this is where the headers (.h files) are. >
When I run Makefile.PL I'm getting this output: [QUOTE] enable native perl UTF8 running xml2-config...untested Note: libxml2 2.7.8 was not tested with this XML::LibXML version. looking for -lxml2... yes Writing Makefile for XML::LibXML [/QUOTE] Nothing about libxslt - are you sure this isn't a bug in XML::LibXSLT ? Show quoted text
> However, this is insufficient to get it to build. Even after installing > libxslt1-dev , this message persists, and for all intents and purposes, it > looks "broken". > > Looking in the source of Makefile.PL I see "-lz" in the code that it
uses to Show quoted text
> test of libxslt is compilable against or not, and on my system,
libz-dev has Show quoted text
> yet to be installed.
Well, I fixed a similar bug in XML::LibXML 's Makefile.PL and it should say that you need zlib, but I'm not actively maintaining XML::LibXSLT. So maybe you should report it there. Regards, -- Shlomi Fish
From: fschlich [...] zedat.fu-berlin.de
Download (untitled) / with headers
text/plain 2.6k
Hi, I think those dependencies on libz, libm etc in Makefile.PL are superfluous, given that the imported symbols are not used: dpkg-shlibdeps: warning: dependency on libdl.so.2 could be avoided if "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" were not uselessly linked against it (they use none of its symbols). dpkg-shlibdeps: warning: dependency on libz.so.1 could be avoided if "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" were not uselessly linked against it (they use none of its symbols). dpkg-shlibdeps: warning: dependency on libgdbm.so.3 could be avoided if "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" were not uselessly linked against it (they use none of its symbols). dpkg-shlibdeps: warning: dependency on libm.so.6 could be avoided if "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" were not uselessly linked against it (they use none of its symbols). dpkg-shlibdeps: warning: dependency on libcrypt.so.1 could be avoided if "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" were not uselessly linked against it (they use none of its symbols). dpkg-shlibdeps: warning: dependency on libgdbm_compat.so.3 could be avoided if "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" were not uselessly linked against it (they use none of its symbols). XML::LibXSLT builds fine and all tests pass with the following patch to Makefile.PL (libxslt1-dev and a current enough version of XML::LibXML are necessary, though): --- a/Makefile.PL +++ b/Makefile.PL @@ -103,31 +103,6 @@ } } -if ($config{LIBS} !~ /\-lz(lib)?\b/ and !($is_win32 && $config{LIBS} !~ /\-lzlib\b/)) { - # note if libxml2 has not -lz within its cflags, we should not use - # it! We should trust libxml2 and assume libz is not available on the - # current system (this is ofcourse not true with win32 systems. - # $config{LIBS} .= $is_Win32 ? ' -lzlib' :' -lz'; - if ( $config{DEBUG} ) { - warn "zlib was not configured\n"; - warn "set zlib\n" if $is_Win32; - } - if ($is_Win32) { - if( $ENV{ACTIVEPERL_MINGW} ) { - $config{LIBS} .= ''; - } else { - $config{LIBS} .= ' -lzlib'; - } - } else { - $config{LIBS} .= ' -lz'; - } -} - -if ($config{LIBS} !~ /\-lm\b/) { - # math support is important, but is not available separately in W32 - $config{LIBS} .= $is_Win32 ? '' :' -lm'; -} - if (!have_library($is_Win32 ? "libxslt" : "xslt")) { print STDERR <<DEATH; libxslt not found @@ -167,8 +142,6 @@ $config{DEFINE} .= " -DHAVE_EXSLT" } -$config{LIBS}.=' '.$Config{libs}; - if ($DEBUG) { print "LIBS: $config{LIBS}\n"; print "INC: $config{INC}\n"; Florian
Download (untitled) / with headers
text/plain 1.8k
Hi Florian, sorry for the late response. On Thu Sep 29 17:28:53 2011, fschlich wrote: Show quoted text
> Hi, > > I think those dependencies on libz, libm etc in Makefile.PL are > superfluous, given that the imported symbols are not used: > > dpkg-shlibdeps: warning: dependency on libdl.so.2 could be avoided if > "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" > were not uselessly linked against it (they use none of its symbols). > dpkg-shlibdeps: warning: dependency on libz.so.1 could be avoided if > "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" > were not uselessly linked against it (they use none of its symbols). > dpkg-shlibdeps: warning: dependency on libgdbm.so.3 could be avoided if > "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" > were not uselessly linked against it (they use none of its symbols). > dpkg-shlibdeps: warning: dependency on libm.so.6 could be avoided if > "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" > were not uselessly linked against it (they use none of its symbols). > dpkg-shlibdeps: warning: dependency on libcrypt.so.1 could be avoided if > "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" > were not uselessly linked against it (they use none of its symbols). > dpkg-shlibdeps: warning: dependency on libgdbm_compat.so.3 could be > avoided if > "debian/libxml-libxslt-perl/usr/lib/perl5/auto/XML/LibXSLT/LibXSLT.so" > were not uselessly linked against it (they use none of its symbols). > > > XML::LibXSLT builds fine and all tests pass with the following patch to > Makefile.PL (libxslt1-dev and a current enough version of XML::LibXML > are necessary, though): >
Well, it may be true for Debian GNU/Linux, but may not be in the general case. We can try to comment out these parts and see if anyone complains though. Regards, — Shlomi Fish


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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