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

dear monks when i install XML::LibXML perl i hav the follwing error wat is mean that and please help me to debug this error please explain me the installation process this is my error code

E:\xslt\lib>perl makefle.pl Can't open perl script "makefle.pl": No such file or directory E:\xslt\lib>perl makefile.pl Set up gcc environment - 3.4.5 (mingw-vista special r3) enable native perl UTF8 looking for -lxml2... no looking for -llibxml2... no libxml2 not found Try setting LIBS and INC values on the command line Or get libxml2 from http://xmlsoft.org/ If you install via RPMs, make sure you also install the -devel RPMs, as this is where the headers (.h files) are. Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter to see the exact reason why the detection of libxml2 installation failed or why Makefile.PL was not able to compile a test program.

Replies are listed 'Best First'.
Re: ERROR in XML::LibXML installation
by ww (Archbishop) on Jul 03, 2010 at 11:56 UTC
    First fail: misspelled makefile as makefle

    Errors in the second run: pretty self explanatory... see lines7,8,and 9 and the following advice. First find out if libxml2 is indeed on your machine; then either do as your message says in line 10 or, if not found, as it says in line 11.

    Lines 13 and 13 pertain to Linux so windows users can ignore those.)

    If none of the above serves, try the instruction at line 16.

    While I infer that you find the use of English difficult, when the answers are before you, it's best to try to decode them.
Re: ERROR in XML::LibXML installation
by SilasTheMonk (Chaplain) on Jul 03, 2010 at 12:14 UTC
    This hits me just about every time I install XML::LibXML. You need to have the underlying C libraries in place and sadly CPAN has no way of specifying such dependencies. I cannot speak for non-debian systems, but this really messes up what one would hope is a smooth install. I'm thinking of trying to use the debian packaging system much more as that can express these sort of dependencies. I think in windows the perl distributions come with their own packaging systems, but then you have a much more limited set of up-to-date modules and I am not sure how well they handle external dependencies.

      sadly CPAN has no way of specifying such dependencies

      What you can do is reflect the C library with a Perl distribution (e.g. Alien-wxWidgets). During installation, the distro checks if the necessary C library is installed. If not, the distro either fails to install itself or it installs the C library.

      I think in windows the perl distributions come with their own packaging systems

      I don't think there's anything Windows-specific about PPM. It's just that there are only repositories for ActivePerl builds. (I think they usually also work with Strawberry, and I think a change to 5.12 makes is so they always work.)

      but then you have a much more limited set of up-to-date modules

      There's an amazing list of up to date modules. Someone's probably running an automated tool. But it's probably not the same story for modules with external dependencies such as XML::LibXML.

      I am not sure how well they handle external dependencies.

      They incorporate external dependencies. XML::LibXML is now available from AS's repo for 5.12:

      >ppm install XML::LibXML Downloading ActiveState Package Repository packlist...done Updating ActiveState Package Repository database...done Downloading XML-LibXML-1.70...done Downloading XML-SAX-0.96...done Downloading XML-NamespaceSupport-1.11...done Unpacking XML-LibXML-1.70...done Unpacking XML-SAX-0.96...done Unpacking XML-NamespaceSupport-1.11...done Generating HTML for XML-LibXML-1.70...done Generating HTML for XML-SAX-0.96...done Generating HTML for XML-NamespaceSupport-1.11...done Updating files in site area...done 110 files installed
        What you can do is reflect the C library with a Perl distribution (e.g. Alien-wxWidgets). During installation, the distro checks if the necessary C library is installed. If not, the distro either fails to install itself or it installs the C library.

        I don't think what I'm about to ask is related to the original post in this thread, but I'd be interested to hear any thoughts, anyway.

        Are there Alien::* options that enable the user to specify whether static libs or shared libs are to be built ? (If not, should there be ?)
        Some libraries offer other options as well - eg the gmp library provides options regarding the allocation of memory. Does Alien::* cater for these additional options ? (If not, should it ?)

        Cheers,
        Rob

        > sadly CPAN has no way of specifying such dependencies

        What you can do is reflect the C library with a Perl distribution (e.g. Alien-wxWidgets). During installation, the distro checks if the necessary C library is installed. If not, the distro either fails to install itself or it installs the C library.

        Thanks. I will remember that when I write a perl module that depends on a C library. However that is not really the issue. XML::LibXML does implement such checks in as much as the install fails if the library. The problem is that CPAN does not (and could not be expected to) be able to reason: "Ah! libxml is missing and I am about to install XML::LibXML. I'd better install libxml first." So in conclusion I would say that the less production critical machine is, the less one should be using CPAN on it and the more one should be using the packaging system.