Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

DBD::Oracle installation problem - "Can't load Oracle.dll" / "Exec format error"

by topbanana (Novice)
on May 26, 2015 at 19:07 UTC ( [id://1127874]=perlquestion: print w/replies, xml ) Need Help??

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

Hi, I'm trying to install DBD::Oracle on cygwin. I am only a beginner with perl, and the whole cpan/make/build thing is entirely new to me also. So to the problem. in cpan I run: cpan[2]> install DBD::Oracle and a load of guff is spewed out. All is well until the following lines:
t/00versions.t ................ Can't load '/home/J/.cpan/build/DBD-Or +acle-1.74-nSxxhX/blib/arch/auto/DBD/Oracle/Oracle.dll' for module DBD +::Oracle: Exec format error at /usr/ lib/perl5/5.14/i686-cygwin-threads-64int/DynaLoader.pm line 190. at t/00versions.t line 10. Compilation failed in require at t/00versions.t line 10. BEGIN failed--compilation aborted at t/00versions.t line 10. # Looks like your test exited with 8 before it could output anything. t/00versions.t ................ Dubious, test returned 8 (wstat 2048, +0x800)
Now, I don't really know what I'm doing here because it's all new to me, but I've had a go and so far all I can say is that /home/J/.cpan/build/DBD-Oracle-1.74-nSxxhX/blib/arch/auto/DBD/Oracle/Oracle.dll does exist:
J-PC:J >ls -l /home/J/.cpan/build/DBD-Oracle-1.74-nSxxhX/blib/arch/aut +o/DBD/Oracle/Oracle.dll -rwxr-xr-x 1 J None 721811 May 26 15:07 /home/J/.cpan/build/DBD-Oracle +-1.74-nSxxhX/blib/arch/auto/DBD/Oracle/Oracle.dll
The failing code is in .cpan/build/DBD-Oracle-1.74-nSxxhX/t/00versions.t:
use DBD::Oracle qw/ ORA_OCI /;
which is called by (or perhaps vice versa) the following code in /usr/lib/perl5/5.14/i686-cygwin-threads-64int/DynaLoader.pm
my $libref = dl_load_file($file, $module->dl_load_flags) or croak("Can't load '$file' for module $module: ".dl_error());
So that module exists. Can anybody tell me what I can do here? By the way, I don't know what it does but I saw somebody somewhere mention ldd to check a library for links or something, so I did that:
J-PC:J >ldd /home/J/.cpan/build/DBD-Oracle-1.74-nSxxhX/blib/arch/auto/ +DBD/Oracle/Oracle.dll ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x779d000 +0) kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x7 +72f0000) KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll +(0x75810000) ??? => ??? (0x6f640000)
There's nothing that I can see in the cpan output that says a variable doesn't exist. Can anybody help me here? Any help is greatly appreciated as I'm totally in the dark. Thanks. ===================================================== EDIT: ===================================================== Here is some more of the cpan output, which suggests that the shared library isn't where it ought to be (although as I have said, it is where it is supposed to be, or at least, something is there):
t/000-report-versions-tiny.t .. ok t/00versions.t ................ Can't load '/home/J/.cpan/build/DBD-Or +acle-1.74-nSxxhX/blib/arch/auto/DBD/Oracle/Oracle.dll' for module DBD +::Oracle: Exec format error at /usr/ lib/perl5/5.14/i686-cygwin-threads-64int/DynaLoader.pm line 190. at t/00versions.t line 10. Compilation failed in require at t/00versions.t line 10. BEGIN failed--compilation aborted at t/00versions.t line 10. # Looks like your test exited with 8 before it could output anything. t/00versions.t ................ Dubious, test returned 8 (wstat 2048, +0x800) Failed 2/2 subtests t/01base.t .................... 1/6 # Failed test 'install_driver' # at t/01base.t line 24. # got: 'install_driver(Oracle) failed: Can't load '/home/J/.c +pan/build/DBD-Oracle-1.74-nSxxhX/blib/arch/auto/DBD/Oracle/Oracle.dll +' for module DBD::Oracle: Exec forma t error at /usr/lib/perl5/5.14/i686-cygwin-threads-64int/DynaLoader.pm + line 190. # at (eval 11) line 3. # Compilation failed in require at (eval 11) line 3. # Perhaps a required shared library or dll isn't installed where expec +ted # at t/01base.t line 21. # ' # expected: '' # Failed to load Oracle extension and/or shared libraries # Looks like you failed 1 test of 6.

Replies are listed 'Best First'.
Re: DBD::Oracle installation problem - "Can't load Oracle.dll" / "Exec format error"
by jfroebe (Parson) on May 26, 2015 at 20:17 UTC
      Thanks, I'll take a look.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-24 16:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found