rhall30 has asked for the wisdom of the Perl Monks concerning the following question:

We are trying to install
XML::LibXSLT 1.58
Using a sunfreeware.com Xslt C library, file name libxml2-2.6.16-sol8-sparc-local.gz , I got this error after executing perl Makefile.PL

# perl Makefile.PL running xslt-config... ok 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.
Using pkgadd –d the library was installed in:
# ls /usr/local/lib libexslt.a libexslt.so.0.8.2 libstdc++.la libxslt.a libxslt.so.1.1.2 libz.so.1.2.1 libexslt.la libgcc_s.so libstdc++.so libxslt.la libz.a pkgconfig libexslt.so libgcc_s.so.1 libstdc++.so.6 libxslt.so libz.so sparcv9 libexslt.so.0 libstdc++.a libstdc++.so.6.0.1 libxslt.so.1 libz.so.1 xsltConf.sh
Inside the file Makefile.PL this line points to:
$config{LIBS} = '-L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm';
--which is apparently creating the above error.

We did also visit http://www.libxml.org/ --as recommended-- But we found the single download file of what seems to be source code only, no instructions or make files, etc. That is why we are using the sun freeware. We are running Solaris 8.
Hope this is clear and complete enough. Can you see what we are doing wrong? We tried a lot more than I show here, but it all boils down to this, as shown.

Edit: holli added rudimentary formatting.

In answer to the 2 suggestions below:
Did the Make file as requested. It didn't work but we are attempting to edit the makefile it produced, supplying needed libraries, paths. As of today (4/10/06) we tested the new install and it seems to be working. Testing indicated a minority of scripts failing, but this likely means nothing; that happens on some packages. Basically we had to create our own Makefile...gradually, step by step.
We had already installed XML::LibXML::Common first. The basic problem is the build won't find the library libxslt when given a valid path to it.

Replies are listed 'Best First'.
Re: libxslt not found
by syphilis (Archbishop) on Apr 03, 2006 at 23:58 UTC
    Just reading through the Makefile.PL, I find it a little hard to follow with any certainty. It looks to me that it should be working ok for you - but perhaps there's a bug in the checks that it performs. What happens if you replace the existing Makefile.PL with this:
    use ExtUtils::MakeMaker; WriteMakefile( 'NAME' => 'XML::LibXSLT', 'VERSION_FROM' => 'LibXSLT.pm', # finds $VERSION 'AUTHOR' => 'Matt Sergeant', 'ABSTRACT' => 'Interface to Gnome libxslt library', 'PREREQ_PM' => { 'XML::LibXML' => "1.58", }, 'LIBS' => ['-lxslt -lxml2 -lz -lm'], 'OBJECT' => '$(O_FILES)', );
    Even if you get some warnings when running that Makefile.PL, follow it up by running 'make' and see what happens. If it doesn't work you can always start over again by first running 'make clean'.

    Cheers,
    Rob
Re: libxslt not found
by planetscape (Chancellor) on Apr 04, 2006 at 15:11 UTC

    As I recall, I had problems installing libxml/libxslt as well. I've had a look through my notes, and while I cannot find specifics related to libxslt, I solved the libxml problem by installing XML::LibXML::Common first, as described here.

    If I'm not mistaken, I believe you will also want to insure that the directories containing the libs are in your PATH environment variable.

    HTH,

    planetscape