Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Help required installing LibXML Parser

by KarthikK (Sexton)
on Dec 19, 2007 at 09:44 UTC ( #657838=perlquestion: print w/ replies, xml ) Need Help??
KarthikK has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

I have to use a XML parser for creating, parsing, validating xml documents. For this i found out that XML::LibXML could be used. I downloaded the latest from CPAN. But i was not able to get this intalled and working.

First I have to install and use this XML module with Rational PERL(CQPERL, RATLPERL) which comes with installation of Clearquest. Hence i cannot use PPM to install the modules. So I have to copy paste the same.

I created a folder called XML under C:\Program Files\Rational\Common\lib\perl5\5.6.1
Then i placed the following files under the XML folder
LibXML.pm LibXML.pod NamespaceSupport.pm SAX.pm
Where Namespacesupport and SAX are the prerequisites for installing LibXML.

I also downloaded the SAX and Namespacesupport from CPAN and placed under the XML folder

The LibXML folder under XML (C:\Program Files\Rational\Common\lib\perl5\5.6.1\XML\LibXML) contains all the files from the .tar file.

Also I copied the XML::Common module under the XML\LiBXML folder
. Then i copied the common.dll along with the other files: common.pm, common.exp, common.bs, common.lib under C:\Program Files\Rational\Common\lib\perl5\5.6.1\auto\XML\LibXML\Common

i also downlaoded the Libxml2.dll and placed it under C:\Program Files\Rational\Common\lib\perl5\5.6.1\auto\XML\LibXML\Common

Now when i try to create a small perl application

#!/usr/bin/perl use XML::LibXML; my $parser = XML::LibXML->new();

and try to run via CQPERL (cqperl file.pl)
i get an application error with the following message:
AppName: cqperl.exe AppVer: 5.6.1.629 ModName: common.dll ModVer: 0.0.0.0 Offset: 0000173d
and with this CQPERL crashes.

This CQPERL is of PERL version 5.6.1.629

What am i doing wrong here?

Is there any other easy way of installing this LIBXML Parsers?



IT would be very helpful if someone assist me in installing this.

Thanks a ton in advance
Best Regards
Karthik

P.S. More info about CQPERL
Summary of my perl5 (revision 5 version 6 subversion 1) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultip +licity=def ine useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -Z7 -DWIN32 -D_CONSOLE + -DNO_STRI CT -DHAVE_DES_FCRYPT -DNEED_ENVIRON_DUP_FOR_MODIFY -DPERL_IMPLICIT_CO +NTEXT -DPE RL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX', optimize='-O1 -MD -DNDEBUG -Z7', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize =4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -debug -debugt +ype:cv -l ibpath:"\public\ratlperl\5.6.1_AS629\lib\5.6.1\MSWin32-x86-multi-threa +d\CORE" - machine:x86' libpth=\sys_nt\MSVC\nt_i386\lib libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib + comdlg32 .lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uui +d.lib wsoc k32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt. +lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool +.lib comd lg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib + uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msv +crt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=ratlperl56.lib Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -de +bug -debug type:cv -libpath:"\public\ratlperl\5.6.1_AS629\lib\5.6.1\MSWin32-x86- +multi-thre ad\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEX +T PERL_IMP LICIT_SYS Locally applied patches: ActivePerl Build 629 Built under MSWin32 Compiled at Mar 26 2003 18:19:43 @INC: C:/Program Files/Rational/Common/lib/perl5/5.6.1/MSWin32-x86-multi +-thread C:/Program Files/Rational/Common/lib/perl5/5.6.1 C:/Program Files/Rational/Common/lib/perl5 C:/Program Files/Rational/Common/lib/perl5/site_perl/5.6.1/MSWin32 +-x86-multi -thread C:/Program Files/Rational/Common/lib/perl5/site_perl/5.6.1 C:/Program Files/Rational/Common/lib/perl5/site_perl C:/Program Files/Rational/Common/lib/perl5/site_perl/5.6.1/MSWin32 +-x86-multi -thread C:/Program Files/Rational/Common/lib/perl5/site_perl/5.6.1 C:/Program Files/Rational/Common/lib/perl5/site_perl .

Comment on Help required installing LibXML Parser
Select or Download Code
Re: Help required installing LibXML Parser
by moritz (Cardinal) on Dec 19, 2007 at 09:53 UTC
    perl -MCPAN -e shell And then type install XML::LibXML

    If CPAN is not working for you, you can still download the packages and install them, usually with

    perl Makefile.PL make make test make install

    Just copying the files won't work, unless the modules are pure perl.

      Thanks. But i use CQPERL and i dont think this technique would work :-(
        So you didn't even try?
Re: Help required installing LibXML Parser
by Corion (Pope) on Dec 19, 2007 at 09:55 UTC

    There may be a faint hope for you:

    Locally applied patches: ActivePerl Build 629 Built under MSWin32 Compiled at Mar 26 2003 18:19:43 ... type:cv -libpath:"\public\ratlperl\5.6.1_AS629\lib\5.6.1\MSWin32-x86- +multi-thre

    This suggests to me that your Rational Perl is a rebranded ActiveState Perl (build 629). So you might be able to just download the PPM and copy the files into the appropriate positions, or maybe it even comes with its own PPM.

    You won't be able to "just" copy some files and copy some random DLLs downloaded from the internet and expect it to magically work. There are ways to use a different toolchain than what was used to compile your Perl to compile extensions, but the preferred and sane way is to use the build environment that was used to build your Perl. In your case, that would be Visual C 6.

      I use windows XP with Rational ClearQuest V2003 installed
Re: Help required installing LibXML Parser
by randyk (Parson) on Dec 19, 2007 at 15:52 UTC
    One thing you might try is to install the CPAN version of PPM on your machine; to do this, download the PPM-2.1.8.tar.gz source, extract the files, change into the unpacked directory, and run
    perl Makefile.PL nmake nmake install
    For this, you'll need to install nmake for Windows. After this, you can install XML-LibXML from the uwinnipeg 5.6 repository by issuing the command
    ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/XML-LibXML.ppd
    This should also install the prerequisite ppm packages, as well as the required libxml2.dll library (which goes somewhere in your PATH).
      Thanks radny.

      When i tried to do makefile i got the following
      U:\.cpan\PPM-2.1.8>cqperl makefile.pl Checking if your kit is complete... Looks good Warning: prerequisite Archive::Tar failed to load: Can't locate Archiv +e/Tar.pm i n @INC (@INC contains: C:/Program Files/Rational/Common/lib/perl5/5.6. +1/MSWin32- x86-multi-thread C:/Program Files/Rational/Common/lib/perl5/5.6.1 C:/P +rogram Fil es/Rational/Common/lib/perl5 C:/Program Files/Rational/Common/lib/perl +5/site_per l/5.6.1/MSWin32-x86-multi-thread C:/Program Files/Rational/Common/lib/ +perl5/site _perl/5.6.1 C:/Program Files/Rational/Common/lib/perl5/site_perl C:/Pr +ogram File s/Rational/Common/lib/perl5/site_perl/5.6.1/MSWin32-x86-multi-thread C +:/Program Files/Rational/Common/lib/perl5/site_perl/5.6.1 C:/Program Files/Ratio +nal/Common /lib/perl5/site_perl .) at (eval 4) line 3. Warning: prerequisite Compress::Zlib failed to load: Can't locate Comp +ress/Zlib. pm in @INC (@INC contains: C:/Program Files/Rational/Common/lib/perl5/ +5.6.1/MSWi n32-x86-multi-thread C:/Program Files/Rational/Common/lib/perl5/5.6.1 +C:/Program Files/Rational/Common/lib/perl5 C:/Program Files/Rational/Common/lib/ +perl5/site _perl/5.6.1/MSWin32-x86-multi-thread C:/Program Files/Rational/Common/ +lib/perl5/ site_perl/5.6.1 C:/Program Files/Rational/Common/lib/perl5/site_perl C +:/Program Files/Rational/Common/lib/perl5/site_perl/5.6.1/MSWin32-x86-multi-thre +ad C:/Prog ram Files/Rational/Common/lib/perl5/site_perl/5.6.1 C:/Program Files/R +ational/Co mmon/lib/perl5/site_perl .) at (eval 5) line 3. Warning: prerequisite XML::Parser failed to load: Can't locate XML/Par +ser.pm in @INC (@INC contains: C:/Program Files/Rational/Common/lib/perl5/5.6.1/ +MSWin32-x8 6-multi-thread C:/Program Files/Rational/Common/lib/perl5/5.6.1 C:/Pro +gram Files /Rational/Common/lib/perl5 C:/Program Files/Rational/Common/lib/perl5/ +site_perl/ 5.6.1/MSWin32-x86-multi-thread C:/Program Files/Rational/Common/lib/pe +rl5/site_p erl/5.6.1 C:/Program Files/Rational/Common/lib/perl5/site_perl C:/Prog +ram Files/ Rational/Common/lib/perl5/site_perl/5.6.1/MSWin32-x86-multi-thread C:/ +Program Fi les/Rational/Common/lib/perl5/site_perl/5.6.1 C:/Program Files/Rationa +l/Common/l ib/perl5/site_perl .) at (eval 6) line 3. Error: Unable to locate installed Perl libraries or Perl source code. It is recommended that you install perl in a standard location before building extensions. Some precompiled versions of perl do not contain these header files, so you cannot build extensions. In such a case, please build and install your perl from a fresh perl distribution. It usually solves this kind of problem. (You get this message, because MakeMaker could not find "\public\ratlp +erl\5.6.1_ AS629\lib\perl5\5.6.1\MSWin32-x86-multi-thread\CORE\perl.h")

      i used cqperl makefile.pl since i have to install it for Rational PERL
      Thanks alot

      best regards
      Karthik

        The error message at the end:

        Error: Unable to locate installed Perl libraries or Perl source code. It is recommended that you install perl in a standard location before building extensions. Some precompiled versions of perl do not contain these header files, so you cannot build extensions. In such a case, please build and install your perl from a fresh perl distribution. It usually solves this kind of problem. (You get this message, because MakeMaker could not find "\public\ratlp +erl\5.6.1_ AS629\lib\perl5\5.6.1\MSWin32-x86-multi-thread\CORE\perl.h")
        looks to be most serious - it means you can't build extensions in the standard way because of some missing header files. IBM recommends that you install missing modules manually, which is possible, but as was mentioned in earlier responses, you have to take care where to put the files. In the following, let $RATIONAL stand for C:\Program Files\Rational\Common\lib\perl5\site_perl\5.6.1.

        What you could do is grab the sources of the binary ppm packages, extract the files, and then copy them into locations that your Perl expects them. For example, for XML-LibXML-Common, which is a prerequisite, download XML-LibXML-Common.tar.gz from http://theoryx5.uwinnipeg.ca/ppmpackages/x86/. When unpacked, the directory structure contains

        blib/lib/XML/LibXML/.exists blib/lib/XML/LibXML/Common.pm blib/lib/XML/LibXML blib/arch/auto/XML/LibXML/Common/.exists blib/arch/auto/XML/LibXML/Common/Common.bs blib/arch/auto/XML/LibXML/Common/Common.dll blib/arch/auto/XML/LibXML/Common/Common.exp blib/arch/auto/XML/LibXML/Common/Common.lib blib/arch/auto/XML/LibXML/Common/Common.pdb
        Copy the files under blib/lib/ to $RATIONAL, taking care to preserve the subdirectory structure (for example, blib/lib/XML/LibXML/Common.pm would go to $RATIONAL\XML\LibXML\Common.pm). Then copy the files under blib/arch/auto/ to $RATIONAL\MSWin32-x86-multi-thread\auto\, again taking care to preserve the underlying subdirectory structure. Finally, you'll need the libxml2.dll external library; this can be obtained from http://theoryx5.uwinnipeg.ca/ppmpackages/scripts/, and should be placed somewhere under your PATH environment variable (type set PATH at a command prompt to see what your PATH is). You'll then have to repeat this for XML-LibXML, XML-NamespaceSupport, and XML-SAX.
      OK..now i copied all the required modules like Compress, Archive, XML::Parser from Activestate perl installation.
      Now i ran the following
      U:\.cpan\PPM-2.1.8>cqperl makefile.pl Checking if your kit is complete... Looks good
      after his the perl parer crashes with the followging error
      AppName: cqperl.exe AppVer: 5.6.1.629 ModName: zlib.dll ModVer: 0.0.0.0 Offset: 000068ec

        Did you copy the files from an ActivePerl 6xx build? This is what you should be using, as it's based on perl-5.6. And did you copy all the pm and dll files in the manner described in my earlier reply?

        This should work assuming the Perl that ships with Rational ClearQuest is compiled with VC++ 6, which is what ActivePerl is compiled with.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://657838]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-07-28 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (210 votes), past polls