Why do I get "undefined symbol: SQLParamData" when testing DBD::ODBC?

This example make test output:

PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib 
-I/usr/lib/perl5/5.00503/i386-linux -I/usr/lib/perl5/5.00503 -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: SQLParamData at
/usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169.

shows that the dynamic linker can't find the SQLParamData symbol.

This happens because Makefile.PL is incompatible with some unixODBC releases. The Makefile.PL searches ODBCHOME/lib for *odbc*.* and finds libodbc.so and libodbcinst.so. It then goes on to choose libodbcinst.so, which is the incorrect shared object. You can check this by running ldd on blib/arch/auto/DBD/ODBC/ODBC.so. For example:

libodbcinst.so1 (libc6) => /usr/local/easysoft/unixODBC/lib/libodbcinst.so1

To fix this, edit the Makefile.PL and delete the second wildcard character (*) in the line:

elsif ($myodbc eq 'unixodbc') {
 my @ilibs = <$odbchome/lib/*odbc*.*>;

so it becomes:

elsif ($myodbc eq 'unixodbc') {
 my @ilibs = <$odbchome/lib/*odbc.*>;

Now rerun perl Makefile.PL.