Alright! It looks like it's working now. Here is what I did. I got a
fresh copy of DBD:Oracle from CPAN an unpacked in
c:\cygwin\lib\perl5\site_perl\5.8.5\cygwin-thread-multi-64int\DBD. Then
I went to that directory and build and tested. Here is the result:
> -----Original Message-----
> From: Andy Hassall [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 29, 2004 3:53 PM
> To: Vassilev, Lubomir G.; [EMAIL PROTECTED]
> Subject: RE: Error: Can't load '/cygdrive/c/Oracle/Ora81/bin/Oracle'
for
> module DBD::Oracle...
>
> > What do you mean by clean out?
>
> I mean unpacking DBD-Oracle-1.16.tar.gz from scratch and starting
again -
> "make clean" gets rid of most stuff but starting again makes extra
sure
> when
> things get confusing.
>
> > I placed a fresh copy of DBD::Oracle in
> > c:\cygwin\lib\perl5\site_perl\5.8.5\cygwin-thread-multi-64int\DBD
and
>
> Hang on - isn't that the job of "make install"? How do you mean
"place" -
> you're not unpacking the tarball to the Perl lib directories directly
are
> you?
>
> > then
> > I set ORACLE_HOME to c:\Oracle\Ora81 and did "perl makefile.pl -v"
and
>
> Don't you mean "perl Makefile.PL -v" ? You can probably get away with
> case-insensitivity since the underlying filesystem is
case-insensitive...
> but it's not good practice. Probably not relevant.
>
> > this is the result:
> >
> [snip]
> > INC => q[-Ic:/Oracle/ora81/oci/include
-Ic:/Oracle/ora81/rdbms/demo
> > -I/usr/lib
> > /perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBI/]
>
> My INC was:
>
> INC => q[-Ig:/oracle/ora81/oci/include -Ig:/oracle/ora81/rdbms/demo
> -I/usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBI/]
>
> So that looks pretty much equivalent now.
>
> > LIBS =>
> >
[q[-L/cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-
> > 64int/DBD -loci]]
>
> My LIBS was:
>
> LIBS => [q[-L/home/andyh/src/DBD-Oracle-trunk -loci]]
>
> So the difference here is I'm compiling from a copy in my home
directory
> -
> you seem to be compiling from inside the Perl lib directories - is
that a
> valid approach? It's not one I've come across before.
>
> [snip]
> > LD_RUN_PATH=c:/Oracle/ora81/lib:c:/Oracle/ora81/rdbms/lib
>
> This doesn't look valid - LD_RUN_PATH is colon-separated (since it's
a
> Cygwin and hence Unix-like variable) - so the colons in the drive
> specifications will cause problems here.
>
> If I set a similar LD_RUN_PATH, I get the following output:
>
> Ignoring LD_RUN_PATH='g:/oracle/ora81/lib:g:/oracle/ora81/rdbms/lib'
in
> environment
>
> ... which goes to standard error - looks like you've only posted
standard
> output?
> Then again, even with this set, I still get a successful
> build/test/install.
>
> > Notice that INC is now set to the right path, i.e. no cygdrive this
> > time, but LIBS is not. The only variable I set was ORACLE_HOME. I
did
> > not mess with LD_LIBRARY_PATH at all. And I am still getting the
exact
> > same error.
>
> Right, going back to your original posted outputs, you were getting
this
> whilst building:
>
> gcc -c -I/cygdrive/C/Oracle/Ora81/oci/include
> -I/cygdrive/C/Oracle/Ora81/rdbms/
> demo
-I/usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBI/
> -DPERL
> _USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include
> -DUSEIMPORTLIB
> -O2 -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\"
> "-I/usr/lib/perl5/5.8.5/cygwin-t
> hread-multi-64int/CORE" -Wall -Wno-comment -DUTF8_SUPPORT
> -DORA_OCI_VERSION=\"8
> .1.0\" dbdimp.c
> dbdimp.c:19:20: stdafx.h: No such file or directory
> dbdimp.c: In function `ora_db_login6':
> dbdimp.c:283: warning: unused variable `o'
> dbdimp.c:284: warning: unused variable `l'
> dbdimp.c:315: warning: cast to pointer from integer of different size
> dbdimp.c:329: warning: cast to pointer from integer of different size
> dbdimp.c:339: warning: cast to pointer from integer of different size
> dbdimp.c:343: warning: cast to pointer from integer of different size
> dbdimp.c:386: warning: unused variable `rsize'
> dbdimp.c: In function `dbd_rebind_ph_char':
> dbdimp.c:1121: warning: cast from pointer to integer of different size
> make: *** [dbdimp.o] Error 1
>
> The error in your subject is when you try and load DBD::Oracle -
since
> it's
> not built, it won't install, so failing to load the library isn't
> surprising. The root of the problem appears to be the error above. Can
you
> confirm you still get THAT same error now?
>
> What's particularly suspicious is the reference to "stdafx.h".
>
> (a) That's a Microsoft compiler precompiled header file. You're
supposed
> to
> be using gcc, not the Microsoft compiler, so why is that appearing?
>
> (b) There's no reference to stdafx.h anywhere in the copy of
DBD::Oracle
> 1.16 I have, even after building with a Microsoft compiler, so where
is it
> coming from on your system?
>
> --
> Andy Hassall <[EMAIL PROTECTED]> / Space: disk usage analysis tool
> <http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
>
$ perl Makefile.PL -v
Using DBI 1.45 (for perl 5.008005 on cygwin-thread-multi-64int) installed in /us
r/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBI/
Configuring DBD::Oracle ...
>>> Remember to actually *READ* the README file!
Especially if you have any problems.
Using Oracle in c:/Oracle/Ora81
I'm having trouble finding your Oracle version number... trying harder
Oracle version 8.1.0 (8.1)
Found oci directory
Using OCI directory 'oci'
Checking for functioning wait.ph
System: perl5.008005 cygwin_nt-5.1 inspiron 1.5.10(0.11642) 2004-05-25 22:07 i68
6 unknown unknown cygwin
Compiler: gcc -O2 -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/loc
al/include
Linker: /usr/bin/ld
Sysliblist:
Warning: If you have problems you may need to rebuild perl with -Uusemymalloc.
MakeMaker (v6.17)
Checking if your kit is complete...
Looks good
ABSTRACT_FROM => q[Oracle.pm]
AUTHOR => q[Tim Bunce ([EMAIL PROTECTED])]
DEFINE => q[ -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"8.1.0\"]
DIR => []
EXE_FILES => [q[ora_explain]]
INC => q[-Ic:/Oracle/Ora81/oci/include -Ic:/Oracle/Ora81/rdbms/demo -I/usr/lib
/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBI/]
LIBS => [q[-L/cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-
64int/DBD/DBD-Oracle-1.16 -loci]]
NAME => q[DBD::Oracle]
OBJECT => q[$(O_FILES)]
PREREQ_PM => { DBI=>q[0] }
VERSION_FROM => q[Oracle.pm]
clean => { FILES=>q[xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.d
ef ora_explain mk.pm] }
dist => { DIST_DEFAULT=>q[clean distcheck disttest tardist], COMPRESS=>q[gzip
-v9], PREOP=>q[$(MAKE) -f Makefile.old distdir], SUFFIX=>q[gz] }
Using PERL=/usr/bin/perl.exe
Potential libraries are '-L/cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/cygwin-t
hread-multi-64int/DBD/DBD-Oracle-1.16 -loci':
'-loci' found at /cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/cygwin-thread-mult
i-64int/DBD/DBD-Oracle-1.16/liboci.a
LD_RUN_PATH=c:/Oracle/Ora81/lib:c:/Oracle/Ora81/rdbms/lib
Using DBD::Oracle 1.16.
Using DBD::Oracle 1.16.
Using DBI 1.45 (for perl 5.008005 on cygwin-thread-multi-64int) installed in /us
r/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBI/
Writing Makefile for DBD::Oracle
*** If you have problems...
read all the log printed above, and the README and README.help files.
(Of course, you have read README by now anyway, haven't you?)
[EMAIL PROTECTED] /cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/cygwin-thread-
multi-64int/DBD/DBD-Oracle-1.16
$ make
cp Oracle.pm blib/lib/DBD/Oracle.pm
cp oraperl.ph blib/lib/oraperl.ph
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp Oraperl.pm blib/lib/Oraperl.pm
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
/usr/bin/perl.exe -p -e "s/~DRIVER~/Oracle/g" /usr/lib/perl5/site_perl/5.8.5/cyg
win-thread-multi-64int/auto/DBI//Driver.xst > Oracle.xsi
/usr/bin/perl.exe /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -typemap /usr/lib/perl5/
5.8.5/ExtUtils/typemap -typemap typemap Oracle.xs > Oracle.xsc && mv Oracle.xsc
Oracle.c
gcc -c -Ic:/Oracle/Ora81/oci/include -Ic:/Oracle/Ora81/rdbms/demo -I/usr/lib/pe
rl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBI/ -DPERL_USE_SAFE_PUTENV -
fno-strict-aliasing -pipe -I/usr/local/include -DUSEIMPORTLIB -O2 -DVERSION=\"
1.16\" -DXS_VERSION=\"1.16\" "-I/usr/lib/perl5/5.8.5/cygwin-thread-multi-64int/
CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"8.1.0\" Oracle.c
gcc -c -Ic:/Oracle/Ora81/oci/include -Ic:/Oracle/Ora81/rdbms/demo -I/usr/lib/pe
rl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBI/ -DPERL_USE_SAFE_PUTENV -
fno-strict-aliasing -pipe -I/usr/local/include -DUSEIMPORTLIB -O2 -DVERSION=\"
1.16\" -DXS_VERSION=\"1.16\" "-I/usr/lib/perl5/5.8.5/cygwin-thread-multi-64int/
CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"8.1.0\" dbdimp.c
dbdimp.c: In function `ora_db_login6':
dbdimp.c:282: warning: unused variable `o'
dbdimp.c:283: warning: unused variable `l'
dbdimp.c:314: warning: cast to pointer from integer of different size
dbdimp.c:328: warning: cast to pointer from integer of different size
dbdimp.c:338: warning: cast to pointer from integer of different size
dbdimp.c:342: warning: cast to pointer from integer of different size
dbdimp.c:385: warning: unused variable `rsize'
dbdimp.c: In function `dbd_rebind_ph_char':
dbdimp.c:1120: warning: cast from pointer to integer of different size
gcc -c -Ic:/Oracle/Ora81/oci/include -Ic:/Oracle/Ora81/rdbms/demo -I/usr/lib/pe
rl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBI/ -DPERL_USE_SAFE_PUTENV -
fno-strict-aliasing -pipe -I/usr/local/include -DUSEIMPORTLIB -O2 -DVERSION=\"
1.16\" -DXS_VERSION=\"1.16\" "-I/usr/lib/perl5/5.8.5/cygwin-thread-multi-64int/
CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"8.1.0\" oci8.c
oci8.c:566: warning: `fetch_func_nty' defined but not used
oci8.c:1012: warning: `fbh_setup_getrefpv' defined but not used
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.dll
LD_RUN_PATH="c:/Oracle/Ora81/lib:c:/Oracle/Ora81/rdbms/lib" ld2 -s -L/usr/local
/lib Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.dll /usr/lib
/perl5/5.8.5/cygwin-thread-multi-64int/CORE/libperl.dll.a -L/cygdrive/c/cygwin/l
ib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/DBD/DBD-Oracle-1.16 -loci
gcc -shared -o Oracle.dll -Wl,--out-implib=libOracle.dll.a -Wl,--export-all-sym
bols -Wl,--enable-auto-import -Wl,--stack,8388608 \
-s -L/usr/local/lib Oracle.o dbdimp.o oci8.o /usr/lib/perl5/5.8.5/cygwin-thread
-multi-64int/CORE/libperl.dll.a -L/cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/c
ygwin-thread-multi-64int/DBD/DBD-Oracle-1.16 -loci
Creating library file: libOracle.dll.a
mv Oracle.dll libOracle.dll.a blib/arch/auto/DBD/Oracle/
chmod 755 blib/arch/auto/DBD/Oracle/Oracle.dll
cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs
chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs
/usr/bin/perl.exe "-Iblib/arch" "-Iblib/lib" ora_explain.PL ora_explain
Extracted ora_explain from ora_explain.PL with variable substitutions.
cp ora_explain blib/script/ora_explain
/usr/bin/perl.exe "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/ora_explain
[EMAIL PROTECTED] /cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/cygwin-thread-
multi-64int/DBD/DBD-Oracle-1.16
$ make test
/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'b
lib/arch')" t/*.t
t/01base................ok
t/10general.............DBI connect('','scott/tiger',...) failed: ORA-12560: TNS
:protocol adapter error (DBD ERROR: OCIServerAttach) at t/10general.t line 12
Undefined subroutine &main::BAILOUT called at t/10general.t line 15.
# Looks like your test died before it could output anything.
t/10general.............dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-31
Failed 31/31 tests, 0.00% okay
t/15nls.................DBI connect('','scott/tiger',...) failed: ORA-12560: TNS
:protocol adapter error (DBD ERROR: OCIServerAttach) at t/15nls.t line 15
t/15nls.................ok
9/9 skipped: Unable to connect to Oracle (ORA-12560: TNS:protocol adapte
r error (DBD ERROR: OCIServerAttach))
t/20select..............Unable to connect to Oracle (ORA-12560: TNS:protocol ada
pter error (DBD ERROR: OCIServerAttach))
Tests skiped.
skipped
all skipped: no reason given
t/21nchar...............DBI connect('','scott/tiger',...) failed: ORA-12560: TNS
:protocol adapter error (DBD ERROR: OCIServerAttach) at t/nchar_test_lib.pl line
148
skipped
all skipped: Not connected to oracle
t/22nchar_al32utf8......skipped
all skipped: Oracle charset tests unreliable for Oracle 8 client
t/22nchar_utf8..........skipped
all skipped: Oracle charset tests unreliable for Oracle 8 client
t/23wide_db.............skipped
all skipped: Oracle charset tests unreliable for Oracle 8 client
t/23wide_db_8bit........skipped
all skipped: Oracle charset tests unreliable for Oracle 8 client
t/23wide_db_al32utf8....skipped
all skipped: Oracle charset tests unreliable for Oracle 8 client
t/24implicit_utf8.......skipped
all skipped: Oracle charset tests unreliable for Oracle 8 client
t/25plsql...............Unable to connect to Oracle (ORA-12560: TNS:protocol ada
pter error (DBD ERROR: OCIServerAttach))
Tests skiped.
skipped
all skipped: no reason given
t/30long................DBI connect('','scott/tiger',...) failed: ORA-12560: TNS
:protocol adapter error (DBD ERROR: OCIServerAttach) at t/nchar_test_lib.pl line
148
Can't connect to database: ORA-12560: TNS:protocol adapter error (DBD ERROR: OCI
ServerAttach)
# Looks like your test died before it could output anything.
t/30long................dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-376
Failed 376/376 tests, 0.00% okay
t/31lob.................DBI connect('','scott/tiger',...) failed: ORA-12560: TNS
:protocol adapter error (DBD ERROR: OCIServerAttach) at t/nchar_test_lib.pl line
148
You tried to plan twice! Second plan at t/31lob.t line 16
# Looks like your test died before it could output anything.
t/31lob.................dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
t/40ph_type.............DBI connect('','scott/tiger',...) failed: ORA-12560: TNS
:protocol adapter error (DBD ERROR: OCIServerAttach) at t/40ph_type.t line 26
Unable to connect to Oracle (ORA-12560: TNS:protocol adapter error (DBD ERROR: O
CIServerAttach))
Tests skipped.
skipped
all skipped: no reason given
t/50cursor..............Unable to connect to Oracle as scott/tiger (ORA-12560: T
NS:protocol adapter error (DBD ERROR: OCIServerAttach))
Tests skipped.
skipped
all skipped: no reason given
t/60reauth..............ORACLE_USERID_2 not defined. Tests skipped.
skipped
all skipped: no reason given
t/70meta................Unable to connect to Oracle as scott/tiger (ORA-12560: T
NS:protocol adapter error (DBD ERROR: OCIServerAttach))
Tests skipped.
skipped
all skipped: no reason given
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/10general.t 255 65280 31 62 200.00% 1-31
t/30long.t 255 65280 376 752 200.00% 1-376
t/31lob.t 255 65280 2 4 200.00% 1-2
13 tests and 9 subtests skipped.
Failed 3/18 test scripts, 83.33% okay. 409/423 subtests failed, 3.31% okay.
make: *** [test_dynamic] Error 14
[EMAIL PROTECTED] /cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/cygwin-thread-
multi-64int/DBD/DBD-Oracle-1.16
$ make install
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBD/Ora
cle/dbdimp.h
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBD/Ora
cle/libOracle.dll.a
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBD/Ora
cle/mk.pm
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBD/Ora
cle/ocitrace.h
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBD/Ora
cle/Oracle.bs
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBD/Ora
cle/Oracle.dll
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBD/Ora
cle/Oracle.h
Files found in blib/arch: installing files in blib/lib into architecture depende
nt library tree
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/oraperl.ph
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/Oraperl.pm
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/DBD/Oracle.p
m
Installing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/DBD/Oracle/G
etInfo.pm
Installing /usr/bin/ora_explain
Writing /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/DBD/Oracle
/.packlist
Appending installation info to /usr/lib/perl5/5.8.5/cygwin-thread-multi-64int/pe
rllocal.pod
[EMAIL PROTECTED] /cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/cygwin-thread-
multi-64int/DBD/DBD-Oracle-1.16
$ perl -MDBD::Oracle -e 0
[EMAIL PROTECTED] /cygdrive/c/cygwin/lib/perl5/site_perl/5.8.5/cygwin-thread-
multi-64int/DBD/DBD-Oracle-1.16
$