Subject
- Posted on
How to install XML::LibXML ?
- 05-06-2009
May 6, 2009, 11:03 am
perl script and requires Bundle::W3C::Validator to be installed.
Their documentation recommends to install it with
perl -MCPAN -e shell
followed by
install Bundle::W3C::Validator
Now that will try to compile many modules, among which XML::LibXML can
be found. After trying hard to get libXML installed from sources on
Windows (it has a bug and needs some modifications to compile on mingw)
and getting the headers in my compiler's default include path, I had the
surprise that the perl modules installer tries to compile the module
without actually linking the XML library. If you look on the command
line, output by nmake, you see there is no -lxml2 argument passed to the
linker in the final link step ! Although you can see many other
libraries passed to the linker there.
How can I install XML::LibXML ?
How exactly do I install perl modules ? What is the difference between
ppm and perl -MCPAN ? If I use ppm and install XML-LibXML (or something
like this, with - insted of ::) it says there is no XML-LibXML to be
installed.
The Validator documentation also mentions that the modules could be
installed manually (not recomanded), but I do not know how.
Thank you,
Timothy Madden
Re: How to install XML::LibXML ?
Specify LIBS when invoking Makefile.PL like so:
perl Makefile.PL LIBS=-lxml2
My ability to help you is limited because I never had to compile
XML::LibXML when I installed Bundle::W3C::Validator. My OS vendor
(Debian) had a pre-made binary package ready for me (for free). This is
one of the reasons I donate to Debian.
See if Microsoft or ActiveState has already created a binary module for
you. If not, I posted Debian's README file for libxml-libxml-perl; it
might give you some building tips:
http://home.earthlink.net/~mumia.w.18.spam/perl/README-LIBXML.txt
Good luck.
PS.
I don't think that SGML::Parser::OpenSP works with Perl 5.10, and SPO is
required by the validator, so use Perl 5.8.
Re: How to install XML::LibXML ?
If you particularly want to build the library yourself with mingw, I
can probably help out - but it's probably easier to get your job done
using ppm.
Assuming you're running perl-5.10, you can get version 1.65 by
running:
ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/XML-LibXML.ppd
And accept any prompts to install dll's. (Not sure if there will be
any or not.)
For that method to work, you'll first need to add the uwinnipeg rep to
your list of ppm repositories (run 'ppm help' and 'ppm help repo' for
assistance with that). This is so the dependencies get installed, too.
Alternatively, you could install the dependencies first:
ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/XML-LibXML-Common.ppd
ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/XML-SAX.ppd
ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/XML-NamespaceSupport.=
ppd
You could also check out the Bribes and Trouchelles 5.10 repositories
at http://www.bribes.org/perl/ppmdir.html and http://trouchelle.com/perl/pp=
mrepview.pl
respectively. They might have more recent versions, if that's a
consideration.
With ppm you're installing binaries that someone else has built for
you from source.
With CPAN, you're building (and then installing) those binaries
yourself. You'll need a compiler if you go down that path. MinGW would
be fine.
You'll need to access a different uwinnipeg repo if you're running
perl-5.8.x - http://theoryx5.uwinnipeg.ca/ppms/ .
Cheers,
Rob
Site Timeline
- » Namespace Tk::ForDummies::STDOUT
- — Next thread in » PERL Modules Announcements
-

- » Portability of sinl() etc - with -lm present
- — Previous thread in » PERL Modules Announcements
-

- » Upgraded from perl 5.12.3 to 5.12.4 need to upgrade perl modules...
- — Newest thread in » PERL Modules Announcements
-

- » video sizing problem
- — The site's Newest Thread. Posted in » HTML Markup Language
-

- » Link To .MJPG Stream: Different Browsers/Different Results
- — The site's Last Updated Thread. Posted in » HTML Markup Language
-





