libmyodbc on this system is not usable with MariaDB MySQL compatibility layer (MariaDB-compat) due to relocation error. This can be demonstrated with isql or iusql utilities from unixODBC package (unixODBC64 will do as well):
[root@a10-52-75-225 ~]# echo "" | isql -b apsc
isql: relocation error: /usr/lib64/libmyodbc3.so: symbol strmov, version libmysqlclient_15 not defined in file libmysqlclient.so.15 with link time reference
This was done on CentOS 5 x64 machine with MariaDB 10.0, but same issues were observed with MariaDB 5.5. Also this most probably happens on other architectures and RedHat el5, maybe on RedHat/CentOS 6 as well.
I'm getting the same error with the MySQL very own library:
[[root@localhost /]# echo "" | isql -b apsc
isql: relocation error: /usr/lib64/libmyodbc3.so: symbol strmov, version libmysqlclient_15 not defined in file libmysqlclient.so.15 with link time reference [root@localhost /]# rpm -qf /usr/lib64/libmyodbc3.so
mysql-connector-odbc-3.51.26r1127-2.el5 [root@localhost /]# rpm -qf /usr/lib64/libmysqlclient.so.15
MySQL-shared-compat-5.5.29-1.rhel5 [root@localhost /]# strings /usr/lib64/libmysqlclient.so.15 | grep strmov
strmov_overlapp
Elena Stepanova
added a comment - - edited I'm getting the same error with the MySQL very own library:
[ [root@localhost /] # echo "" | isql -b apsc
isql: relocation error: /usr/lib64/libmyodbc3.so: symbol strmov, version libmysqlclient_15 not defined in file libmysqlclient.so.15 with link time reference
[root@localhost /] # rpm -qf /usr/lib64/libmyodbc3.so
mysql-connector-odbc-3.51.26r1127-2.el5
[root@localhost /] # rpm -qf /usr/lib64/libmysqlclient.so.15
MySQL-shared-compat-5.5.29-1.rhel5
[root@localhost /] # strings /usr/lib64/libmysqlclient.so.15 | grep strmov
strmov_overlapp
Wlad, could you please take a look to see if there is anything that can and needs to be done on our side?
Elena Stepanova
added a comment - Also found these bug reports:
https://bugs.launchpad.net/ius/+bug/942524
https://bugs.launchpad.net/ius/+bug/1046974
Wlad, could you please take a look to see if there is anything that can and needs to be done on our side?
It appears to be a CentOS problem, and I'm not sure how we can help here.
Problem 1) The actual problem is that myodbc should not be built with shared client, because it uses a bunch of functions that are not in MySQL API (strmov, strxmov, srtrend, list_add, etc). MyODBC was always built with static client library (which is helpfully compiled with -fPIC, so linking it tio shared libraries is always possible)
Problem 2) CentOS binaries, distributed by both MySQL and MariaDB (and, I'm pretty sure Percona) do not have strmov() defined. CentOS own MySQL "fork" has strmov defined, due to the patch http://bazaar.launchpad.net/~ius-coredev/ius/mysqlclient16/view/3/SOURCES/mysql-strmov.patch . That patch breaks a lot of things, and you experience that break. Not only MariaDB is affected, stock MySQL is affected too
How to fix:
I prefer CentOS to fix what's broken. I see the intention behind shared linking and even behin the overly careful strmov patch, but this breaks more than it fixes.
A combination of myodbc from Oracle and MariaDB from us will work, with client libraries either from Oracle or from us. CentOS client libraries do not mix with either vendor.
Vladislav Vaintroub
added a comment - It appears to be a CentOS problem, and I'm not sure how we can help here.
Problem 1) The actual problem is that myodbc should not be built with shared client, because it uses a bunch of functions that are not in MySQL API (strmov, strxmov, srtrend, list_add, etc). MyODBC was always built with static client library (which is helpfully compiled with -fPIC, so linking it tio shared libraries is always possible)
Problem 2) CentOS binaries, distributed by both MySQL and MariaDB (and, I'm pretty sure Percona) do not have strmov() defined. CentOS own MySQL "fork" has strmov defined, due to the patch http://bazaar.launchpad.net/~ius-coredev/ius/mysqlclient16/view/3/SOURCES/mysql-strmov.patch . That patch breaks a lot of things, and you experience that break. Not only MariaDB is affected, stock MySQL is affected too
How to fix:
I prefer CentOS to fix what's broken. I see the intention behind shared linking and even behin the overly careful strmov patch, but this breaks more than it fixes.
A combination of myodbc from Oracle and MariaDB from us will work, with client libraries either from Oracle or from us. CentOS client libraries do not mix with either vendor.
Colin, since I suspect you might know how to contact CentOS folks to file a bugreport (but if you do not , please assign back, I'll find that out)
Vladislav Vaintroub
added a comment - Colin, since I suspect you might know how to contact CentOS folks to file a bugreport (but if you do not , please assign back, I'll find that out)
5.3.12 that was released in January has this problem fixed.
objdump -T /path/to/libmysqlclient_r.so.16 |grep strmov
lists strmov and strmov_overlapped.
However, shared-compat package that comes with 5.5.30 seems to come with outdated libmysqlclient*.so.16 in shared-compat.rpm (the above objdump command does not list strmov). A user recently posted comment about that to MDEV-4361.
Daniel, can you check whether automation works ok here? I do not know much about how creation of compat packages work, I assume you do. If not , please to reassign to serg.
Vladislav Vaintroub
added a comment - 5.3.12 that was released in January has this problem fixed.
objdump -T /path/to/libmysqlclient_r.so.16 |grep strmov
lists strmov and strmov_overlapped.
However, shared-compat package that comes with 5.5.30 seems to come with outdated libmysqlclient*.so.16 in shared-compat.rpm (the above objdump command does not list strmov). A user recently posted comment about that to MDEV-4361 .
Daniel, can you check whether automation works ok here? I do not know much about how creation of compat packages work, I assume you do. If not , please to reassign to serg.
Ok, I think the fix is to update the mariadb-shared rpms we use to the 5.3.12 version (they're from an older 5.3 version now).
I'll make the update, backing up the old rpms first.
Daniel Bartholomew
added a comment - Ok, I think the fix is to update the mariadb-shared rpms we use to the 5.3.12 version (they're from an older 5.3 version now).
I'll make the update, backing up the old rpms first.
Wlad has confirmed that the changes I made in buildbot have fixed this issue. The next release of 5.5 will have the fix.
Daniel Bartholomew
added a comment - Wlad has confirmed that the changes I made in buildbot have fixed this issue. The next release of 5.5 will have the fix.
Sorry, I do not know if this is the correct way to report this but there appears to be a regression in this workaround – using MariaDB 5.5.38 (from yum.mariadb.org);
/usr/bin/isql: relocation error: /usr/lib/libmyodbc3.so: symbol strmov, version libmysqlclient_15 not defined in file libmysqlclient.so.15 with link time reference
David Zambonini
added a comment - Sorry, I do not know if this is the correct way to report this but there appears to be a regression in this workaround – using MariaDB 5.5.38 (from yum.mariadb.org);
cat /etc/redhat-release
CentOS release 5.10 (Final)
rpm -qf /usr/bin/isql
unixODBC-2.2.11-10.el5
/usr/bin/isql: relocation error: /usr/lib/libmyodbc3.so: symbol strmov, version libmysqlclient_15 not defined in file libmysqlclient.so.15 with link time reference
objdump -T /usr/lib/libmysqlclient.so.15 | grep strmov
returns blank.
rpm -qf /usr/lib/libmysqlclient.so.15
MariaDB-compat-5.5.38-1
I'm getting the same error with the MySQL very own library:
[[root@localhost /]# echo "" | isql -b apsc
isql: relocation error: /usr/lib64/libmyodbc3.so: symbol strmov, version libmysqlclient_15 not defined in file libmysqlclient.so.15 with link time reference
[root@localhost /]# rpm -qf /usr/lib64/libmyodbc3.so
mysql-connector-odbc-3.51.26r1127-2.el5
[root@localhost /]# rpm -qf /usr/lib64/libmysqlclient.so.15
MySQL-shared-compat-5.5.29-1.rhel5
[root@localhost /]# strings /usr/lib64/libmysqlclient.so.15 | grep strmov
strmov_overlapp