Further modification of dbdimp.c to:

   ret = SQLAllocStmt(imp_dbh->hdbc, &stmt );
   if (!SQL_ok(ret)) {
      dbd_error( dbh, ret, "Statement allocation error" );
      return(-2);
   }


leads to:

# make test TEST_VERBOSE=1
Skip blib/lib/DBD/ODBC.pm (unchanged)
PERL_DL_NONLAZY=1
/usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.1/i386
-freebsd -I/usr/local/lib/perl5/5.6.1 -e 'use Test::Harness qw(&runtests
$verbose); $verbose=1; runtests @ARGV;' t/*.t
t/01base......1..5
ok 1
ok 2
ok 3
ok 4
ok 5
ok
t/02simple....1..17
ok 1
 Test 2: connecting to the database
dubious
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
DIED. FAILED tests 2-17
        Failed 16/17 tests, 5.88% okay
t/03dbatt.....1..6
ok 1
dubious
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
DIED. FAILED tests 2-6
        Failed 5/6 tests, 16.67% okay
t/05meth......1..6
ok 1
dubious
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
DIED. FAILED tests 2-6
        Failed 5/6 tests, 16.67% okay
t/07bind......1..9
ok 1
 Test 2: connecting to the database
dubious
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
DIED. FAILED tests 2-9
        Failed 8/9 tests, 11.11% okay
t/08bind2.....dubious
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
t/09multi.....dubious
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
----------------------------------------------------------------------------
---
t/02simple.t    0   139    17   16  94.12%  2-17
t/03dbatt.t     0   139     6    5  83.33%  2-6
t/05meth.t      0   139     6    5  83.33%  2-6
t/07bind.t      0   139     9    8  88.89%  2-9
t/08bind2.t     0   139    ??   ??       %  ??
t/09multi.t     0   139    ??   ??       %  ??
Failed 6/7 test scripts, 14.29% okay. 34/43 subtests failed, 20.93% okay.
*** Error code 9

Stop in /usr/home/admin/DBD-ODBC-0.36.




-----Original Message-----
From: Will Spencer [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 10, 2002 9:12 AM
To: Jeff Urlwin; [EMAIL PROTECTED]
Subject: RE: Undefined symbol "SQLFreeHandle"


Jeff:

Thanks very much for the assistance.

With both:

1. Modifying dbdimp.c
or
2. Upgrading to DBD-ODBC-0.36

My error changes to an Undefined Symbol for "SQLAllocHandle"

(Under .36) Changing SQLAllocHandle to SQLAllocStmt without changing
anything else gets me:

dbdimp.c:113: warning: passing arg 1 of `SQLAllocStmt' makes pointer from
integer without a cast
dbdimp.c:113: too many arguments to function `SQLAllocStmt'

Obviously, I need to change something else.  ;-)  Looking...

Will



-----Original Message-----
From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 10, 2002 4:42 AM
To: Will Spencer; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Undefined symbol "SQLFreeHandle"


Will,

What version of iODBC are you using?  I suspect 2.x, not 3.x.  Is it a
problem to upgrade?  The fix is simple.  Instead of SQLFreeHandle, it should
be SQLFreeStmt.

I can fix that, but I would expect that
        a) I need to update the driver I distribute with DBD::ODBC (I had forgotten
about it <G>)
        b) ODBC 3.0 features will be a future direction.

Regards,

Jeff

> -----Original Message-----
> From: Will Spencer [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 10, 2002 2:44 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Undefined symbol "SQLFreeHandle"
>
>
> I am having difficulty installing the DBD::ODBC module.  The trouble
> seems to be related to an undefined symbol "SQLFreeHandle"
>
> I am attempting to install via CPAN:
>
> cpan> install DBD::ODBC
> Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
> CPAN: Compress::Zlib loaded ok
> Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
>   Database was generated on Sat, 09 Feb 2002 23:41:20 GMT
> CPAN: HTTP::Date loaded ok
> Going to read /root/.cpan/sources/modules/03modlist.data.gz
> Running install for module DBD::ODBC
> Running make for J/JU/JURL/DBD-ODBC-0.35.tar.gz
> CPAN: MD5 loaded ok
> Checksum for
> /root/.cpan/sources/authors/id/J/JU/JURL/DBD-ODBC-0.35.tar.gz ok
> Scanning cache /root/.cpan/build for sizes
> DBD-ODBC-0.35/
> DBD-ODBC-0.35/dbdimp.c
> DBD-ODBC-0.35/dbdimp.h
> DBD-ODBC-0.35/fixup_c.h
> DBD-ODBC-0.35/fixup_t.h
> DBD-ODBC-0.35/iodbcsrc/
> DBD-ODBC-0.35/iodbcsrc/libiodbc-2.50.3.tar.gz
> DBD-ODBC-0.35/iodbcsrc/readme.txt
> DBD-ODBC-0.35/Makefile.PL
> DBD-ODBC-0.35/MANIFEST
> DBD-ODBC-0.35/MANIFEST.SKIP
> DBD-ODBC-0.35/mytest/
> DBD-ODBC-0.35/mytest/contest.pl
> DBD-ODBC-0.35/mytest/listtabs.pl
> DBD-ODBC-0.35/mytest/moreresults.pl
> DBD-ODBC-0.35/mytest/testconn.pl
> DBD-ODBC-0.35/mytest/testdatasources.pl
> DBD-ODBC-0.35/mytest/testfunc.pl
> DBD-ODBC-0.35/mytest/testigparams.pl
> DBD-ODBC-0.35/mytest/testinout.pl
> DBD-ODBC-0.35/mytest/testkeys.pl
> DBD-ODBC-0.35/mytest/testmulti.pl
> DBD-ODBC-0.35/mytest/testver.pl
> DBD-ODBC-0.35/ODBC.h
> DBD-ODBC-0.35/ODBC.pm
> DBD-ODBC-0.35/ODBC.xs
> DBD-ODBC-0.35/README
> DBD-ODBC-0.35/README.adabas
> DBD-ODBC-0.35/t/
> DBD-ODBC-0.35/t/01base.t
> DBD-ODBC-0.35/t/02simple.t
> DBD-ODBC-0.35/t/03dbatt.t
> DBD-ODBC-0.35/t/05meth.t
> DBD-ODBC-0.35/t/07bind.t
> DBD-ODBC-0.35/t/08bind2.t
> DBD-ODBC-0.35/t/09multi.t
> DBD-ODBC-0.35/t/ODBCTEST.pm
> Removing previously used /root/.cpan/build/DBD-ODBC-0.35
>
>   CPAN.pm: Going to build J/JU/JURL/DBD-ODBC-0.35.tar.gz
>
>
> Configuring DBD::ODBC ...
>
> >>>     Remember to actually *READ* the README file!
>         And re-read it if you have any problems.
>
> Using DBI 1.21 installed in
> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBI
> Using ODBC in /usr/local
>
> Umm, this looks like a iodbc type of driver manager.
>
> We expect to find the isql.h, isqlext.h and iodbc.h files (which were
> supplied with iODBC) in $ODBCHOME/include directory alongside
> the /usr/local/lib/libiodbc.a /usr/local/lib/libiodbc.so library.
>
>
> Checking if your kit is complete...
> Looks good
> Using DBI 1.21 installed in
> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBI
> Writing Makefile for DBD::ODBC
>
> The DBD::ODBC tests will use these values for the database connection:
>     DBI_DSN=dbi:ODBC:database=onetoone;host=64.78.148.124;port=1071e.g.
> dbi:ODBC:demo
>     DBI_USER=waterline2
>     DBI_PASS=EPA123$
>
> cp ODBC.pm blib/lib/DBD/ODBC.pm
> /usr/local/bin/perl -p -e "s/~DRIVER~/ODBC/g" <
> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBI/Driver.xst >
> ODBC.xsi
> /usr/local/bin/perl -I/usr/local/lib/perl5/5.6.1/i386-freebsd
> -I/usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/5.6.1/ExtUtils/xsubpp
> -typemap /usr/local/lib/perl5/5.6.1/ExtUtils/typemap ODBC.xs > ODBC.xsc
> && mv ODBC.xsc ODBC.c
> cc -c -I. -I/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBI
> -fno-strict-aliasing -I/usr/local/include -O    -DVERSION=\"0.35\"
> -DXS_VERSION=\"0.35\" -DPIC -fpic
> -I/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE -I/usr/local/include
> ODBC.c
> cc -c -I. -I/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBI
> -fno-strict-aliasing -I/usr/local/include -O    -DVERSION=\"0.35\"
> -DXS_VERSION=\"0.35\" -DPIC -fpic
> -I/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE -I/usr/local/include
> dbdimp.c
> dbdimp.c:1572: warning: `_dbd_rebind_ph' was declared implicitly
> `extern' and later `static'
> dbdimp.c:1121: warning: previous declaration of `_dbd_rebind_ph'
> Running Mkbootstrap for DBD::ODBC ()
> chmod 644 ODBC.bs
> rm -f blib/arch/auto/DBD/ODBC/ODBC.so
> LD_RUN_PATH="/usr/local/lib" cc  -shared  -L/usr/local/lib ODBC.o
> dbdimp.o  -o blib/arch/auto/DBD/ODBC/ODBC.so   -L/usr/local/lib -liodbc
> 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
>   /usr/bin/make  -- OK
> Running make test
> PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib
> -I/usr/local/lib/perl5/5.6.1/i386-freebsd -I/usr/local/lib/perl5/5.6.1
> -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests
> @ARGV;' t/*.t
> t/01base............install_driver(ODBC) failed: Can't load
> 'blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC:
> blib/arch/auto/DBD/ODBC/ODBC.so: Undefined symbol "SQLFreeHandle" at
> /usr/local/lib/perl5/5.6.1/i386-freebsd/DynaLoader.pm line 206.
>  at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at t/01base.t line 14
> t/01base............dubious
>         Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 4-5
>         Failed 2/5 tests, 60.00% okay
> t/02simple..........ok 1/17install_driver(ODBC) failed: Can't load
> 'blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC:
> blib/arch/auto/DBD/ODBC/ODBC.so: Undefined symbol "SQLFreeHandle" at
> /usr/local/lib/perl5/5.6.1/i386-freebsd/DynaLoader.pm line 206.
>  at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at t/02simple.t line 13
> t/02simple..........dubious
>         Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 2-17
>         Failed 16/17 tests, 5.88% okay
> t/03dbatt...........ok 1/6install_driver(ODBC) failed: Can't load
> 'blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC:
> blib/arch/auto/DBD/ODBC/ODBC.so: Undefined symbol "SQLFreeHandle" at
> /usr/local/lib/perl5/5.6.1/i386-freebsd/DynaLoader.pm line 206.
>  at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at t/03dbatt.t line 12
> t/03dbatt...........dubious
>         Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 2-6
>         Failed 5/6 tests, 16.67% okay
> t/05meth............ok 1/6install_driver(ODBC) failed: Can't load
> 'blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC:
> blib/arch/auto/DBD/ODBC/ODBC.so: Undefined symbol "SQLFreeHandle" at
> /usr/local/lib/perl5/5.6.1/i386-freebsd/DynaLoader.pm line 206.
>  at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at t/05meth.t line 13
> t/05meth............dubious
>         Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 2-6
>         Failed 5/6 tests, 16.67% okay
> t/07bind............ok 1/9install_driver(ODBC) failed: Can't load
> 'blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC:
> blib/arch/auto/DBD/ODBC/ODBC.so: Undefined symbol "SQLFreeHandle" at
> /usr/local/lib/perl5/5.6.1/i386-freebsd/DynaLoader.pm line 206.
>  at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at t/07bind.t line 11
> t/07bind............dubious
>         Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 2-9
>         Failed 8/9 tests, 11.11% okay
> t/08bind2...........install_driver(ODBC) failed: Can't load
> 'blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC:
> blib/arch/auto/DBD/ODBC/ODBC.so: Undefined symbol "SQLFreeHandle" at
> /usr/local/lib/perl5/5.6.1/i386-freebsd/DynaLoader.pm line 206.
>  at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at t/08bind2.t line 19
> t/08bind2...........dubious
>         Test returned status 255 (wstat 65280, 0xff00)
> t/09multi...........install_driver(ODBC) failed: Can't load
> 'blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC:
> blib/arch/auto/DBD/ODBC/ODBC.so: Undefined symbol "SQLFreeHandle" at
> /usr/local/lib/perl5/5.6.1/i386-freebsd/DynaLoader.pm line 206.
>  at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at t/09multi.t line 20
> t/09multi...........dubious
>         Test returned status 255 (wstat 65280, 0xff00)
> Failed Test  Status Wstat Total Fail  Failed  List of Failed
> ------------------------------------------------------------------
> --------------
>
> t/01base.t       255 65280     5    2  40.00%  4-5
> t/02simple.t     255 65280    17   16  94.12%  2-17
> t/03dbatt.t      255 65280     6    5  83.33%  2-6
> t/05meth.t       255 65280     6    5  83.33%  2-6
> t/07bind.t       255 65280     9    8  88.89%  2-9
> t/08bind2.t      255 65280    ??   ??       %  ??
> t/09multi.t      255 65280    ??   ??       %  ??
> Failed 7/7 test scripts, 0.00% okay. 36/43 subtests failed, 16.28% okay.
>
> *** Error code 2
>
> Stop in /root/.cpan/build/DBD-ODBC-0.35.
>   /usr/bin/make test -- NOT OK
> Running make install
>   make test had returned bad status, won't install without force
>
>
>
> My `perl -V` output is:
>
> www2# /usr/local/bin/perl -V
> Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
>
>   Platform:
>     osname=freebsd, osvers=4.4-release, archname=i386-freebsd
>     uname='freebsd www2 4.4-release freebsd 4.4-release #0: tue sep 18
> 11:57:08 pdt 2001 [EMAIL PROTECTED]:usrsrcsyscompilegeneric
> i386 '
>     config_args=''
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef use5005threads=undef useithreads=undef
> usemultiplicity=undef
>     useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
>     use64bitint=undef use64bitall=undef uselongdouble=undef
>   Compiler:
>     cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include',
>     optimize='-O',
>     cppflags='-fno-strict-aliasing -I/usr/local/include'
>     ccversion='', gccversion='2.95.3 20010315 (release) [FreeBSD]',
> gccosandvers=''
>     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
>     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=8
>     alignbytes=4, usemymalloc=n, prototype=define
>   Linker and Libraries:
>     ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
>     libpth=/usr/lib /usr/local/lib
>     libs=-lgdbm -ldb -lm -lc -lcrypt -liconv -lutil
>     perllibs=-lm -lc -lcrypt -liconv -lutil
>     libc=, so=so, useshrplib=false, libperl=libperl.a
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
>     cccdlflags='-DPIC -fpic', lddlflags='-shared  -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
>   Compile-time options: USE_LARGE_FILES
>   Built under freebsd
>   Compiled at Feb  9 2002 18:59:57
>   @INC:
>     /usr/local/lib/perl5/5.6.1/i386-freebsd
>     /usr/local/lib/perl5/5.6.1
>     /usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd
>     /usr/local/lib/perl5/site_perl/5.6.1
>     /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
>     /usr/local/lib/perl5/site_perl/5.005
>     /usr/local/lib/perl5/site_perl
>
>

Reply via email to