On 23/08/11 17:12, Jason Lewis wrote:
Needing a little help getting DBD ODBC working on CentOS 6. I am using the
latest Perl version, also DBI and DBD ODBC modules. I can establish a database
connection with the easysoft connector a pull tables from the database. I'm
unsure of my error building the DBD ODBC module though. Any help would be
appreciated. Thanks Jason
Sorry for the late reply but I've been on holiday :-)
See comments below:
DBI Version 1.616
DBD ODBC 1.31
Perl 5.14.1
Easysoft ODBC to ODBC bridge 2.0.0
Database Server: Windows 2008 R2 / MS SQL 2008 R2
[root@BETA DBD-ODBC-1.31]# perl Makefile.PL
**********
Remember to actually *READ* the README file!
And re-read it if you have any problems.
**********
OSNAME: linux
LANG:
ODBCHOME: /usr/local/easysoft/unixODBC
LD_LIBRARY_PATH:
/usr/local/easysoft/lib:/usr/local/easysoft/oob/client:/usr/local/easysoft/unixODBC/lib
DBROOT:
WINDIR:
II_SYSTEM:
Perl: 5.014001
ExtUtils::MakeMaker: 6.57_05
Command line options:
u! = undef
w! = undef
e! = undef
g! = 0
x! = undef
o=s =
Looking for odbc_config at /usr/local/easysoft/unixODBC/bin/odbc_config
Looking for odbc_config on PATH
odbc_config not found
Looking for iodbc-config on PATH
iodbc_config not found
odbc_config not found - ok, there are other things I can do
Still trying to guess ODBCHOME - looking for headers now
trying /usr/local/easysoft/unixODBC/include
Found sql.h, sqlext.h, sqltypes.h in /usr/local/easysoft/unixODBC/include
Using ODBCHOME /usr/local/easysoft/unixODBC
Looking for iODBC libs in /usr/local/easysoft/unixODBC/lib
Looking for iODBC libs in /usr/local/lib
Looking for iODBC libs in /lib
Looking for iODBC libs in /usr/lib
Looking for iODBC libs in /usr/local/easysoft/unixODBC
Looking for iODBC libs in /usr/local/easysoft/unixODBC/lib
Looking for unixODBC libs in /usr/local/easysoft/unixODBC/lib
Found unixODBC libs
/usr/local/easysoft/unixODBC/lib/libodbc.so,/usr/local/easysoft/unixODBC/lib/libodbc.so.1,/usr/local/easysoft/unixODBC/lib/libodbc.so.1.0.0,/usr/local/easysoft/unixODBC/lib/libodbccr.so,/usr/local/easysoft/unixODBC/lib/libodbccr.so.1,/usr/local/easysoft/unixODBC/lib/libodbccr.so.1.0.0,/usr/local/easysoft/unixODBC/lib/libodbcinst.so,/usr/local/easysoft/unixODBC/lib/libodbcinst.so.1,/usr/local/easysoft/unixODBC/lib/libodbcinst.so.1.0.0,/usr/local/easysoft/unixODBC/lib/libodbcinstQ.so,/usr/local/easysoft/unixODBC/lib/libodbcinstQ.so.1,/usr/local/easysoft/unixODBC/lib/libodbcinstQ.so.1.0.0
in /usr/local/easysoft/unixODBC/lib
This looks like a unixodbc type of driver manager.
Looking for odbcinst
odbcinst -j reports:
unixODBC 2.2.12
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
USER DATA SOURCES..: /root/.odbc.ini
Please note these files as they are where you define your ODBC drivers and data
sources.
Looking for odbc_config to get cflags
odbc_config not found - ok
Checking if your kit is complete...
Warning: the following files are missing in your kit:
t/rt_68720.t
Please inform the author.
This is my fault and as soon as svn.perl.org and rt.perl.org are working again
I'll fix it - sorry.
Using DBI 1.616 (for perl 5.014001 on i686-linux) installed in
/usr/local/perl5.14.1/lib/site_perl/5.14.1/i686-linux/auto/DBI/
Using DBI 1.616 (for perl 5.014001 on i686-linux) installed in
/usr/local/perl5.14.1/lib/site_perl/5.14.1/i686-linux/auto/DBI/
Writing Makefile for DBD::ODBC
Writing MYMETA.yml
The DBD::ODBC tests will use these values for the database connection:
DBI_DSN=dbi:ODBC:dsn_AdventureWorks e.g. dbi:ODBC:demo
DBI_USER=webuser
DBI_PASS=*****
=========================================================================
[root@BETA DBD-ODBC-1.31]# make
cp Changes blib/lib/DBD/ODBC/Changes.pm
cp FAQ blib/lib/DBD/ODBC/FAQ.pm
cp TO_DO blib/lib/DBD/ODBC/TO_DO.pm
cp ODBC.pm blib/lib/DBD/ODBC.pm
gcc -c -I/usr/local/easysoft/unixODBC/include -I.
-I/usr/local/perl5.14.1/lib/site_perl/5.14.1/i686-linux/auto/DBI -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.31\"
-DXS_VERSION=\"1.31\" -fPIC "-I/usr/local/perl5.14.1/lib/5.14.1/i686-linux/CORE"
-I/usr/local/easysoft/unixODBC/include ConvertUTF.c
/usr/local/perl5.14.1/bin/perl -p -e "s/~DRIVER~/ODBC/g"
/usr/local/perl5.14.1/lib/site_perl/5.14.1/i686-linux/auto/DBI/Driver.xst> ODBC.xsi
/usr/local/perl5.14.1/bin/perl /usr/local/perl5.14.1/lib/5.14.1/ExtUtils/xsubpp -typemap
/usr/local/perl5.14.1/lib/5.14.1/ExtUtils/typemap ODBC.xs> ODBC.xsc&& mv
ODBC.xsc ODBC.c
Warning: duplicate function definition 'data_sources' detected in ODBC.xs, line
257
gcc -c -I/usr/local/easysoft/unixODBC/include -I.
-I/usr/local/perl5.14.1/lib/site_perl/5.14.1/i686-linux/auto/DBI -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.31\"
-DXS_VERSION=\"1.31\" -fPIC "-I/usr/local/perl5.14.1/lib/5.14.1/i686-linux/CORE"
-I/usr/local/easysoft/unixODBC/include ODBC.c
gcc -c -I/usr/local/easysoft/unixODBC/include -I.
-I/usr/local/perl5.14.1/lib/site_perl/5.14.1/i686-linux/auto/DBI -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.31\"
-DXS_VERSION=\"1.31\" -fPIC "-I/usr/local/perl5.14.1/lib/5.14.1/i686-linux/CORE"
-I/usr/local/easysoft/unixODBC/include dbdimp.c
gcc -c -I/usr/local/easysoft/unixODBC/include -I.
-I/usr/local/perl5.14.1/lib/site_perl/5.14.1/i686-linux/auto/DBI -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.31\"
-DXS_VERSION=\"1.31\" -fPIC "-I/usr/local/perl5.14.1/lib/5.14.1/i686-linux/CORE"
-I/usr/local/easysoft/unixODBC/include unicode_helper.c
Running Mkbootstrap for DBD::ODBC ()
chmod 644 ODBC.bs
rm -f blib/arch/auto/DBD/ODBC/ODBC.so
LD_RUN_PATH="/usr/local/easysoft/unixODBC/lib" gcc -shared -O2
-L/usr/local/lib -fstack-protector ConvertUTF.o ODBC.o dbdimp.o unicode_helper.o -o
blib/arch/auto/DBD/ODBC/ODBC.so \
-L/usr/local/easysoft/unixODBC/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.3
=========================================================================
[root@BETA DBD-ODBC-1.31]# make test
PERL_DL_NONLAZY=1 /usr/local/perl5.14.1/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base.t ................... ok
t/02simple.t ................. 1/65 #
# Perl 5.14.1
# osname=linux, osvers=2.6.32-71.29.1.el6.i686, archname=i686-linux
# Using DBI 1.616
# Using DBD::ODBC 1.31
# Using DBMS_NAME 'Microsoft SQL Server'
# Using DBMS_VER '10.50.1600'
# Using DRIVER_NAME 'esoobclient'
# Using DRIVER_VER '02.00.0000'
# odbc_has_unicode 0
t/02simple.t ................. ok
t/03dbatt.t .................. 1/29 #
# N.B. Some drivers (postgres/cache) may return ODBC 2.0 column names for the
SQLTables result-set e.g. TABLE_QUALIFIER instead of TABLE_CAT
t/03dbatt.t .................. ok
t/05meth.t ................... ok
t/07bind.t ................... ok
t/08bind2.t .................. ok
t/09multi.t .................. ok
t/10handler.t ................ ok
t/12blob.t ................... ok
t/20SqlServer.t .............. 54/65 # DBD::ODBC::st execute failed:
[unixODBC][Microsoft][ODBC SQL Server Driver]Connection is busy with results
for another hstmt (SQL-HY000) at t/20SqlServer.t line 207.
# DSN=dbi:ODBC:DSN=dsn_AdventureWorks;MARS_Connection=yes;
#
# NOTE: You failed this test because your SQL Server driver
# is too old to handle the MARS_Connection attribute. This test cannot
# easily skip this test for old drivers as there is no definite SQL Server
# driver version it can check.
#
This is fine.
t/20SqlServer.t .............. ok
t/30Oracle.t ................. ok
t/40UnicodeRoundTrip.t ....... ok
t/41Unicode.t ................ ok
t/50_odbc_utf8_on.t .......... ok
t/70execute_array.t .......... 1/? #
#
# NOTE: This is an experimental test. It does not test anything in DBD::ODBC
specifically but it does test execute_array and execute_for_fetch which are
implemented in DBI. If it fails it should not stop you installing DBD::ODBC but
if it fails with an error other than something indicating 'connection busy' it
would be worth rerunning it with TEST_VERBOSE set or using prove and sending
the results to the dbi-users mailing list.
#
t/70execute_array.t .......... 184/? #
# This test died with DBD::ODBC::st execute_array failed: executing 5 generated
4 errors at t/70execute_array.t line 158.
# It requires multiple active statement support in the driver and I cannot
easily determine if your driver supports MAS. Ignoring the rest of this test.
# 1,[unixODBC][Microsoft][ODBC SQL Server Driver]Connection is busy with
results for another hstmt (SQL-HY000),HY000
# 1,[unixODBC][Microsoft][ODBC SQL Server Driver]Connection is busy with
results for another hstmt (SQL-HY000),HY000
# 1,[unixODBC][Microsoft][ODBC SQL Server Driver]Connection is busy with
results for another hstmt (SQL-HY000),HY000
# 1,[unixODBC][Microsoft][ODBC SQL Server Driver]Connection is busy with
results for another hstmt (SQL-HY000),HY000
t/70execute_array.t .......... ok
This is almost ok but I doubt anything for you to worry about.
I will look in to it.
t/odbc_describe_parameter.t .. ok
t/pod-coverage.t ............. 1/1 # Test::Pod::Coverage 1.04 required for
testing POD coverage
t/pod-coverage.t ............. ok
t/pod.t ...................... ok
t/rt_38977.t ................. ok
t/rt_39841.t ................. ok
t/rt_39897.t ................. ok
t/rt_43384.t ................. ok
t/rt_46597.t ................. ok
t/rt_50852.t ................. ok
t/rt_57957.t ................. 1/9 #
# Some of these tests may fail for your driver - please let me know if they do
along with the strings Microsoft SQL Server/esoobclient
t/rt_57957.t ................. ok
t/rt_59621.t ................. ok
t/rt_61370.t ................. ok
t/rt_62033.t ................. 1/?
# Failed test 'Execute ok'
# at t/rt_62033.t line 91.
DBD::ODBC::st fetchrow_array failed: no select statement currently executing
(SQL-HY000) at t/rt_62033.t line 117.
# Tests were run but no plan was declared and done_testing() was not seen.
t/rt_62033.t ................. Dubious, test returned 255 (wstat 65280, 0xff00)
You should report this to easysoft support at [email protected].
However, it should not stop you installing DBD::ODBC and using it.
Failed 1/8 subtests
t/rt_63550.t ................. ok
t/rt_null_nvarchar.t ......... ok
t/sql_type_cast.t ............ ok
Test Summary Report
-------------------
t/rt_62033.t (Wstat: 65280 Tests: 8 Failed: 1)
Failed test: 8
Non-zero exit status: 255
Parse errors: No plan found in TAP output
Files=31, Tests=904, 27 wallclock secs ( 0.13 usr 0.05 sys + 1.49 cusr 0.77
csys = 2.44 CPU)
Result: FAIL
Failed 1/31 test programs. 1/904 subtests failed.
make: *** [test_dynamic] Error 255
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com