Sunday, April 26, 2009

Compilation Error

Error -
D:\Selenium\PerlTestCases>perl Test-userverify.pl
Can't locate Test/LongString.pm in @INC (@INC contains: C:\Perl\lib C:\Perl\site\lib C:/Perl/site/lib C:/Perl/lib .) at C:\Perl\site\lib/Test/WWW/Selenium.pm line 56.
BEGIN failed--compilation aborted at C:\Perl\site\lib/Test/WWW/Selenium.pm line 56.
Compilation failed in require at Test-userverify.pl line 4.
BEGIN failed--compilation aborted at Test-userverify.pl line 4.

Analysis:
http://aspn.activestate.com/ASPN/Mail/Message/perl-unix-users/2010251
========================

>  The  following is the error i  getback.
>
> perl test.pl
> Can't locate XML/Simple.pm in @INC (@INC contains:
> /usr/local/lib/perl5/5.00503/sun4-solaris-thread
> /usr/local/lib/perl5/5.00503
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread
> /usr/local/lib/perl5/site_perl/5.005 .) at test.pl line 1.
> BEGIN failed--compilation aborted at test.pl line 1.
>
>
> Questions :
> 1. Can the xml parser libraries be used in the above version of perl
> itself. At the code level itsel without any config or env. changes that
> need root access - as if root access is needed it becomes a long winding
> process as this is a prod. box.
> 2. If i can't use the above xml Can i locally install within the userid
> scope i am working on.

It looks like you are just having the typical problem of the perl binary not
the XML module in it's @INC path. You might want to check in
/usr/local/lib/perl5 and /usr/local/lib/perl5/site_perl for any other
versions of perl installed, or a 'where perl' or 'which perl', to see if
there are any other perl binaries installed. Perhaps there is another
perl installation on the system that has the XML module.

If the system does not have the XML module installed and you do not have
root access to install the module, you can install the module in the
same directory as your script, though you'll have to create the
directories by hand and do the installation manually. You'd have to
download and compile/build the XML module, then create the necessary
directories and place the appropriate files there. For example:

ls -l:
XML/Simple.pm
XML.pm

Something like that.
=============================================

This post has some info on the issue. I do have 2 vsn of perl installed - one came with the Oracle install, and 2nd (latest) is the one I installed manually. I dont want to mess with the oracle install...so I just updated the Path env variable - although it din have any effect...
Next I tried to install/compile the package missing locally(LongString). I copied the LongString.pm file to the expected folder.
Above error went away, but another one popup up. That will be discussed in future post..

-V.

No comments: