[debian-mysql] MySQL ODBC in Stretch

Bernhard Schmidt berni at debian.org
Fri Nov 11 10:05:48 UTC 2016


On Fri, Oct 28, 2016 at 04:37:21PM +0200, Bernhard Schmidt wrote:

Hi,

> > Sorry, I meant ODBC (not JDBC):
> > https://mariadb.com/kb/en/mariadb/about-mariadb-connector-odbc/
> 
> I tried, but I could not get it to work. It builds fine and installs a
> libmaodbc.so into /usr/local/lib. I have then added a driver referencing
> it into /etc/odbcinst.ini and refer to that in /etc/odbc.ini, but it
> fails with
> 
> [01000][unixODBC][Driver Manager]Can't open lib 'libmaodbc.so' : file
> not found
> [ISQL]ERROR: Could not SQLConnect
> 
> Interestingly it does find the lib (according to strace) and using fully
> qualified paths in odbcinst.ini or moving the lib around did not help
> either. strace does not show any more file accesses.

Thanks to a few more hours of debuging and help from #maria I have found
the issue. 

MariaDB in Debian renames libmysqlclient from src:mariadb-10.0 to
libmariadbclient
(https://anonscm.debian.org/cgit/pkg-mysql/mariadb-10.0.git/tree/debian/patches/libmariadbclient-rename.patch),
and consequently libmariadbclient from src:mariadb-connector-c to
libmariadb
(https://anonscm.debian.org/cgit/pkg-mysql/mariadb-client-lgpl.git/tree/debian/patches/rename_static_lib.patch).
The ODBC build system unconditionally links to libmariadbclient.a and
subsequently fails with a symbol error when odbc dlopen()s libmaodbc.so

To work around this you need to patch the source code. With myodbc
likely being dropped from Stretch I expect a lot more people to install
the ODBC connector from source and hitting this problem, so we should
really package it.

I have pushed an initial proof-of-concept package to my personal repo at
git.debian.org (~berni/public_git/mariadb-connector-odbc.git). It should
be visible at
https://anonscm.debian.org/cgit/users/berni/mariadb-connector-odbc.git/
shortly. This works for me, but is currently not fit for Release.

- debian/copyright has not filled at all
- the patches need some comments
- as soon as libmariadb.so is dynamically linked (see the patch in
  debian/patches) it throws the same symbol errors on use, I don't know
  why
- the rules won't work for 32bit, maybe someone knows how to give CMake
  the proper install location or monkey patch debian/rules around it
- the odbcinst part with the template taken over from myodbc does not
  work at all. I'm not really experienced in debconf, maybe there is
  just a minor issue with it. Or drop it completely?

I'm not keen maintaining that (alone), does someone want to take over
for the team?

Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20161111/a5aa60d3/attachment-0001.sig>


More information about the pkg-mysql-maint mailing list