Thanks for that Michael.  My LD_LIBRARY_PATH env var was not set, so I
set it to /usr/lib, and copied liboci.a to /usr/lib.  This enabled me to
successfully do a 'make'.  However, on doing a 'make test', I was
getting this sort of thing ...

[DBD-Oracle-1.12]$ make test
/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
t/base.......ok

t/general....DBI->connect() failed: (UNKNOWN OCI STATUS 1804)
OCIInitialize. Check ORACLE_HOME and NLS settings etc. at t/general.t
line 20
Unable to connect to Oracle ((UNKNOWN OCI STATUS 1804) OCIInitialize.
Check ORACLE_HOME and NLS settings etc.)
Tests skiped.

This was with ORACLE_HOME set to "/cygdrive/f/oracle/ora92".  I then
tried sqlplus in this config, and got the following ...

[DBD-Oracle-1.12]$ export ORACLE_USERID="sbdev/sbdev@sb9i"
[DBD-Oracle-1.12]$ sqlplus $ORACLE_USERID
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software
directory

So, I unset ORACLE_HOME, and tried sqlplus again ...

[DBD-Oracle-1.12]$ unset ORACLE_HOME
[DBD-Oracle-1.12]$ sqlplus $ORACLE_USERID

SQL*Plus: Release 9.2.0.1.0 - Production on Tue Nov 19 06:26:40 2002

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 -
Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

I then tried 'make test', and it sort of worked, but I got all these
messages about ORACLE_HOME not set ...

[DBD-Oracle-1.12]$ make test
/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
t/base.......ok

t/general....ORACLE_HOME environment variable not set!
t/general....ok

t/long.......ORACLE_HOME environment variable not set!
t/long.......ok

t/ph_type....ORACLE_HOME environment variable not set!
t/ph_type....ok

t/plsql......ORACLE_HOME environment variable not set!
t/plsql......ok

t/reauth.....skipped
        all skipped: no reason given
All tests successful, 1 test skipped.
Files=6, Tests=281, 21 wallclock secs ( 1.07 cusr +  0.74 csys =  1.81
CPU)
:

I then wrote my own tiny test script ...

use strict ;
use DBI ;
my $dbh = DBI->connect('dbi:Oracle:', 'sbdev/sbdev@sb9i', '',
{'RaiseError'=>1}) ;
my $sth = $dbh->prepare("select 'hello' from dual") ;
$sth->execute ;
my $row = $sth->fetchrow_arrayref() ;
print ">>> $row->[0] <<<\n" ;
$sth->finish ;
$dbh->disconnect ;

On running it, if ORACLE_HOME is set, I get this ...

[DBD-Oracle-1.12]$ export ORACLE_HOME=/cygdrive/f/oracle/ora92
[DBD-Oracle-1.12]$ perl sbtest.pl
DBI->connect() failed: (UNKNOWN OCI STATUS 1804) OCIInitialize. Check
ORACLE_HOME and NLS settings etc. at sbtest.pl line 3

If I unset it, I get this ...

[DBD-Oracle-1.12]$ ORACLE_HOME= perl sbtest.pl
ORACLE_HOME environment variable not set!
>>> hello <<<

So, it sort of works, but I get these annoying "ORACLE_HOME environment
variable not set!" messages.

What have I stuffed up now ???

Thanks,

Steve

-----Original Message-----
From: Michael A Chase [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 19 November 2002 2:30 AM
To: [EMAIL PROTECTED]; Steve Baldwin
Subject: Re: Building DBD::Oracle on cygwin


On Mon, 18 Nov 2002 20:26:05 +1100 Steve Baldwin
<[EMAIL PROTECTED]> wrote:

> I'm trying to build DBD::Oracle 1.12 on the latest cygwin, and perl 
> 5.8
> - without much success.  I have Oracle 9.2 installed on the XP side of
> my machine, and have verified it is functional.  I can run sql*plus
from
> cygwin (if that proves anything).  Every other Perl module (including
> DBI) has installed and worked flawlessly.  As you will see from the
> output below, my $ORACLE_HOME is set to /cygdrive/f/oracle/ora92
(which
> translates to f:\oracle\ora92 in the XP world).
>  
> I followed the instructions in README.wingcc to build liboci.a.
>  
> Here is the output from Makefile.PL ...
>  
> [DBD-Oracle-1.12]$ perl Makefile.PL
> Using DBI 1.30 installed in 
> /usr/lib/perl5/site_perl/5.8.0/cygwin-multi-64int/auto/DBI

> Using liboci.a  (did you build it?)

> !!! Note (probably harmless): No library found for -loci

> Is this do-able, or am I bashing my head against a brick wall ?  Any 
> hints much appreciated.

Where did you save the liboci.a?  It should probably be in
DBD-Oracle-1.12/, but it needs to be somewhere in the library search
path used by Makefile.PL before you run Makefile.PL.

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


Reply via email to