>
>
> Well I am having some trouble getting DBD::ODBC up and
> running and so here I am. I was unable to get to
> http://www.fugue.com/dbi, but I sent an email to the
> dbi-requests email address. I am not even sure I can send an
> email here if I am not a user but I am giving this a shot anyways.
>
> I am running Fedora Core 3.
>
> I installed DBI
> That seemed to go fine
> no errors but i didnt configure any ini or anything
> yet..still default (incase that matters)
>
> I set Env. Variables:
> export DBI_DSN=dbi:ODBC:myserver1
> export DBI_USER=myUN
> export DBI_PASS=myPW
> That seemed fine
>
> Installed iodbc to /usr/local/stow/iodbc-3.52.1
> That seemed fine
>
> export LD_LIBRARY_PATH=/usr/local/stow/iodbc-3.52.1/
> That seemed fine and I see this now in the PATH
> *now I only did this because Makefile.PL for DBD::ODBC kept
> saying it wasnt there. *but it still says that so I am not
> sure whats up.
Just for grins, try removing the trailing slash and the LD_LIBRARY_PATH should
be set to
the lib directory, which may be why Makefile.PL is complaining. So, try:
export LD_LIBRARY_PATH=/usr/local/stow/iodbc-3.52.1/lib
And
perl Makefile.PL -o /usr/local/stow/iodbc-3.52.1
Post that output here and let's see how that looks.
Also, since you didn't mention setting up the odbc.ini, etc for "myserver1",
you should
set that up and *test* it via the test program that iODBC provides before trying
DBD::ODBC.
>
> Now trying to get the DBD::ODBC installed is where I am
> having issues. I run perl Makefile.PL -o
> /usr/local/stow/iodbc-3.52.1/ that seems ok However it reports
> "WARNING: LD_LIBRARY_PATH doesn't include
> =/usr/local/stow/iodbc-3.52.1/" This is odd since I can see
> it in the env But it does pick up all the DBI_DSN USER and
> PASS. "make" seems fine "make test" has many errors and fails
> all over the place.
>
> Here is what I have for perl Makefile.PL, make, make test,
> and make test VERBOSE.
>
>
> [EMAIL PROTECTED] DBD-ODBC-1.13]# perl Makefile.PL -o
> /usr/local/stow/iodbc-3.52.1/ Useless use of private variable
> in void context at Makefile.PL line 431. Overriding ODBC
> Directory with command line option: /usr/local/stow/iodbc-3.52.1/
>
> Configuring DBD::ODBC ...
>
> >>> Remember to actually *READ* the README file!
> And re-read it if you have any problems.
>
> Using DBI 1.46 (for perl 5.008005 on i386-linux-thread-multi)
> installed in
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
> Overriding ODBC Directory with command line option:
> /usr/local/stow/iodbc-3.52.1/ Using ODBC in
> /usr/local/stow/iodbc-3.52.1/
>
> Umm, this looks like a unixodbc type of driver manager.
> We expect to find the sql.h, sqlext.h and (which were
> supplied with unixODBC) in $ODBCHOME/include directory
> alongside the /usr/local/stow/iodbc-3.52.1//lib/libodbc.a
> /usr/local/stow/iodbc-3.52.1//lib/libodbc.so library. in $ODBCHOME/lib
This doesn't look right. It should see it as an iODBC driver manager.
Try what I indicated above, and see if it notices the iODBC driver type instead
of
unixODBC.
Jeff
>
> Warning: LD_LIBRARY_PATH doesn't include /usr/local/stow/iodbc-3.52.1/
>
> Checking if your kit is complete...
> Looks good
> Injecting selected odbc driver into cc command
> Injecting selected odbc driver into cc command
> Using DBI 1.46 (for perl 5.008005 on i386-linux-thread-multi)
> installed in
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
> Writing Makefile for DBD::ODBC
>
> The DBD::ODBC tests will use these values for the database connection:
> DBI_DSN=dbi:ODBC:myserver1 e.g. dbi:ODBC:demo
> DBI_USER=myUN
> DBI_PASS=myPW
>
>
>
> [EMAIL PROTECTED] DBD-ODBC-1.13]# make
> cp Changes blib/lib/DBD/ODBC/Changes.pm
> cp ODBC.pm blib/lib/DBD/ODBC.pm
> /usr/bin/perl -p -e "s/~DRIVER~/ODBC/g"
/usr/lib/perl5/site_perl/5.8.5/i386-linux-> thread-multi/auto/DBI//Driver.xst >
ODBC.xsi
/usr/bin/perl
> /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -typemap
> /usr/lib/perl5/5.8.5/ExtUtils/typemap ODBC.xs > ODBC.xsc &&
> mv ODBC.xsc ODBC.c
> Warning: duplicate function definition 'data_sources'
> detected in ODBC.xs, line 202 gcc -c
> -I/usr/local/stow/iodbc-3.52.1//include -I.
> -I/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -I/usr/local/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -I/usr/include/gdbm -O2 -g -pipe -m32 -march=i386
> -mtune=pentium4 -DVERSION=\"1.13\" -DXS_VERSION=\"1.13\" -fPIC
> "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE"
> -I/usr/local/stow/iodbc-3.52.1//include ODBC.cgcc -c
> -I/usr/local/stow/iodbc-3.52.1//include -I.
> -I/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
> -fno-strict-aliasing -pipe -I/usr/local/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -I/usr/include/gdbm -O2 -g -pipe -m32 -march=i386
> -mtune=pentium4 -DVERSION=\"1.13\" -DXS_VERSION=\"1.13\" -fPIC
> "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE"
> -I/usr/local/stow/iodbc-3.52.1//include dbdimp.c
> dbdimp.c: In function `odbc_db_execdirect':
> dbdimp.c:403: warning: passing arg 2 of `SQLRowCount' from
> incompatible pointer type
> dbdimp.c: In function `dbd_error2':
> dbdimp.c:960: warning: passing arg 5 of `SQLError' from
> incompatible pointer type
> dbdimp.c: In function `odbc_describe_col':
> dbdimp.c:4000: warning: passing arg 7 of `SQLDescribeCol'
> from incompatible pointer type
> dbdimp.c: In function `AllODBCErrors':
> dbdimp.c:4239: warning: passing arg 5 of `SQLError' from
> incompatible pointer type Running Mkbootstrap for DBD::ODBC
> () chmod 644 ODBC.bs rm -f blib/arch/auto/DBD/ODBC/ODBC.so
> gcc -shared -L/usr/local/lib ODBC.o dbdimp.o -o
> blib/arch/auto/DBD/ODBC/ODBC.so
> -L/usr/local/stow/iodbc-3.52.1//lib -lodbc
> chmod 755 blib/arch/auto/DBD/ODBC/ODBC.so
> cp ODBC.bs blib/arch/auto/DBD/ODBC/ODBC.bs
> chmod 644 blib/arch/auto/DBD/ODBC/ODBC.bs
> Manifying blib/man3/DBD::ODBC.3pm
>
>
>
> [EMAIL PROTECTED] DBD-ODBC-1.13]# make test
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM"
> "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/01base.........ok t/02simple.......ok 2/36DBI
> connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/02simple.t
> line 21 Undefined subroutine &main::BAILOUT called at
> t/02simple.t line 23. # Looks like you planned 36 tests but
> only ran 2. # Looks like your test died just after 2.
> t/02simple.......dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-36
> Failed 34/36 tests, 5.56% okay
> t/03dbatt........ok 2/24DBI
> connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/03dbatt.t
> line 24 Undefined subroutine &main::BAILOUT called at
> t/03dbatt.t line 26. # Looks like you planned 24 tests but
> only ran 2. # Looks like your test died just after 2.
> t/03dbatt........dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-24
> Failed 22/24 tests, 8.33% okay
> t/05meth.........ok 1/8DBI
> connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/05meth.t
> line 24 Undefined subroutine &main::BAILOUT called at
> t/05meth.t line 26. # Looks like you planned 8 tests but only
> ran 1. # Looks like your test died just after 1.
> t/05meth.........dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 2-8
> Failed 7/8 tests, 12.50% okay
> t/07bind.........ok 1/11DBI
> connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/07bind.t
> line 22 Undefined subroutine &main::BAILOUT called at
> t/07bind.t line 24. # Looks like you planned 11 tests but
> only ran 1. # Looks like your test died just after 1.
> t/07bind.........dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 2-11
> Failed 10/11 tests, 9.09% okay
> t/08bind2........ok 2/5DBI
> connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/08bind2.t
> line 26 Undefined subroutine &main::BAILOUT called at
> t/08bind2.t line 28. # Looks like you planned 5 tests but
> only ran 2. # Looks like your test died just after 2.
> t/08bind2........dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-5
> Failed 3/5 tests, 40.00% okay
> t/09multi........ok 3/7DBI
> connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/09multi.t
> line 26 Undefined subroutine &main::BAILOUT called at
> t/09multi.t line 28. # Looks like you planned 7 tests but
> only ran 3. # Looks like your test died just after 3.
> t/09multi........dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 4-7
> Failed 4/7 tests, 42.86% okay
> t/20SqlServer....ok 2/37DBI
> connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at
> t/20SqlServer.t line 47 Undefined subroutine &main::BAILOUT
> called at t/20SqlServer.t line 49. # Looks like you planned
> 37 tests but only ran 2. # Looks like your test died just
> after 2. t/20SqlServer....dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-37
> Failed 35/37 tests, 5.41% okay
> t/30Oracle.......ok 2/4DBI
> connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/30Oracle.t
> line 26 Undefined subroutine &main::BAILOUT called at
> t/30Oracle.t line 28. # Looks like you planned 4 tests but
> only ran 2. # Looks like your test died just after 2.
> t/30Oracle.......dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-4
> Failed 2/4 tests, 50.00% okay
> Failed Test Stat Wstat Total Fail Failed List of Failed
> --------------------------------------------------------------
> -----------------
> t/02simple.t 255 65280 36 68 188.89% 3-36
> t/03dbatt.t 255 65280 24 44 183.33% 3-24
> t/05meth.t 255 65280 8 14 175.00% 2-8
> t/07bind.t 255 65280 11 20 181.82% 2-11
> t/08bind2.t 255 65280 5 6 120.00% 3-5
> t/09multi.t 255 65280 7 8 114.29% 4-7
> t/20SqlServer.t 255 65280 37 70 189.19% 3-37
> t/30Oracle.t 255 65280 4 4 100.00% 3-4
> Failed 8/9 test scripts, 11.11% okay. 117/137 subtests
> failed, 14.60% okay.
> make: *** [test_dynamic] Error 255
>
>
>
>
>
> [EMAIL PROTECTED] DBD-ODBC-1.13]# make test TEST_VERBOSE=1
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM"
> "-e" "test_harness(1, 'blib/lib', 'blib/arch')" t/*.t
> t/01base.........1..5 ok 1 - require DBI; ok 2 - import DBI
> ok 3 - DBI->internal is DBI::dr ok 4 - Install ODBC driver OK
> ok 5 - Version is not empty ok t/02simple.......1..36 ok 1 -
> use DBI; ok 2 - use ODBCTEST; DBI
> connect('CompatInterop','compatinterop_write',...) failed:
> [iODBC][Driver Manager]Data source name not found and no
> default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/02simple.t
> line 21 Undefined subroutine &main::BAILOUT called at
> t/02simple.t line 23. # Looks like you planned 36 tests but
> only ran 2. # Looks like your test died just after 2. dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-36
> Failed 34/36 tests, 5.56% okay
> t/03dbatt........1..24
> ok 1 - use DBI;
> ok 2 - use ODBCTEST;
> DBI connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/03dbatt.t
> line 24 Undefined subroutine &main::BAILOUT called at
> t/03dbatt.t line 26. # Looks like you planned 24 tests but
> only ran 2. # Looks like your test died just after 2. dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-24
> Failed 22/24 tests, 8.33% okay
> t/05meth.........1..8
> ok 1 - use DBI;
> DBI connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/05meth.t
> line 24 Undefined subroutine &main::BAILOUT called at
> t/05meth.t line 26. # Looks like you planned 8 tests but only
> ran 1. # Looks like your test died just after 1. dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 2-8
> Failed 7/8 tests, 12.50% okay
> t/07bind.........1..11
> ok 1 - use ODBCTEST;
> DBI connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/07bind.t
> line 22 Undefined subroutine &main::BAILOUT called at
> t/07bind.t line 24. # Looks like you planned 11 tests but
> only ran 1. # Looks like your test died just after 1. dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 2-11
> Failed 10/11 tests, 9.09% okay
> t/08bind2........1..5
> ok 1 - use ODBCTEST;
> ok 2 - use Data::Dumper;
> DBI connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/08bind2.t
> line 26 Undefined subroutine &main::BAILOUT called at
> t/08bind2.t line 28. # Looks like you planned 5 tests but
> only ran 2. # Looks like your test died just after 2. dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-5
> Failed 3/5 tests, 40.00% okay
> t/09multi........1..7
> ok 1 - use strict;
> ok 2 - use DBI;
> ok 3 - use ODBCTEST;
> DBI connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/09multi.t
> line 26 Undefined subroutine &main::BAILOUT called at
> t/09multi.t line 28. # Looks like you planned 7 tests but
> only ran 3. # Looks like your test died just after 3. dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 4-7
> Failed 4/7 tests, 42.86% okay
> t/20SqlServer....1..37
> ok 1 - use ODBCTEST;
> ok 2 - use Data::Dumper;
> DBI connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at
> t/20SqlServer.t line 47 Undefined subroutine &main::BAILOUT
> called at t/20SqlServer.t line 49. # Looks like you planned
> 37 tests but only ran 2. # Looks like your test died just
> after 2. dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-37
> Failed 35/37 tests, 5.41% okay
> t/30Oracle.......1..4
> ok 1 - use ODBCTEST;
> ok 2 - use Data::Dumper;
> DBI connect('CompatInterop','compatinterop_write',...)
> failed: [iODBC][Driver Manager]Data source name not found and
> no default driver specified. Driver could not be loaded
> (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at t/30Oracle.t
> line 26 Undefined subroutine &main::BAILOUT called at
> t/30Oracle.t line 28. # Looks like you planned 4 tests but
> only ran 2. # Looks like your test died just after 2. dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 3-4
> Failed 2/4 tests, 50.00% okay
> Failed Test Stat Wstat Total Fail Failed List of Failed
> --------------------------------------------------------------
> -----------------
> t/02simple.t 255 65280 36 68 188.89% 3-36
> t/03dbatt.t 255 65280 24 44 183.33% 3-24
> t/05meth.t 255 65280 8 14 175.00% 2-8
> t/07bind.t 255 65280 11 20 181.82% 2-11
> t/08bind2.t 255 65280 5 6 120.00% 3-5
> t/09multi.t 255 65280 7 8 114.29% 4-7
> t/20SqlServer.t 255 65280 37 70 189.19% 3-37
> t/30Oracle.t 255 65280 4 4 100.00% 3-4
> Failed 8/9 test scripts, 11.11% okay. 117/137 subtests
> failed, 14.60% okay.
>
>
> Any ideas?
>
> Thanks for the help,
>
> Ryan
>