[MDEV-5763] libmyodbc.so: undefined symbol: int2str Created: 2014-02-27  Updated: 2014-03-26  Resolved: 2014-03-26

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.36, 10.0.9
Fix Version/s: 5.5.37, 10.0.10

Type: Bug Priority: Major
Reporter: Jorge Martínez López Assignee: Sergei Golubchik
Resolution: Fixed Votes: 1
Labels: None
Environment:

Ubuntu 12.04.4 LTS
libmyodbc-5.1.10-1


Issue Links:
Relates
relates to MDEV-5529 Sync libmysqlclient.so symbol version... Closed

 Description   

Since I upgraded to 5.5.36 I can't use libmyodbc to connect to the database:

jorgeml@london:~$ isql -v MySQL-asterisk-cdr
isql: symbol lookup error: /usr/lib/i386-linux-gnu/odbc/libmyodbc.so: undefined symbol: int2str
jorgeml@london:~$ ldd /usr/lib/i386-linux-gnu/odbc/libmyodbc.so 
	linux-gate.so.1 =>  (0xb777c000)
	libmysqlclient.so.18 => /usr/lib/libmysqlclient.so.18 (0xb7448000)
	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb742d000)
	libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7428000)
	libodbcinst.so.1 => /usr/lib/i386-linux-gnu/libodbcinst.so.1 (0xb7414000)
	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb726a000)
	libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb7254000)
	libssl.so.1.0.0 => /lib/i386-linux-gnu/libssl.so.1.0.0 (0xb71fc000)
	libcrypto.so.1.0.0 => /lib/i386-linux-gnu/libcrypto.so.1.0.0 (0xb7051000)
	librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb7047000)
	/lib/ld-linux.so.2 (0xb777d000)
	libltdl.so.7 => /usr/lib/i386-linux-gnu/libltdl.so.7 (0xb703d000)
jorgeml@london:~$ ldd /usr/lib/libmysqlclient.so.18
	linux-gate.so.1 =>  (0xb773e000)
	libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb743a000)
	libssl.so.1.0.0 => /lib/i386-linux-gnu/libssl.so.1.0.0 (0xb73e2000)
	libcrypto.so.1.0.0 => /lib/i386-linux-gnu/libcrypto.so.1.0.0 (0xb7237000)
	libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7231000)
	librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb7228000)
	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb720d000)
	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7063000)
	/lib/ld-linux.so.2 (0xb773f000)

Could it be a regression introduced by MDEV-5613 ?



 Comments   
Comment by Sergei Golubchik [ 2014-02-27 ]

Not quite, it's a regression introduced by MDEV-5529. Thanks for reporting it, it'll be fixed in 5.5.37

Comment by Jorge Martínez López [ 2014-02-27 ]

Fantastic job Sergei, thanks for your swift response.

Is there a workaround while 5.5.37 goes out?

Comment by Elena Stepanova [ 2014-02-27 ]

As a workaround, you can install libmysqlclient18 from 5.5.35 repository.
You need to add the 5.5.35 repo to your /etc/apt/sources file, e.g.

deb http://ftp.osuosl.org/pub/mariadb/mariadb-5.5.35/repo/ubuntu precise main

(if you prefer a different mirror, you can tweak the path in the similar fashion and see if the 5.5.35 repo is there, at least some mirrors have it).
Then run

apt-get update
apt-get install libmysqlclient18=5.5.35+maria-1~precise libmariadbclient18=5.5.35+maria-1~precise

Then you can remove 5.5.35 repo from the sources.list.

Comment by Jorge Martínez López [ 2014-02-27 ]

Thanks Elena, I'm afraid that didn't work as downgrading libmysqlclient18 and libmariadbclient18 triggers the removal of mariadb-client and mariadb-server (and a few other packages).

Comment by Elena Stepanova [ 2014-02-27 ]

Sorry, I didn't know you had the server on the same machine. Then you can just downgrade the whole set, whichever mariadb-5.5.36 packages you have, to 5.5.35, in the same way, and maybe pin the version to prevent automatic upgrades until 5.5.37 is released.

Alternatively, I suppose you can just pull the 5.5.35 library, put it somewhere and upgrade the LD_LIBRARY_PATH for the client, will it work for you?

Comment by Jorge Martínez López [ 2014-02-28 ]

Downgraded by running

# apt-get install libmysqlclient18=5.5.35+maria-1~precise libmariadbclient18=5.5.35+maria-1~precise mariadb-client=5.5.35+maria-1~precise mariadb-server=5.5.35+maria-1~precise mariadb-client-5.5=5.5.35+maria-1~precise mariadb-server-5.5=5.5.35+maria-1~precise mariadb-client-core-5.5=5.5.35+maria-1~precise mariadb-server-core-5.5=5.5.35+maria-1~precise

Then I added a hold to the packages

apt-mark hold libmariadbclient18 libmysqlclient18 mariadb-client mariadb-client-5.5 mariadb-client-core-5.5 mariadb-server mariadb-server-5.5 mariadb-server-core-5.5

libmyodbc works again:

jorgeml@london:~$ isql -v MySQL-asterisk-cdr
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> 
 

Thanks Elena and Sergei!

Comment by Steph Locke [ 2014-03-18 ]

I got this issue and was having trouble downgrading with the code provided by Jorge, turns out you have to also remove the var/lib/mysql files

sudo apt-get purge mysql* mariadb*
sudo rm /etc/mysql -R
sudo rm /var/lib/mysql -R
 sudo apt-get install libmysqlclient18=5.5.35+maria-1~precise libmariadbclient18=5.5.35+maria-1~precise mariadb-client=5.5.35+maria-1~precise mariadb-server=5.5.35+maria-1~precise mariadb-client-5.5=5.5.35+maria-1~precise mariadb-server-5.5=5.5.35+maria-1~precise mariadb-client-core-5.5=5.5.35+maria-1~precise mariadb-server-core-5.5=5.5.35+maria-1~precise mariadb-common=5.5.35+maria-1~precise mysql-common=5.5.35+maria-1~precise

Generated at Thu Feb 08 07:06:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.