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

Hi all..

I have a LibXML version installed in Perl. I want to the version of the LibXML as I'm unable to load most of the latest module.

Thanks & Regards,

Sathya V.

Replies are listed 'Best First'.
Re: LibXML version
by marto (Cardinal) on Nov 25, 2013 at 13:24 UTC

    I'm not sure I understand what you're trying to ask. Are you telling us that you have libxml installed, and the perl module XML::LibXML? And that you'd like to know which version?:

    libxml

    xmllint --version

    Output:

    xmllint: using libxml version 20900

    XML::LibXML, with cpan:

    cpan -D XML::LibXML

    Output:

    XML::LibXML ---------------------------------------------------------------------- +--- CPAN: Module::CoreList loaded ok (v2.76) Interface to the libxml library S/SH/SHLOMIF/XML-LibXML-2.0107.tar.gz D:\perl\perl\site\lib\XML\LibXML.pm Installed: 2.0107 CPAN: 2.0107 up to date

    or:

    d:\>perl -MXML::LibXML -le "print $XML::LibXML::VERSION"

    Output:

    2.0107

    "I'm unable to load most of the latest module."

    You're going to have to provide more information, please read and understand How do I post a question effectively?.

      Hi Marto

      Sorry for the vague question I have posted. Let me explain the issue what I'm facing.

      I have a AIX server in which Perl and LibXML is installed. Im trying to Parse a XML file using the LibXML parser and got out of memory error for a 17 MB file. So I was trying for some other parser to load the file with less memory consumption.

      For that I have tried some other parser and got the error "Cant locate ***.al". So my understanding was I might have a older version of LibXML installed. So I need to know the version of the LibXML.

      Kindly help me in finding the version of the LibXML. FYI I have tried the options you have mentioned in your reply and nothing came with a output as you have mentioned.

      Thanks & Regards

      Sathya V.

        Are both your installed LibXML and perl 64bit builds? One of the problems on AIX is that you cannot see from the presence of a lib if it is a 32bit lib or a 64bit lib.

        If e.g. you are using a 64bit perl build which once worked with a libxml2.a that contained a 64bit set of objects, and then "upgraded" LibXML to a newer version that only shipped a 32bit set of objects (or you installed it by hand and thereby unknowingly removed the 64bit set of objects), then you will not be able to get this to work.

        $ file libxml2.a libxml2.a: archive (big format) $ ar -X32 -tv libxml2.a $ ar -X64 -tv libxml2.a rwxrwxrwx 203/200 2822289 May 12 13:23 2012 libxml2.so.2 $

        In this example, my libxml2.a *only* contains 64bit objects.

        You can check if everything would theoretically be able to load:

        $ perl -MV=XML::LibXML XML::LibXML /pro/lib/perl5/site_perl/5.14.2/aix-64all/XML/LibXML.pm: 2.010 +3 $ ldd /pro/lib/perl5/site_perl/5.14.2/aix-64all/auto/XML/LibXML/LibXML +.so /pro/lib/perl5/site_perl/5.14.2/aix-64all/auto/XML/LibXML/LibXML.so ne +eds: /usr/lib/libc.a(shr_64.o) /pro/local/lib/libxml2.a(libxml2.so.2) /unix /usr/lib/libcrypt.a(shr_64.o) /usr/lib/libiconv.a(shr4_64.o) /usr/lib/libpthread.a(shr_xpg5_64.o) $

        Note the added /auto/. If ldd does not report any problems, chances are you will be able to use XML::LibXML.


        Enjoy, Have FUN! H.Merijn

        "Im trying to Parse a XML file using the LibXML parser and got out of memory error for a 17 MB file. So I was trying for some other parser to load the file with less memory consumption."

        In my experience when someone reports an out of memory problem it often related to their horribly inefficient code, rather than an existing library. Hopefully you have eliminated your code as being the root cause of the problem prior to your current line of investigation.

        If you have yet to discover which version of libxml is installed I suggest you speak to your systems administrator, keeping in mind what Tux as told you.

Re: LibXML version
by locked_user sundialsvc4 (Abbot) on Nov 25, 2013 at 16:41 UTC

    Another way to say it:   “What is the thing that is blocking you right now?”   What is it, exactly, that is keeping you from getting where you want to go?

    For instance:

    • I don’t know what version of the Perl library is installed.
    • I don’t know what version of (say ...) libxml.so is being accessed by Perl through that library.
    • Perl is accessing an older version (of either or both) than the one I know I need to use to do this.
    • I need to update either or both of those things to a later version, but don’t know how to do it and/or don’t think that I have the system authority to do it.
    • There is “a specific XML thing” ... <blah blah blah> ... that I am trying to do right now, and I am assuming (or, I positively know) that I must update something in order to do it.

    Please clarify, and we will be pleased to help you if we can.

      Hi sundialsvc4

      Yes, I want to know the version of LibXML that has been installed in Perl. I want to use some of the functions in LibXML but I'm getting error stating Can't find ****. So my guess was I'm using an older version which does not have the features which im trying to use.

      So I want to know the version of the Perl as well LibXML installed in my AIX server.

      Thanks & Regards,

      Sathya V.