Bug 103281 - MyODBC doesn't work -- undefined symbol in libmyodbc.so
MyODBC doesn't work -- undefined symbol in libmyodbc.so
Status: CLOSED RAWHIDE
Product: Red Hat Linux Beta
Classification: Retired
Component: MyODBC (Show other bugs)
beta1
All Linux
medium Severity high
: ---
: ---
Assigned To: Patrick Macdonald
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-28 11:10 EDT by Chris Ricker
Modified: 2007-04-18 12:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-09-03 17:11:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Ricker 2003-08-28 11:10:16 EDT
in /etc/odbcinst.ini, I have

[MySQL]
Description             = ODBC for MySQL
Driver          = /usr/lib/libmyodbc.so
FileUsage               = 1

in /etc/odbc.ini, I have

[MySQL-test]
Description             = MySQL database test
Driver                  = MySQL
Host                    = localhost
Database                = test
Port                    = 3306

When I try to connect, I get:
[kaboom@skuld etc]$ isql -v MySQL-test test
[unixODBC][Driver Manager]Can't open lib '/usr/lib/libmyodbc.so' : /usr/lib/libm
yodbc.so: undefined symbol: _dig_vec
[ISQL]ERROR: Could not SQLConnect
[kaboom@skuld etc]$
Comment 1 Patrick Macdonald 2003-09-03 09:46:12 EDT
_dig_vec is defined in libmysqlclient.so (from strings/int2str.c). For some
reason on your system, libmysqlclient.so is not being loaded properly or the
proper version is not being loaded.

I'll need a little more information from you.  Could you please attach the
output from the following commands (issued from your /usr/lib directory):

1. ldd libmyodbc.so 
2. ldd mysql/libmysqlclient.so.10
3. nm mysql/libmysqlclient.so.10 | grep _dig_vec

Also, could you issue the 'mysql' command (client side utility) and attempt to
connect to the 'Test' database.

Thanks.
Comment 2 Chris Ricker 2003-09-03 12:20:47 EDT
My database works from MySQL:

[kaboom@skuld kaboom]$ mysql test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.23.57

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select version();
+-----------+
| version() |
+-----------+
| 3.23.57   |
+-----------+
1 row in set (0.08 sec)

mysql> \q
Bye
[kaboom@skuld kaboom]$ 

For my libraries,

[kaboom@skuld kaboom]$ ldd /usr/lib/libmyodbc.so 
        libc.so.6 => /lib/tls/libc.so.6 (0x005c5000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
[kaboom@skuld kaboom]$ ldd /usr/lib/mysql/libmysqlclient.so.10
        libz.so.1 => /usr/lib/libz.so.1 (0x00816000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00db0000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x00cde000)
        libm.so.6 => /lib/tls/libm.so.6 (0x006fd000)
        libc.so.6 => /lib/tls/libc.so.6 (0x005c5000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
[kaboom@skuld kaboom]$ nm /usr/lib/mysql/libmysqlclient.so.10 | grep _dig_vec
nm: /usr/lib/mysql/libmysqlclient.so.10: no symbols
[kaboom@skuld kaboom]$ 
Comment 3 Patrick Macdonald 2003-09-03 12:34:47 EDT
Hmmm... the ldd of libmyodbc.so looks suspicious.  Here's what mine has:

token:/usr/lib > ldd libmyodbc.so
        libmysqlclient.so.10 => /usr/lib/mysql/libmysqlclient.so.10 (0x00ce4000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00f00000)
        libodbcinst.so.1 => /usr/lib/libodbcinst.so.1 (0x00444000)
        libc.so.6 => /lib/tls/libc.so.6 (0x004c8000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x009de000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x00aaf000)
        libm.so.6 => /lib/tls/libm.so.6 (0x00111000)
        libdl.so.2 => /lib/libdl.so.2 (0x00133000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00136000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

Your listing would explain why it can't find _dig_vec... libmysqlclient.so is
not being loaded.

Go into /usr/lib and perform an 'ls -li libmyodbc' and let me know what
libmyodbc.so is really pointing to.
Comment 4 Chris Ricker 2003-09-03 12:38:50 EDT
Hmm, not sure why mine's different.

[root@skuld lib]# ls -li libmyodbc*
  56044 -rwxr-xr-x    1 root     root        92936 Jul  3 07:31 libmyodbc-2.50.39.so
  56045 lrwxrwxrwx    1 root     root           20 Aug 23 16:33 libmyodbc.so ->
libmyodbc-2.50.39.so
[root@skuld lib]# ldd libmyodbc-2.50.39.so 
        libc.so.6 => /lib/tls/libc.so.6 (0x005c5000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
[root@skuld lib]# rpm -Vf /usr/lib/libmyodbc-2.50.39.so 
[root@skuld lib]# rpm -qf /usr/lib/libmyodbc-2.50.39.so 
MyODBC-2.50.39-15
[root@skuld lib]# 
Comment 5 Patrick Macdonald 2003-09-03 13:07:12 EDT
Ok... now we're getting somewhere.  Where did you get MyODBC-2.50.39-15.i386.rpm
from?  The beta came with MyODBC-2.50.39-12.i386.rpm.  Please remove -15 and try
it with -12.
Comment 6 Chris Ricker 2003-09-03 13:42:17 EDT
-15 is rawhide. This system is beta1 updated daily to the rawhide tree
Comment 7 Patrick Macdonald 2003-09-03 16:17:57 EDT
Yep, managed to get it to fail in a similar manner.  The problem is with the
libtool interaction in the MyODBC.spec file.  libtool throws out errors
complaining about missing libraries (which is why the ldd output is so small
compared to the other one).  We'll fix it and put the new rpm in rawhide.
Comment 8 Patrick Macdonald 2003-09-03 17:11:03 EDT
Ok... MyODBC-2.50.39-17.i386.rpm is built and verified.  Will be in rawhide soon.
Comment 9 Chris Ricker 2003-09-05 08:47:08 EDT
thanks, that fixed it

Note You need to log in before you can comment on or make changes to this bug.