Ok the 'Can't load
'/home/user/DBD-Oracle-1.28/blib/arch/auto/DBD/Oracle/Oracle.dll'
error went away when I switched from the 64bit instant client to the
32bit version.
However, 'make test' failed because it couldn't connect to the DB and
I tried everything with the environment variables.  I then tried the
'test.pl' script and got this error
'ora_login: 24327: ORA-24327: need explicit attach before
authenticating a user (DBD ERROR: OCISessionBegin)
'
test.pl uses this style login:
    local($l) = &ora_login($dbname, $dbuser, '');

I decided to go ahead and try running 'make install' even though 'make
test' couldn't pass any tests do to a connection error.
Then I tried my own script which uses a different style connect and  SUCCESS!

My script connects like this:
my $dbh = DBI->connect('dbi:Oracle:host=foo.example.com;sid=foodb;port=1521',
       'foo', 'foo', { RaiseError => 1, AutoCommit => 0 });

I don't know why one way of connecting works and the other doesn't?

I'd like to point out a small error in README.win64.txt (and
http://www.pythian.com/news/11115/dbdoracle-and-windows-64bit/)
It says to set ORACLE_USER_ID  but I think it's suppose to be
ORACLE_USERID (b/c that's what it is in all the other README's)

 $ grep ORACLE_USER_ID README.win64.txt
README.win64.txt:Next you will need to set the ORACLE_USER_ID to a valid user
README.win64.txt:c:\DBD-Oracle>set ORACLE_USER_ID=system/system@XE

Thanks,
Jason

On Thu, Mar 24, 2011 at 2:05 PM, Jason Thurston
<jason.thurs...@gmail.com> wrote:
> Thanks that helped me get further.  Ok so I added 'OCIServerRelease'
> to 'oci.def' then did a 'make clean',  then 'perl Makefile.PL' and
> then 'make' and it looks like it finished successfully but all tests
> by 'make test' failed with this:
> Can't load '/home/user/DBD-Oracle-1.28/blib/arch/auto/DBD/Oracle/Oracle.dll'
> for module DBD::Oracle: Exec format error at
> /usr/lib/perl5/5.10/i686-cygwin/DynaLoader.pm line 200.
>
> Here are the last lines of output from 'make':
>
> $ make
> ...
> ...
> chmod 755 blib/arch/auto/DBD/Oracle/Oracle.dll
> test -s Oracle.bs && cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs && \
>          chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs
> make: [blib/arch/auto/DBD/Oracle/Oracle.dll] Error 1 (ignored)
> /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
> Manifying blib/man1/ora_explain.1
> Manifying blib/man3/DBD.Oracle.3pm
> Manifying blib/man3/DBD.Oraperl.3pm
>
>
> Here's a sample of what I'm seeing from 'make test':
> $ make test 2>&1 |less
> PERL_DL_NONLAZY=1 /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> # Test loading DBI, DBD::Oracle and version
>
> #   Failed test 'install_driver'
> #   at t/01base.t line 22.
> Failed to load Oracle extension and/or shared libraries:
> install_driver(Oracle) failed: Can't load
> '/home/user/DBD-Oracle-1.28/blib/arch/auto/DBD/Oracle/Oracle.dll' for
> module DBD::Oracle: Exec format error at
> /usr/lib/perl5/5.10/i686-cygwin/DynaLoader.pm line 200.
>  at (eval 8) line 3
> Compilation failed in require at (eval 8) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at t/01base.t line 19
> The remaining tests will probably also fail with the same error.^G
>
>
>
> On Thu, Mar 24, 2011 at 1:32 PM, John Scoles <byter...@hotmail.com> wrote:
>>
>> Ok I think I know what it is looks like I forgot to put
>>
>> OCIServerRelease
>>
>> in the
>>
>> oci.def
>>
>> Add the word in there and see what happens
>>
>> Silly mistake really but hard to catch  unless you have the right test 
>> system handy
>>
>> We would of caught this if we had a broader test page for the Release 
>> Cadidates, hint hint nudge nudge ;) ;)
>>
>> Cheers
>> John Scoles
>>
>>> Date: Thu, 24 Mar 2011 13:27:20 +0100
>>> From: alexan...@foken.de
>>> To: dbi-users@perl.org
>>> CC: jason.thurs...@gmail.com
>>> Subject: Re: Fwd: Error 'making DBD:Oracle 1.28 on Cygwin W
>>>
>>> DBD::Oracle 1.27 compiled, tested and installed without any problems.
>>> The changes in
>>> <URL:http://search.cpan.org/~pythian/DBD-Oracle-1.28/Changes#Changes_in_DBD-Oracle_1.28_%28svn_rev_14765%29>
>>> don't look relevant to my environment. I can live with that.
>>>
>>> Now it is clear that some change from 1.27 to 1.28 broke compatibilty
>>> with Oracle 10.2g.
>>>
>>> Alexander
>>>
>>> On 03/24/2011 12:18 PM, Alexander Foken wrote:
>>> > Hmmm, on my other system, DBD::Oracle 1.23 and Oracle 10.2g work
>>> > perfectly. So, what's the difference?
>>> >
>>> > XP vs. 2000 -- unlikely
>>> > Much older DBD::Oracle
>>> >
>>> > Looking at the DBD::Oracle diffs available at search.cpan.org, I see
>>> > that OCIServerRelease exists in the diffs from 1.27 to 1.28 (in
>>> > Oracle.xs, condition added to avoid calling OCIServerVersion on
>>> > servers < 10.2), and in the diffs from 1.24b to 1.25 (don't quite
>>> > understand what happens there). But I see no change containing
>>> > OCIServerVersion in the diffs from 1.24b to 1.25.
>>> >
>>> > I will try compiling 1.27, then 1.23 after lunch ...
>>> >
>>> > Alexander
>>> >
>>> > On 03/24/2011 11:59 AM, Alexander Foken wrote:
>>> >> Hello,
>>> >>
>>> >> sorry, just a "me too" posting. I was just about to ask for nearly(?)
>>> >> the same problem.
>>> >>
>>> >> I'm trying with Strawberry Perl 5.12.2.0 and 5.10.0.4, Oracle 10g,
>>> >> DBD::Oracle 1.28, Windows 2000 Professional.
>>> >>
>>> >> Final problem after tons of warnings: oci8.o: oci8.c: undefined
>>> >> reference to 'OCIServerRelease'
>>> >>
>>> >> See attached logfile of running perl Makefile.PL and dmake (with Perl
>>> >> 5.12, same messages with 5.10).
>>> >>
>>> >> I would guess that there is a problem with DBD::Oracle, because we
>>> >> get the same missing symbol for different OS versions, different
>>> >> Perl ports, different Perl versions, different DBI versions,
>>> >> different Oracle versions.
>>> >>
>>> >> Alexander
>>> >>
>>> >> On 03/24/2011 12:15 AM, Jason Thurston wrote:
>>> >>> Hello,
>>> >>>
>>> >>> Does anyone have any ideas where to go from here?
>>> >>>
>>> >>> I think "perl Makefile.PL" is successful but I get an error when
>>> >>> trying the next step "make".
>>> >>> The Error I get when trying to "make" is
>>> >>> "/home/foo/DBD-Oracle-1.28/oci8.c:4619: undefined reference to
>>> >>> `_OCIServerRelease'". See Below for details.
>>> >>>
>>> >>> I originally tried with the cygwin cpan tool but then downloaded the
>>> >>> packaged and tried manually but got the exact same error.
>>> >>>
>>> >>>
>>> >>> DETAILS:
>>> >>>
>>> >>> OS:
>>> >>> Windows 2003 Enterprise X64 Edition
>>> >>>
>>> >>> $ uname -a
>>> >>> CYGWIN_NT-5.2-WOW64 mck-rnmwv4-ip42 1.7.8(0.236/5/3) 2011-03-01 09:36
>>> >>> i686 Cygwin
>>> >>>
>>> >>> $ env|grep -i ora|two
>>> >>> ORACLE_USER=foo1/foo1@foo
>>> >>> ORACLE_SID=foo
>>> >>> ORACLE_USERID=foo1/foo1@foo
>>> >>> TWO_TASK=foo
>>> >>> TNS_ADMIN=E:\oracle\instantclient_11_2
>>> >>> PATH=/usr/local/bin:/usr/bin:/cygdrive/e/oracle/instantclient_11_2:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/system32/WindowsPowerShell/v1.0:/cygdrive/e/PROGRA~1/BMCSOF~1/Patrol3/bin:/cygdrive/e/PROGRA~1/BMCSOF~1/MASTER~1/server/bin:/cygdrive/c/WINDOWS/system32/WindowsPowerShell/v1.0:/opt/java/bin
>>> >>>
>>> >>> CLASSPATH=.;E:\oracle\instantclient_11_2/ojdbc6.jar
>>> >>> ORACLE_HOME=E:\oracle\instantclient_11_2
>>> >>>
>>> >>> $ pwd
>>> >>> /home/foo/DBD-Oracle-1.28
>>> >>>
>>> >>>
>>> >>> $ perl -v
>>> >>>
>>> >>> This is perl, v5.10.1 (*) built for i686-cygwin-thread-multi-64int
>>> >>>
>>> >>>
>>> >>> $ sqlplus foo1/foo1@foo
>>> >>>
>>> >>> SQL*Plus: Release 11.2.0.2.0 Production on Wed Mar 23 19:02:30 2011
>>> >>>
>>> >>> Copyright (c) 1982, 2010, Oracle. All rights reserved.
>>> >>>
>>> >>> se
>>> >>> Connected to:
>>> >>> Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
>>> >>> With the Partitioning and Oracle Data Mining options
>>> >>> JServer Release 9.2.0.4.0 - Production
>>> >>>
>>> >>> SQL> select * from v$version;
>>> >>>
>>> >>> BANNER
>>> >>> ----------------------------------------------------------------
>>> >>> Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
>>> >>> PL/SQL Release 9.2.0.4.0 - Production
>>> >>> CORE 9.2.0.3.0 Production
>>> >>> TNS for HPUX: Version 9.2.0.4.0 - Production
>>> >>> NLSRTL Version 9.2.0.4.0 - Production
>>> >>>
>>> >>> SQL> quit
>>> >>> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 -
>>> >>> 64bit Production
>>> >>> With the Partitioning and Oracle Data Mining options
>>> >>> JServer Release 9.2.0.4.0 - Production
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>> $ perl Makefile.PL
>>> >>> Using DBI 1.616 (for perl 5.010001 on i686-cygwin-thread-multi-64int)
>>> >>> installed in /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/DBI/
>>> >>>
>>> >>> Configuring DBD::Oracle for perl 5.010001 on cygwin
>>> >>> (i686-cygwin-thread-multi-64int)
>>> >>>
>>> >>> Remember to actually *READ* the README file! Especially if you have
>>> >>> any problems.
>>> >>>
>>> >>> Installing on a cygwin, Ver#1.7
>>> >>> Using Oracle in E:/oracle/instantclient_11_2
>>> >>> DEFINE _SQLPLUS_RELEASE = "1102000200" (CHAR)
>>> >>> Oracle version 11.2.0.2 (11.2)
>>> >>> Using OCI directory 'sdk'
>>> >>>
>>> >>> client_version=11.2
>>> >>>
>>> >>>
>>> >>> DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT
>>> >>> -DORA_OCI_VERSION=\"11.2.0.2\" -DORA_OCI_102 -DORA_OCI_112
>>> >>>
>>> >>>
>>> >>> Checking for functioning wait.ph
>>> >>>
>>> >>>
>>> >>> System: perl5.010001 cygwin_nt-5.1 reini 1.7.5(0.22553) 2010-04-12
>>> >>> 19:07 i686 cygwin
>>> >>> Compiler: gcc-4 -O3 -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3
>>> >>> -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
>>> >>> Linker: /usr/bin/ld
>>> >>> Sysliblist:
>>> >>>
>>> >>>
>>> >>> WARNING: If you have problems you may need to rebuild perl with
>>> >>> -Uusemymalloc.
>>> >>> Checking if your kit is complete...
>>> >>> Looks good
>>> >>> LD_RUN_PATH=E:/oracle/instantclient_11_2/lib:E:/oracle/instantclient_11_2/rdbms/lib
>>> >>>
>>> >>> Using DBD::Oracle 1.28.
>>> >>> Using DBD::Oracle 1.28.
>>> >>> Using DBI 1.616 (for perl 5.010001 on i686-cygwin-thread-multi-64int)
>>> >>> installed in /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/DBI/
>>> >>> Writing Makefile for DBD::Oracle
>>> >>>
>>> >>> *** If you have problems...
>>> >>> read all the log printed above, and the README and
>>> >>> README.help.txt files.
>>> >>> (Of course, you have read README by now anyway, haven't you?)
>>> >>>
>>> >>>
>>> >>> $ 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/Object.pm blib/lib/DBD/Oracle/Object.pm
>>> >>> cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
>>> >>> cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
>>> >>> /usr/bin/perl.exe -p -e "s/~DRIVER~/Oracle/g"
>>> >>> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/DBI/Driver.xst>
>>> >>> Oracle.xsi
>>> >>> /usr/bin/perl.exe /usr/lib/perl5/5.10/ExtUtils/xsubpp -typemap
>>> >>> /usr/lib/perl5/5.10/ExtUtils/typemap -typemap typemap Oracle.xs>
>>> >>> Oracle.xsc&& mv Oracle.xsc Oracle.c
>>> >>> gcc-4 -c -IE:/oracle/instantclient_11_2/sdk/include
>>> >>> -IE:/oracle/instantclient_11_2/rdbms/demo
>>> >>> -I/usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/DBI
>>> >>> -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing
>>> >>> -pipe -fstack-protector -I/usr/local/include -DUSEIMPORTLIB -O3
>>> >>> -DVERSION=\"1.28\" -DXS_VERSION=\"1.28\"
>>> >>> "-I/usr/lib/perl5/5.10/i686-cygwin/CORE" -Wall -Wno-comment
>>> >>> -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.2\" -DORA_OCI_102
>>> >>> -DORA_OCI_112 Oracle.c
>>> >>> gcc-4 -c -IE:/oracle/instantclient_11_2/sdk/include
>>> >>> -IE:/oracle/instantclient_11_2/rdbms/demo
>>> >>> -I/usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/DBI
>>> >>> -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing
>>> >>> -pipe -fstack-protector -I/usr/local/include -DUSEIMPORTLIB -O3
>>> >>> -DVERSION=\"1.28\" -DXS_VERSION=\"1.28\"
>>> >>> "-I/usr/lib/perl5/5.10/i686-cygwin/CORE" -Wall -Wno-comment
>>> >>> -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.2\" -DORA_OCI_102
>>> >>> -DORA_OCI_112 dbdimp.c
>>> >>> dbdimp.c: In function ‘dbd_rebind_ph_char’:
>>> >>> dbdimp.c:2666: warning: cast from pointer to integer of different size
>>> >>> dbdimp.c: In function ‘dbd_rebind_ph_xml’:
>>> >>> dbdimp.c:2864: warning: cast to pointer from integer of different size
>>> >>> dbdimp.c: In function ‘ora_bind_ph’:
>>> >>> dbdimp.c:3157: warning: format ‘%ld’ expects type ‘long int’,
>>> >>> but argument 2 has type ‘IV’
>>> >>> dbdimp.c:3166: warning: format ‘%ld’ expects type ‘long int’,
>>> >>> but argument 2 has type ‘IV’
>>> >>> dbdimp.c:3200: warning: format ‘%ld’ expects type ‘long int’,
>>> >>> but argument 3 has type ‘IV’
>>> >>> dbdimp.c: At top level:
>>> >>> dbdimp.c:288: warning: ‘oratype_rebind_ok’ defined but not used
>>> >>> gcc-4 -c -IE:/oracle/instantclient_11_2/sdk/include
>>> >>> -IE:/oracle/instantclient_11_2/rdbms/demo
>>> >>> -I/usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/DBI
>>> >>> -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing
>>> >>> -pipe -fstack-protector -I/usr/local/include -DUSEIMPORTLIB -O3
>>> >>> -DVERSION=\"1.28\" -DXS_VERSION=\"1.28\"
>>> >>> "-I/usr/lib/perl5/5.10/i686-cygwin/CORE" -Wall -Wno-comment
>>> >>> -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.2\" -DORA_OCI_102
>>> >>> -DORA_OCI_112 oci8.c
>>> >>> oci8.c: In function ‘ora_blob_read_mb_piece’:
>>> >>> oci8.c:1737: warning: format ‘%lu’ expects type ‘long unsigned
>>> >>> int’, but argument 6 has type ‘ub4’
>>> >>> oci8.c: In function ‘ora_st_fetch’:
>>> >>> oci8.c:3895: warning: format ‘%d’ expects type ‘int’, but
>>> >>> argument 4 has type ‘IV’
>>> >>> oci8.c:3895: warning: format ‘%d’ expects type ‘int’, but
>>> >>> argument 4 has type ‘IV’
>>> >>> oci8.c:3903: warning: format ‘%d’ expects type ‘int’, but
>>> >>> argument 3 has type ‘IV’
>>> >>> oci8.c:3903: warning: format ‘%d’ expects type ‘int’, but
>>> >>> argument 3 has type ‘IV’
>>> >>> rm -f blib/arch/auto/DBD/Oracle/Oracle.dll
>>> >>> LD_RUN_PATH="E:/oracle/instantclient_11_2/lib:E:/oracle/instantclient_11_2/rdbms/lib"
>>> >>>
>>> >>> g++-4 --shared -Wl,--enable-auto-import -Wl,--export-all-symbols
>>> >>> -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib
>>> >>> -fstack-protector Oracle.o dbdimp.o oci8.o -o
>>> >>> blib/arch/auto/DBD/Oracle/Oracle.dll \
>>> >>> /usr/lib/perl5/5.10/i686-cygwin/CORE/cygperl5_10.dll
>>> >>> -L/home/e8hqxdh/DBD-Oracle-1.28 -loci \
>>> >>>
>>> >>> oci8.o: In function `ora_db_version':
>>> >>> /home/foo/DBD-Oracle-1.28/oci8.c:4619: undefined reference to
>>> >>> `_OCIServerRelease'
>>> >>> collect2: ld returned 1 exit status
>>> >>> make: *** [blib/arch/auto/DBD/Oracle/Oracle.dll] Error 1
>>
>
>
>
> --
> Jason Thurston
>



-- 
Jason Thurston

Reply via email to