[unixODBC-support] Problems with dlopen

Charles Gilman C.Gilman at mchsi.com
Tue Feb 15 15:49:21 GMT 2005


Hi,

I'm having a weird problem trying to get the client I'm working on to
connect to MyODBC 3.51. isql works fine accessing the MySQL-test abook
table. When I step through unixODBC (2.2.10) I get a failure from dlopen
trying to load /usr/lib/libmyodbc3.so. I found dltest and it also can't open
the library. I suspect this is some kind of configuration issue but I don't
know what. Details and the dltest follow. Any suggestions?

Charles Gilman


The O/S is Red Hat 9 Linux 2.4.20-20 on a Pentium 4.
MySQL 3.23.54a-11 came with Red Hat 9.
The unixODBC is 2.2.10 compiled on 02/10/2005 in /usr/local

MyODBC is 3.51.11-1 RPM downloaded on 02/09/2005.
I needed --nodeps and --noscripts to get the RPM to complete (maybe this is
part of the problem).
I tried compiling but configure failed because it can't find mysqlclient.


/tmp $ echo $LD_LIBRARY_PATH


/tmp $ cat /etc/odbcinst.ini
[MySQL]
Description     = ODBC for MySQL
Driver          = /usr/lib/libmyodbc3.so
FileUsage       = 1

[ODBC]
FileDSNPath     = /etc/

/tmp $ cat /etc/odbc.ini
[MySQL-test]
Description     = MySQL database test
Driver          = MySQL
Server          = localhost
Database        = test
Port            = 3306

/tmp $ dltest /u2/P852B/qa/libtfodbcst.so SQLConnect
SUCCESS: Loaded /u2/P852B/qa/libtfodbcst.so
SUCCESS: Found SQLConnect

/tmp $ dltest /usr/lib/libmyodbc3.so SQLConnect
[dltest] ERROR dlopen: libodbcinst.so.1: cannot open shared object file: No
such file or directory

/tmp $ ls -l /usr/lib/libmyodbc*
-rwxr-xr-x    1 root     root      1291766 Jan 31 00:05
/usr/lib/libmyodbc3-3.51.11.so
-rwxr-xr-x    1 root     root         1011 Jan 31 00:05
/usr/lib/libmyodbc3.la
lrwxrwxrwx    1 root     root           21 Feb 14 14:09
/usr/lib/libmyodbc3.so -> libmyodbc3-3.51.11.so
-rwxr-xr-x    1 root     root      1480932 Jan 31 00:05
/usr/lib/libmyodbc3S-3.51.11.so
-rwxr-xr-x    1 root     root         1163 Jan 31 00:05
/usr/lib/libmyodbc3S.la
lrwxrwxrwx    1 root     root           22 Feb 14 14:09
/usr/lib/libmyodbc3S.so -> libmyodbc3S-3.51.11.so
-rwxr-xr-x    1 root     root      1295999 Jan 31 00:05
/usr/lib/libmyodbc3_r-3.51.11.so
-rwxr-xr-x    1 root     root         1023 Jan 31 00:05
/usr/lib/libmyodbc3_r.la
lrwxrwxrwx    1 root     root           23 Feb 14 14:09
/usr/lib/libmyodbc3_r.so -> libmyodbc3_r-3.51.11.so









More information about the unixODBC-support mailing list