Oracle DBI and cygwin (WIN XP)

matze75 wrote on Fri Aug 25 10:19:28 MEST 2006:
Hello,

i have a script with a DB connection, under cygwin commandline it works
fine. When i run the same script from Eclipes i become:

install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8/cygwin/auto/DBD/Oracle/Oracle.dll'
for module DBD::Oracle: No such file or directory at /usr/lib/perl5/5.8/cygwin/DynaLoader.pm
line 230.
 at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at lib//MySql.pm line 87

What can i do? The same problem i have whis the Perl GD module. Other perl
modules work fine.

Thank you for help

Mathias
jploski wrote on Fri Aug 25 13:24:18 MEST 2006:
Is the @INC path set up properly in Project Properties? Is the interpreter
type specified as Cygwin in EPIC Preferences?

There has been a thread recently regarding @INC issues with Cygwin, have
a look at it.
matze75 wrote on Fri Aug 25 14:35:34 MEST 2006:
I tested it whis cygwin as interpreter type and this standard the rsult
is the same. 

My include path settings in properties:

D:\cygwin\lib\perl5\site_perl\5.8\cygwin
D:\cygwin\lib\perl5\site_perl\5.8\cygwin\auto
D:\cygwin\lib\perl5\site_perl\5.8\cygwin\auto\DBD\Oracle

Is this ok so?

Thank you

Mathias
jploski wrote on Fri Aug 25 15:07:00 MEST 2006:
To find out the correct @INC path, run a script like this:

foreach $i(@INC) { print "$i\n"; }

in both environments and compare the differences. Also make sure that you
are using the latest version of EPIC (available via update site).
matze75 wrote on Fri Aug 25 15:51:54 MEST 2006:
Update to the newest version done.

when i use cygwin as interpreter type i have that @INC:

/cygdrive/d/cygwin/var/www/cgi-bin/lib
/cygdrive/d/cygwin/lib/perl5/site_perl/5.8/cygwin
/cygdrive/d/cygwin/lib/perl5/site_perl/5.8/cygwin/auto
/cygdrive/d/cygwin/lib/perl5/site_perl/5.8/cygwin/auto/dbd/oracle
/usr/lib/perl5/5.8/cygwin
/usr/lib/perl5/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8

and this errormessage:

install_driver(Oracle) failed: Can't load '/cygdrive/d/cygwin/lib/perl5/site_perl/5.8/cygwin/auto/DBD/Oracle/Oracle.dll'
for module DBD::Oracle: No such file or directory at /usr/lib/perl5/5.8/cygwin/DynaLoader.pm
line 230.
 at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /cygdrive/d/cygwin/var/www/cgi-bin/lib/MySql.pm line 87

if i use standard as interpreter type i have this @INC:
D:/cygwin/var/www/cgi-bin/lib
D:/cygwin/lib/perl5/site_perl/5.8/cygwin
D:/cygwin/lib/perl5/site_perl/5.8/cygwin/auto
D:/cygwin/lib/perl5/site_perl/5.8/cygwin/auto/DBD/Oracle
/usr/lib/perl5/5.8/cygwin
/usr/lib/perl5/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8

and this error message:
install_driver(Oracle) failed: Can't load 'D:/cygwin/lib/perl5/site_perl/5.8/cygwin/auto/DBD/Oracle/Oracle.dll'
for module DBD::Oracle: No such file or directory at /usr/lib/perl5/5.8/cygwin/DynaLoader.pm
line 230.
 at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at D:/cygwin/var/www/cgi-bin/lib/MySql.pm line 87

on cygwin commandline i have this @INC:

/usr/lib/perl5/5.8/cygwin
/usr/lib/perl5/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8

and Oracle DBI works fine.

I don't understand that.

Thank you 

Mathias



adymlink wrote on Thu Aug 31 21:37:00 MEST 2006:
Ta Da!

You're working on the same issue, same configuration as me.

The problem is that the ${PATH} gets clobbered somehow when running thru
Eclipse/E-P-I-C.  Place a BEGIN {} block at the forefront of your script:


BEGIN {
 printf "ORACLE-HOME [ $ENV{ORACLE_HOME} ]\n";
 printf "PATH [ $ENV{PATH} ]\n";
}


This BEGIN block should be positioned before any use/require/perl statements.

When you run your script using straight cygwin, you'll see the $PATH comes
out just fine.  When you run the same script via Eclipse/E-P-I-C, the PATH
variable is blank.  Same issue occurs with ORACLE_HOME as well.

See the following link [ http://www.cygwin.com/ml/cygwin/2003-04/msg01022.html
].  Also, do a google search on "DBI and DBD::Oracle can't load Oracle.dll".

Which brings me to my posting...Local Launch Config...Setting ${ENV}...

hth,

adym

Note: The above is an archived snapshot of a forum thread. Use the original thread at sf.net to post comments.