jamesgerard has asked for the wisdom of the Perl Monks concerning the following question:

I'm hoping someone can help with this. I have successfully installed the teradata DataDirect odbc drivers. It has been tested on the command line and it works. The install went into a custom directory since I don't have root access. There isn't much out there for successfully setting up Teradata with unixODBC, so I have seen posts about setting up the connection with "$myodbc = 'intersolve'" instead. The instructions are here:


http://www.datadirect.com/resources/resource-library/odbc-developer-center/odbc-tutorials/using-datadirect-odbc-drivers-with-perl/configuration-for-perl

However updating the Makefile.PL to reflect the changes, I'm getting an error on the 'make test'. I'm not sure what the error means, so I'm hoping someone can point me in the right direction.

Here is the output from the 'perl Makefile.PL' and the 'make test'. One thing I don't understand is why the DBI_DSN is undefined when it was fine during the running of the Makefile.PL and is in the environmental variable. I am guessing that my issue has something to do with the custom installation.

=> perl Makefile.PL INSTALL_BASE=/opt/app/d1car1m5/.perl

********** Remember to actually *READ* the README file! And re-read it if you have any problems. **********

OSNAME: linux LANG: en_US.UTF-8 ODBCHOME: /opt/app/d1car1m5/.perl/teradata/client/ODBC_64 LD_LIBRARY_PATH: /opt/app/d1car1m5/.perl/teradata/client/14.10/tdicu/lib:/opt/app/d1car1m5/.perl/teradata/client/14.10/odbc_64/lib:/opt/app/d1car1m5/.perl/usr/lib:/opt/app/d1car1m5/.perl/usr/lib64:/opt/app/d1car1m5/.perl/teradata/teragss/linux-x8664/14.10.00.06/lib:/usr/lib:/usr/lib64/mysql:/usr/local/lib:/usr/local/BerkeleyDB.5.1/lib:/usr/local/ssl/lib DBROOT: WINDIR: II_SYSTEM: Perl: 5.008008 ExtUtils::MakeMaker: 6.92 Command line options: u! = undef w! = undef e! = undef g! = 0 x! = undef o=s =

Your LANG environment variable is set to "en_US.UTF-8" This is known to cause problems in some perl installations - even stopping this Makefile.PL from running without errors. If you have problems please try re-running with LANG unset or with the utf part of LANG removed.

You are using a Perl configured with threading enabled. Please read the warnings in DBI about this.

You should also be aware that on non-Windows platforms ODBC drivers come in two forms, thread-safe and non-thread-safe drivers and you may need to make sure you are using the right one.

Press return to continue...

Looking for odbc_config in : /opt/app/d1car1m5/.perl/teradata/client/ODBC_64

Looking for odbc_config at /opt/app/d1car1m5/.perl/teradata/client/ODBC_64/bin/odbc_config

Looking for odbc_config in (PATH) /opt/app/d1car1m5/.perl/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/app/d1car1m5/bin:/rtc/perl/bin:/usr/local/zlib/bin:/usr/local/svn/bin:/usr/local/ssl/bin:/usr/local/sqlite/bin:/usr/local/neon/bin:/usr/local/apr-util/bin:/opt/app/d1car1m5/opt/cap-monitoring/rtc/perl/bin:/opt/app/d1car1m5/opt/cap-monitoring/rtc/probes:/opt/app/d1car1m5/opt/cap-monitoring/rtc/perl/lib:/usr/local/bin:/usr/bin:/usr/Omnibus/bin:/usr/jdk_base/bin:/usr/local/etc:/usr/local/sbin:/usr/local/include:/usr/local/apr/include:/usr/local/apr-util/include:/usr/local/svn/include:/usr/local/ssl/include:/usr/local/sqlite/include:/usr/local/neon/include:/usr/local/zlib/include:/opt/local/mysql/mysql-5.1.55/bin:.

***** WARNING *****

You provided ODBCHOME (/opt/app/d1car1m5/.perl/teradata/client/ODBC_64) which has no odbc_config (not unusual for older unixODBCs) but we've found an odbc_config on your PATH. It is unlikely the odbc_config specifications are going to match your specified ODBCHOME so this script is going to ignore your specified ODBCHOME. If you don't like this do something to remove odbc_config from your PATH or ensure there is an odbc_config in your provided ODBCHOME.

Press return to continue...

Found odbc_config (via odbc_config) version 2.2.11

odbc_config reports --prefix=/usr

odbc_config reports --include-prefix=/usr/include

odbc_config reports --lib-prefix=/usr/lib64

but cannot find header files sql.h,sqlext.h,sqltypes.h in that path so ignoring

NOTE: Have you installed the unixodbc-dev package

Looking for iodbc-config in PATH /opt/app/d1car1m5/.perl/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/app/d1car1m5/bin:/rtc/perl/bin:/usr/local/zlib/bin:/usr/local/svn/bin:/usr/local/ssl/bin:/usr/local/sqlite/bin:/usr/local/neon/bin:/usr/local/apr-util/bin:/opt/app/d1car1m5/opt/cap-monitoring/rtc/perl/bin:/opt/app/d1car1m5/opt/cap-monitoring/rtc/probes:/opt/app/d1car1m5/opt/cap-monitoring/rtc/perl/lib:/usr/local/bin:/usr/bin:/usr/Omnibus/bin:/usr/jdk_base/bin:/usr/local/etc:/usr/local/sbin:/usr/local/include:/usr/local/apr/include:/usr/local/apr-util/include:/usr/local/svn/include:/usr/local/ssl/include:/usr/local/sqlite/include:/usr/local/neon/include:/usr/local/zlib/include:/opt/local/mysql/mysql-5.1.55/bin:.

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

/opt/app/d1car1m5/.perl/teradata/client/ODBC_64/include Found sql.h, sqlext.h, sqltypes.h in /opt/app/d1car1m5/.perl/teradata/client/ODBC_64/include Using ODBCHOME /opt/app/d1car1m5/.perl/teradata/client/ODBC_64

This looks like a intersolve type of driver manager.

You seem to have the official header files.

Multiple copies of Driver.xst found in: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ at Makefile.PL line 155. Using DBI 1.621 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/

Multiple copies of Driver.xst found in: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ at Makefile.PL line 1142. Using DBI 1.621 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/

Generating a Unix-style Makefile

Writing Makefile for DBD::ODBC

Writing MYMETA.yml and MYMETA.json

The DBD::ODBC tests will use these values for the database connection:

DBI_DSN=dbi:ODBC:attdsn e.g. dbi:ODBC:demo

DBI_USER=jf3579

DBI_PASS=xxxxxx

=> make test TEST_VERBOSE=1

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t t/01base.t ...................

1..6 ok 1 - require DBI;

ok 2 - import DBI

ok 3 - DBI->internal is DBI::dr

# install_driver(ODBC) failed: Can't load

'/opt/app/d1car1m5/cpan/DBD-ODBC-1.48/blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC: /opt/app/d1car1m5/cpan/DBD-ODBC-1.48/blib/arch/auto/DBD/ODBC/ODBC.so: undefined symbol: SQLFetch at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.

# at (eval 9) line 3.

# Compilation failed in require at (eval 9) line 3.

# Perhaps a required shared library or dll isn't installed where expected

# at t/01base.t line 25. not ok 4 - install ODBC

# Failed test 'install ODBC'

# at t/01base.t line 29.

ok 5 # skip driver could not be loaded

ok 6 # skip driver could not be loaded

# Looks like you failed 1 test of 6.

Dubious, test returned 1 (wstat 256, 0x100)

Failed 1/6 subtests (less 2 skipped subtests: 3 okay)

t/02simple.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/03dbatt.t ..................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/05meth.t ...................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/07bind.t ...................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/08bind2.t ..................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/09multi.t ..................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/10handler.t ................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/12blob.t ...................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/20SqlServer.t ..............

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/30Oracle.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/40UnicodeRoundTrip.t .......

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/41Unicode.t ................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/45_unicode_varchar.t .......

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/50_odbc_utf8_on.t ..........

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/70execute_array_dbi.t ......

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/70execute_array_native.t ...

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/80_odbc_diags.t ............ Can't load

'/opt/app/d1car1m5/cpan/DBD-ODBC-1.48/blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC: /opt/app/d1car1m5/cpan/DBD-ODBC-1.48/blib/arch/auto/DBD/ODBC/ODBC.so: undefined symbol: SQLFetch at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.

at t/80_odbc_diags.t line 10.

Compilation failed in require at t/80_odbc_diags.t line 10. BEGIN failed--compilation aborted at t/80_odbc_diags.t line 10.

Dubious, test returned 2 (wstat 512, 0x200)

No subtests run

t/82_table_info.t ............

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/87_odbc_lob_read.t .........

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/90_trace_flags.t ...........

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/odbc_describe_parameter.t ..

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/pod-coverage.t .............

1..1

ok 1 - Pod::Coverage

# Test::Pod::Coverage 1.04 required for testing POD coverage ok

t/pod.t ......................

1..4

ok 1 # skip Test::Pod 1.00 required for testing POD ok 2 # skip Test::Pod 1.00 required for testing POD ok 3 # skip Test::Pod 1.00 required for testing POD ok 4 # skip Test::Pod 1.00 required for testing POD ok

t/rt_38977.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_39841.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_39897.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_43384.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_46597.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_50852.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_57957.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_59621.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_61370.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_62033.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_63550.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_78838.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_79190.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_79397.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_81911.t .................

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/rt_null_nvarchar.t .........

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

t/sql_type_cast.t ............

1..0 # SKIP DBI_DSN is undefined

skipped: DBI_DSN is undefined

Test Summary Report -------------------

t/01base.t (Wstat: 256 Tests: 6 Failed: 1)

Failed test: 4

Non-zero exit status: 1

t/80_odbc_diags.t (Wstat: 512 Tests: 0 Failed: 0)

Non-zero exit status: 2

Parse errors: No plan found in TAP output

Files=41, Tests=11, 19 wallclock secs ( 0.10 usr 0.03 sys +

1.18 cusr 0.17 csys = 1.48 CPU)

Result: FAIL

Failed 2/41 test programs. 1/11 subtests failed.

make: *** test_dynamic Error 255

  • Comment on Install DBD::ODBC for Teradata Connection

Replies are listed 'Best First'.
Re: Install DBD::ODBC for Teradata Connection
by Corion (Patriarch) on Mar 30, 2014 at 16:30 UTC

    The Makefile.PL outputs several severe warnings in its run. How have you addressed each of them?

    I'll repeat them here:

    1. Your LANG environment variable is set to "en_US.UTF-8" This is known to cause problems in some perl installations - even stopping this Makefile.PL from running without errors. If you have problems please try re-running with LANG unset or with the utf part of LANG removed.
    2. You provided ODBCHOME (/opt/app/d1car1m5/.perl/teradata/client/ODBC_64) which has no odbc_config (not unusual for older unixODBCs) but we've found an odbc_config on your PATH. It is unlikely the odbc_config specifications are going to match your specified ODBCHOME so this script is going to ignore your specified ODBCHOME. If you don't like this do something to remove odbc_config from your PATH or ensure there is an odbc_config in your provided ODBCHOME.
    3. Multiple copies of Driver.xst found in: /usr/lib64/perl5/site_perl/5. +8.8/x86_64-linux-thread-multi/auto/DBI/ /usr/lib64/perl5/vendor_perl/ +5.8.8/x86_64-linux-thread-multi/auto/DBI/ at Makefile.PL line 155. Us +ing DBI 1.621 (for perl 5.008008 on x86_64-linux-thread-multi) instal +led in /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/aut +o/DBI/

    It seems that at least the compilation of your DBD does not work, because the symbol SQLFetch is not available. This may be because the wrong Perl is run, the wrong code got compiled or the wrong .so file gets loaded:

    Can't load '/opt/app/d1car1m5/cpan/DBD-ODBC-1.48/blib/arch/auto/DBD/OD +BC/ODBC.so' for module DBD::ODBC: /opt/app/d1car1m5/cpan/DBD-ODBC-1.4 +8/blib/arch/auto/DBD/ODBC/ODBC.so: undefined symbol: SQLFetch at /usr +/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.

    Find out which is the case and correct it.

      1) I changed the LANG env variable and reran the makefile but I get the same error.

      2) I followed the directions that I found which said to make that directory path ODBCHOME. I know that the makefile says that it can't find the odbc_config, but a little later on it says this.

      odbc_config not found - ok, there are other things I can do

      Still trying to guess ODBCHOME - looking for headers now trying

      /opt/app/d1car1m6/.perl/teradata/client/ODBC_64/include Found sql.h, sqlext.h, sqltypes.h in

      /opt/app/d1car1m6/.perl/teradata/client/ODBC_64/include

      Using ODBCHOME

      /opt/app/d1car1m6/.perl/teradata/client/ODBC_64

      This looks like a intersolve type of driver manager. You seem to have the official header files.

      So does this mean that the intersolve install was successful, I don't know. Is odbc_config looking for libodbc.so? I tried changing ODBCHOME to point to the lib where libodbc.so exists, but I still get the problem with odbc_config not found.

      3) There is a /usr/lib64/perl5/site_perl and a /usr/lib64/perl5/vendor_perl path to DBI? Does this mean that the DBI installation is not correct?