How to install XML::LibXML ?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to install the W3C HTML Validator on my computer, which is a
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

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 ?

On 05/06/2009 10:03 AM, Timothy Madden wrote:
Quoted text here. Click to load it

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:

Good luck.

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 ?

Mumia W. wrote:

Quoted text here. Click to load it

Actually, the module works with perl 5.10. You just need to have opensp
installed, along with the headers (the package is libosp-dev for Ubuntu, and I
guess Debian).


Re: How to install XML::LibXML ?

Quoted text here. Click to load it

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.

Quoted text here. Click to load it

Assuming you're running perl-5.10, you can get version 1.65 by

ppm install

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
ppm install
ppm install .=

You could also check out the Bribes and Trouchelles 5.10 repositories
at and =
respectively. They might have more recent versions, if that's a

Quoted text here. Click to load it

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 - /.


Site Timeline