RE: Trouble Installing ODBC 1.13 on Linux 64



Martin, Thanks ... make builds the libs now. I'm still failing a few test, but I'll try sorting it out from here. Craig ~~~~~~~ results ~~~~~~~~ mrtg@prod-netflow DBD-ODBC-1.13]$ make test TEST_VERBOSE=1PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(1, 'blib/lib', 'blib/arch')" t/*.tt/01base.........1..5ok 1 - require DBI;ok 2 - import DBIok 3 - DBI->internal is DBI::drok 4 - Install ODBC driver OKok 5 - Version is not emptyokt/02simple.......1..36ok 1 - use DBI;ok 2 - use ODBCTEST;ok 3 - Set Auto commitok 4 - Auto commit retrieved to what was setok 5 - create test tableok 6 - test table existsok 7 - insert test dataok 8 - select test dataok 9 - Set Long Read lenok 10 - Set Long Trun*** 1ok 11 - Set Print Errorok 12 - Select Long dataok 13 - Set Long Trun*** 0ok 14 - Select Long Data failureok 15 - prepare select from tableok 16 - Execute select# Coltype 5 not found in list # ## Coltype 12 not found in list # ## Coltype -1 not found in list # ## Coltype 9 not found in list # ## Failed test (t/02simple.t at line 76)not ok 17 - Col count matches correct col count# got: '0'# expected: '4'ok 18 - Set RaiseError 0ok 19 - Set PrintError 0ok 20 - Error reported on bad queryok 21 - date check selectok 22 - date check executeok 23 - date check rowsok 24 - group by query prepareok 25 - group by query executeok 26 - group by query returned rows# Failed test (t/02simple.t at line 132)# '0'# ># '0'not ok 27 - data sources testok 28 - test ping methodok 29 - Attrib odbc_ignore_named_placeholders 0 to startok 30 - Attrib odbc_ignore_named_placeholders set to 1ok 31 - test connecting twice to the same databaseok 32 - database name is returned successfullyok 33 - automatically finish when execute run againok 34 - INVALID DSN Test: [unixODBC][Driver Manager]Data source name not found, and no default driver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1)#ok 35 - Connection with DSN=# Looks like you failed 2 tests of 36.ok 36 - Connection with DSN= and uid and pwd are setdubious Test returned status 2 (wstat 512, 0x200)DIED. FAILED tests 17, 27 Failed 2/36 tests, 94.44% okayt/03dbatt........1..24ok 1 - use DBI;ok 2 - use ODBCTEST;ok 3 - Set Long Read Lenok 4 - AutoCommit set on dbhok 5 - commitTest with AutoCommitok 6 - AutoCommit turned offok 7 - commitTest with AutoCommit offDBD driver has not implemented the AutoCommit attribute at t/03dbatt.t line 54.Issuing rollback() for database handle being DESTROY'd without explicit disconnect().# Looks like you planned 24 tests but only ran 7.# Looks like your test died just after 7.dubious Test returned status 255 (wstat 65280, 0xff00)DIED. FAILED tests 8-24 Failed 17/24 tests, 29.17% okayt/05meth.........1..8ok 1 - use DBI;ok 2 - delete prepared statementok 3 - Number of rows > 0ok 4 - Number of rows from DBI matches sthok 5 - finished and rolled backok 6 - no errorok 7 - ?ok 8 - ??okt/07bind.........1..11ok 1 - use ODBCTEST;ok 2 - Create tablesok 3 - Table insert testok 4 - Ensure long readlen set correctlyok 5 - Select testsok 6 - Insert with bind testsok 7 - select long test dataok 8 - update long test dataok 9 - select long test data againok 10 - ParamValues test integerok 11 - Paramvalues test stringokt/08bind2........1..5ok 1 - use ODBCTEST;ok 2 - use Data::Dumper;ok 3 # skip SQLDescribeParam not supported using PostgreSQL#ok 4 # skip SQLDescribeParam not supported using PostgreSQL#ok 5 # skip SQLDescribeParam not supported using PostgreSQL#ok 3/5 skipped: SQLDescribeParam not supported using PostgreSQLt/09multi........1..7ok 1 - use strict;ok 2 - use DBI;ok 3 - use ODBCTEST;ok 4 # skip Multiple statements not supported using PostgreSQL#ok 5 # skip Multiple statements not supported using PostgreSQL#ok 6 # skip Multiple statements not supported using PostgreSQL#ok 7 # skip Multiple statements not supported using PostgreSQL#ok 4/7 skipped: Multiple statements not supported using PostgreSQLt/20SqlServer....1..37ok 1 - use ODBCTEST;ok 2 - use Data::Dumper;ok 3 # skip Microsoft SQL Server tests not supported using PostgreSQLok 4 # skip Microsoft SQL Server tests not supported using PostgreSQLok 5 # skip Microsoft SQL Server tests not supported using PostgreSQLok 6 # skip Microsoft SQL Server tests not supported using PostgreSQLok 7 # skip Microsoft SQL Server tests not supported using PostgreSQLok 8 # skip Microsoft SQL Server tests not supported using PostgreSQLok 9 # skip Microsoft SQL Server tests not supported using PostgreSQLok 10 # skip Microsoft SQL Server tests not supported using PostgreSQLok 11 # skip Microsoft SQL Server tests not supported using PostgreSQLok 12 # skip Microsoft SQL Server tests not supported using PostgreSQLok 13 # skip Microsoft SQL Server tests not supported using PostgreSQLok 14 # skip Microsoft SQL Server tests not supported using PostgreSQLok 15 # skip Microsoft SQL Server tests not supported using PostgreSQLok 16 # skip Microsoft SQL Server tests not supported using PostgreSQLok 17 # skip Microsoft SQL Server tests not supported using PostgreSQLok 18 # skip Microsoft SQL Server tests not supported using PostgreSQLok 19 # skip Microsoft SQL Server tests not supported using PostgreSQLok 20 # skip Microsoft SQL Server tests not supported using PostgreSQLok 21 # skip Microsoft SQL Server tests not supported using PostgreSQLok 22 # skip Microsoft SQL Server tests not supported using PostgreSQLok 23 # skip Microsoft SQL Server tests not supported using PostgreSQLok 24 # skip Microsoft SQL Server tests not supported using PostgreSQLok 25 # skip Microsoft SQL Server tests not supported using PostgreSQLok 26 # skip Microsoft SQL Server tests not supported using PostgreSQLok 27 # skip Microsoft SQL Server tests not supported using PostgreSQLok 28 # skip Microsoft SQL Server tests not supported using PostgreSQLok 29 # skip Microsoft SQL Server tests not supported using PostgreSQLok 30 # skip Microsoft SQL Server tests not supported using PostgreSQLok 31 # skip Microsoft SQL Server tests not supported using PostgreSQLok 32 # skip Microsoft SQL Server tests not supported using PostgreSQLok 33 # skip Microsoft SQL Server tests not supported using PostgreSQLok 34 # skip Microsoft SQL Server tests not supported using PostgreSQLok 35 # skip Microsoft SQL Server tests not supported using PostgreSQLok 36 # skip Microsoft SQL Server tests not supported using PostgreSQLok 37 # skip Microsoft SQL Server tests not supported using PostgreSQLok 35/37 skipped: Microsoft SQL Server tests not supported using PostgreSQLt/30Oracle.......1..4ok 1 - use ODBCTEST;ok 2 - use Data::Dumper;ok 3 # skip Oracle tests not supported using PostgreSQLok 4 # skip Oracle tests not supported using PostgreSQLok 2/4 skipped: Oracle tests not supported using PostgreSQLFailed Test Stat Wstat Total Fail Failed List of Failed-------------------------------------------------------------------------------t/02simple.t 2 512 36 2 5.56% 17 27t/03dbatt.t 255 65280 24 34 141.67% 8-2444 subtests skipped.Failed 2/9 test scripts, 77.78% okay. 19/137 subtests failed, 86.13% okay.make: *** [test_dynamic] Error 255

Date: Fri, 13 Jul 2007 16:54:57 +0100> From: martin.evans@xxxxxxxxxxxx> To: dbi-users@xxxxxxxx> Subject: Re: Trouble Installing ODBC 1.13 on Linux 64> > Craig Metzer wrote:> > Martin,> > Thanks for the reply.> > I'm not sure I understand the problem with the .a files. How would I go about makeing it use teh .la?> > That was just example showing what happens when the gnu linker hits a 32 > bit .a when it is attempting to do a 64 bit build - I was not suggesting > you need to use .la files as you are not using configure and libtool.> > > Would I have to mod the Makefile?> > I have two versions of libodbc one 32 and another 64.> > The paths that Makefile chose were the 32-bit ... should I mod these to use the lib64 instead?> > It looked to me that your perl was 64 bit and hence you need to point > DBD::ODBC at the 64 bit unixODBC. That might be a little tricky as it > stands without editing the makefile as you look like you want DBD::ODBC > to look in /usr/lib64 for libodbc.so but /usr/include for the header > files and DBD::ODBC only supports specifying the one location for the > driver/driver_manager.> > I'd do a perl Makefile.PL with ODBCHOME set to /usr then edit the > makefile for now and change the -L/usr/lib to -L/usr/lib64.> > > Thanks for the help..> > Craig> > ~~~~ file output ~~~~~~> > [root@prod-netflow DBD-ODBC-1.13]# file /usr/lib64/libodbc.so/usr/lib64/libodbc.so: symbolic link to `libodbc..so.1.0.0'[root@prod-netflow DBD-ODBC-1.13]# file /usr/lib64/libodbc.so.1.0..0/usr/lib64/libodbc.so.1.0.0: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), stripped[root@prod-netflow DBD-ODBC-1.13]# file /usr/lib/libodbc.so/usr/lib/libodbc.so: symbolic link to `libodbc.so.1.0.0'[root@prod-netflow DBD-ODBC-1.13]# file /usr/lib/libodbc.so.1.0.0/usr/lib/libodbc.so.1..0.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped> > > > > > > > > >> Date: Fri, 13 Jul 2007 16:26:26 +0100> From: martin.evans@xxxxxxxxxxxx> To: dbi-users@xxxxxxxx> Subject: Re: Trouble Installing ODBC 1.13 on Linux 64> > Craig Metzer wrote:> > > > Hope you all are having a pleasant summer.> > > > I am ... just a little trouble installing ODBC for Perl 5.8.5. Perhaps someone can help me out.> > > > I get an error on make .. it appears to be in building ODBC.so:> > > > gcc -shared ODBC.o dbdimp..o -o blib/arch/auto/DBD/ODBC/ODBC.so -L/usr/lib -lodbc/usr/bin/ld: skipping incompatible /usr/lib/libodbc.so when searching for -lodbc/usr/lib/libodbc.a: could not read symbols: Bad valuecollect2: ld returned 1 exit statusmake: *** [blib/arch/auto/DBD/ODBC/ODBC.so] Error 1> > TIA,> > Craig> > Washington DC> > > > ~~~~ output ~~~~~~~~~> > [mrtg@prod-netflow DBD-ODBC-1.13]$ perl Makefile.PLUseless use of private variable in void context at Makefile.PL line 431.> > Configuring DBD::ODBC ...> >>>> Remember to actually *READ* the README file! And re-read i> t if you have any problems.> > Multiple copies of Driver.xst found in: /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBI/ /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/auto/DBI/ at Makefile.PL line 61Using DBI 1.58 (for perl 5.008005 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/site_perl/5.8..5/x86_64-linux-thread-multi/auto/DBI/Using ODBC in /usr> > Umm, this looks like a unixodbc type of driver manager.We expect to find the sql.h, sqlext..h and (which weresupplied with unixODBC) in $ODBCHOME/include directory alongsidethe /usr/lib/libodbc.a /usr/lib/libodbc.so library. in $ODBCHOME/lib> > Checking if your kit is complete...Looks goodInjecting selected odbc driver into cc commandInjecting selected odbc driver into cc commandMultiple copies of Driver.xst found in: /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBI/ /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/auto/DBI/ at Makefile.PL line 462Using > DBI 1.58 (for perl 5.008005 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/site_perl/5.8.5/x86_64-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:pgsql e.g. dbi:ODBC:demo DBI_USER=postgres DBI_PASS=postgres> > [mrtg@prod-netflow DBD-ODBC-1.13]$ makecp Changes blib/lib/DBD/ODBC/Changes.pmcp ODBC.pm blib/lib/DBD/ODBC.pm/usr/bin/perl -p -e "s/~DRIVER~/ODBC/g" /usr/lib64/perl5/site_perl/5.8.5/x86_64-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.cWarning: duplicate function definition 'data_sources' detected in ODBC.xs, line 202gcc -c -I/usr/include -I. -I/usr/lib64/perl5/site_perl/5.8..5/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_> FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m64 -DVERSION=\"1..13\" -DXS_VERSION=\"1.13\" -fPIC "-I/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE" -I/usr/include ODBC.cgcc -c -I/usr/include -I. -I/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DDEBUGGI> NG -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m64 -DVERSION=\"1.13\" -DXS_VERSION=\"1.13\" -fPIC "-I/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE" -I/usr/include dbdimp.cdbdimp.c: In function `odbc_db_STORE_attrib':dbdimp.c:3108: warning: cast from pointer to integer of different sizedbdimp.c: In function `odbc_db_FETCH_attrib':dbdimp.c:3440: warning: cast to pointer from integer of different sizeRunning Mkbootstrap for DBD::ODBC ()chmod 644 ODBC.bsrm -f blib/arch/auto/DBD/ODBC/ODBC.sogcc -shared ODBC.o dbdimp.o -o blib/arch/auto/DBD/ODBC/ODBC.so -L/usr/lib -lodbc/usr/bin/ld:> skipping incompatible /usr/lib/libodbc.so when searching for -lodbc/usr/lib/libodbc.a: could not read symbols: Bad valuecollect2: ld returned 1 exit statusmake: *** [blib/arch/auto/DBD/ODBC/ODBC.so] Error 1> > > > [mrtg@prod-netflow DBD-ODBC-1.13]$ ls -l $ODBCHOME/include/sql*.h-rw-r--r-- 1 root root 31945 Nov 21 2005 /usr/include/sql.h-rw-r--r-- 1 root root 1007 Feb 16 2006 /usr/include/sql3types.h-rw-r--r-- 1 root root 1258 Feb 16 2006 /usr/include/sqlca.h-rw-r--r-- 1 root root 78402 Nov 21 2005 /usr/include/sqlext.h-rw-r--r-- 1 root root 11165 Nov 21 2005 /usr/include/sqltypes.h-rw-r--r-- 1 root root 21671 Nov 21 2005 /usr/include/sqlucode.h> > > > [mrtg@prod-netflow DBD-ODBC-1.13]$ exportdeclare -x DBI_DSN="dbi:ODBC:pgsql"declare -x DBI_PASS="postgres"declare -x DBI_USER="postgres"declare -x LANG="C"declare -x LD_LIBRARY_PATH="/usr:/usr/lib/pgsql:/lib:/lib64"declare -x ODBCHOME="/usr"declare -x PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/> usr/bin:/usr/X11R6/bin:/usr/local/pgsql/bin:/opt/CSCOnfc/bin:/opt/CSCOnfc/tools:/usr/local/mrtg-2/bin:/home/mrtg/bin:./"declare -x POSTGRES_INCLUDE="/usr/include/pgsql"declare -x POSTGRES_LIB="/usr/lib64/pgsql"declare -x QTDIR="/usr/lib64/qt-3.3"declare -x SHELL="/bin/bash"declare -x TERM="xterm"> > > > [mrtg@prod-netflow DBD-ODBC-1.13]$ perl -VSummary of my perl5 (revision 5 version 8 subversion 5) configuration: Platform: osname=linux, osvers=2..6.9-22.18.bz155725.elsmp, archname=x86_64-linux-thread-multi uname='linux hs20-bc1-3.build.redhat.com 2.6.9-22.18.bz155725.elsmp #1 smp thu nov 17 15:34:08 est 2005 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -m64 -Dversion=5.8.5 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dprivlib=/usr/lib/perl5/5.8.5 -Dsitelib=/usr/lib/perl5/site_perl/5.8.5 -Dvendorlib=/usr/lib/perl5/vendor_perl/5.8.5 -D> archlib=/usr/lib64/perl5/5..8.5/x86_64-linux-thread-multi -Dsitearch=/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.8..5/x86_64-linux-thread-multi -Darchname=x86_64-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Dus> eithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dinc_version_list=5.8.4 5.8.3 5.8.2 5.8.1 5.8.0' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFS> ET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -g -pipe -m64', cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.4.6 20060404 (Red Hat 3.4.6-2)', gccosandvers='' intsiz> e=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc', ldflags ='' libpth=/usr/local/lib64 /lib64 /usr/lib64 libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.3.3.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.3.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlfla> gs='-shared'> > Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Built under linux Compiled at Jul 24 2006 18:28:14 @INC: /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5..8.3/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.2/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.1/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/li> b64/perl5/vendor_perl/5.8.4/x86_64-linu> x-thread-multi /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.2/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .> > > > A quick search on google shows this is will happen on 64bit Linux when > you attempt to use a .a (just search for "could not read symbols: Bad > value collect2") and you'll find stuff like:> > http://linuxfromscratch.org/pipermail/cross-lfs/2006-March/001659.html> > I think your actual issue though is "/usr/bin/ld: skipping incompatible > /usr/lib/libodbc.so when searching for -lodbc" which suggests your > dynamically built libodbc.so shared object is not built the same as your > perl i.e. on> e is 32bit and the other is 64bit. A quick "file libodbc.so" > should tell you for sure. You need a shared object of libodbc.so built > the same as your Perl.> > Martin> -- > Martin J. Evans> Easysoft Limited> http://www.easysoft.com> > _________________________________________________________________> > If that works let me know as we'll have to modify DBD::ODBC in the long > term to cope with looking in two independent places.> > Martin> -- > Martin J. Evans> Easysoft Limited> http://www.easysoft..com
_________________________________________________________________
See what you’re getting into…before you go there.
http://newlivehotmail.com