jey_suresh has asked for the wisdom of the Perl Monks concerning the following question:
This is relevant to all those that might be contemplating a dabble with XML in Perl.
This is the target architecture:
MS-Win2K Professional
Active-Perl 5.10 Build 1002
The mission is to get XML::LibXML installed and running on the target mentioned above. Steps I followed:
Kindly Note: The PPM approach did not work, so please do not recommend that option to me. Our company firewall blocks online installs and offline install does not work either. I am presently communicating with Randy Kobes, ye good man that hails from Winnipeg, on this matter for sometime now. We are pretty much scraping the bottom of the barrel on PPM installs.
1. Installed the libxml2, iconv and zlibc libraries for Win32 from _the_ popular source:
http://www.zlatkovic.com/libxml.en.html
-> and links from therein for the other sources.
2. The MakeMaker is unable to identify the libxml2 installation, so modify the Makefile.PL to disable all validations for lib*xml*. Then generate the Makefile with the usual magic incantations.
This is the only way that one can generate the Makefile proper.MY_HOME:> perl makefile.PL INC="-IC:\Perl\lib\libxml2\include -IC: +\Progra~1\Micros~3\VC98\Include -IC:\Progra~1\GnuWin32\include" LIBS= +"-LC:\Perl\lib\libxml2\lib -LC:\Progra~1\GnuWin32\lib"
There are more!kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi +32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
7. further, "nmake install" leads to another FATAL error. A dialog box pops up with message: "xmltestReaderSetSchema could not be found in libxml2.dll" - meaning libxml2 was looked up, but not loaded or vice versa. From here, it is downhill all the way!/****** Lots of other details go here ******/ Running Mkbootstrap for XML::LibXML () C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 LibXML.bs li +nk -out:blib\arch\auto\XML\LibXML\LibXML.dll -dll -nologo ^^^^^^^^^^^^^A new libXML is getting created^^^^^^^^^^^^^ -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -m +achine:x86 Av_CharPtrPtr.obj LibXML.obj dom.obj perl-libxml-mm.obj + perl-libxml-sax.obj xpath.obj C:\Perl\lib\CORE\perl510.lib C:\Pe +rl\lib\libxml2\lib\libxml2.lib ^^^^^^^^^^^^^^^^^^Inclusion of library here!^^^^^^^ C:\PROGRA~1\MICROS~3\VC98\LIB\oldnames.lib C:\PROGRA~1\MICROS~3\VC98\L +IB\kernel32.lib /****** Lots of other details go here ******/
> "C:\Perl\bin\perl5.10.0.exe" Part3a.pl Can't load 'C:/Perl/site/lib/auto/XML/LibXML/LibXML.dll' for module XM +L::LibXML: load_file:The specified procedure could not be found at C: +/Perl/lib/DynaLoader.pm line 201. at C:/Perl/site/lib/XML/LibXML.pm line 116 BEGIN failed--compilation aborted at C:/Perl/site/lib/XML/LibXML.pm li +ne 116. Compilation failed in require at RosieStock.pm line 3. BEGIN failed--compilation aborted at RosieStock.pm line 3. Compilation failed in require at Part3a.pl line 4. BEGIN failed--compilation aborted at Part3a.pl line 4. > Terminated with exit code 9.
Many thanks if you have read this far. Thank you all even more, should you decide to reply to this post.
Best wishes,
Suresh.
Updates for original post: June 10, 2008
Thanks for all your suggestions to the post and in the chat session earlier: Here's the outcome of the suggestions
1. Upon searching, I found multiple instances of "libxml2.dll" on the PC. Edited the PATH variable to reflect only the one path containing libxml2.dll.
Unfortunately this attempt also did not work, and we got the same old error of: Can't load 'C:/Perl/site/lib/auto/XML/LibXML/LibXML.dll' or Common.dll depending on the PC where the exercise was being conducted.
2a. XML::LibXML and the libxml2.dll ship (as standard) with the latest Strawberry Perl.
As per Rob's suggestion - installed Strawberry Perl and tried to run a test script. Still no joy and the same error is being encountered
On another test PC, the same test bails out with errors encountered in Common.dll itself!.
2b.Assuming strawberry has been placed in it's default location, run:
set PATH=C:\strawberry\c\bin;%PATH%
As per the second suggestion, re-edited the PATH variable and added only the strawberry paths first. This resulted in script failing due to the dependency on LibXSLT. Managed to get that installed on the activeState Perl installation after a lot of callisthenics!
We reasoned that if after we get this sorted, it is a simple matter of copying the necessary files back into strawberry/ActiveState as the need arises.
But, after installing LibXSLT in ActivePerl, even Strawberry perl started throwing up the error that was being throw originally, i.e., Can't load.......... LibXML.dll! (God! What a truly unholy mess this is turning out to be!)
3. Apologies for mis-typing "xmlTextReaderSetSchema" in the first post. That was helpful for the search, but editing the paths and including only the relevant path for libxml2 did not help.
4. I am aware of the http_proxy variable and I have already set it up on my PC. In spite of giving full path, ppm reports the 404...not found error!
Still in square one and still in bad shape.
Anyone else got lucky with LibXML on a 5.10 install? Would you be willing to share your knowledge with us, please?
#---- [EOF] --------------- [EOF]-----------------------
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems installing XML::LibXML for Perl5.10 on Win32 platform
by moritz (Cardinal) on Jun 09, 2008 at 15:00 UTC | |
|
Re: Problems installing XML::LibXML for Perl5.10 on Win32 platform
by syphilis (Archbishop) on Jun 10, 2008 at 00:48 UTC | |
|
Re: Problems installing XML::LibXML for Perl5.10 on Win32 platform
by syphilis (Archbishop) on Jun 10, 2008 at 07:29 UTC | |
|
Re: Problems installing XML::LibXML for Perl5.10 on Win32 platform
by Anonymous Monk on Jun 10, 2008 at 06:42 UTC | |
|
Re: Problems installing XML::LibXML for Perl5.10 on Win32 platform
by Anonymous Monk on Jun 10, 2008 at 07:18 UTC | |
|
Re: Problems installing XML::LibXML for Perl5.10 on Win32 platform
by Anonymous Monk on Jun 10, 2008 at 06:12 UTC |