A little introduction about the problem: When trying to build the embedded MySQL (and MariaDB) library, the build system produced a static linked instead of a shared library (libmysqld.a instead of libmysqld.so) which caused build failures (on 64bit systems only, it doesn’t affect 32bit) to all applications that depend on the shared library, most importantly Amarok. There was a dirty workaround for this though, export CFLAGS="-fPIC" before building MySQL and Amarok. This is very nasty though, as Robin explains, although most distros chose that way. The other option would be to disable the embedded feature from Amarok and force users to use an external MySQL instance instead. As a result, this led up to lots of argues, flames and yelling. After some time, three Gentoo Developers (Diego E. Petteno, Jorge Manuel B.S. Vicetto and Robin H. Johnson) managed to create a patch for MySQL 5.0 series that could produce a shared library, and while it was reported upstream, it got stuck somewhere in the middle and never made it to MySQL’s source code.
With the release of MySQL 5.1 we had to face the same problem, but it was twice as hard to deal with our users, as MySQL 5.1 got a fast stabilization because of security bugs, and the KDE Team suddenly got a million of complaints about a regression in Amarok. After some time, Maciej Mrozowski took the old patch over over and did a significant step in getting it ported to MySQL 5.1.51, creating a patch that while it creates a shared library it failed all tests. Out of the sudden, MariaDB developer Kristian Nielsen left a reply on our bug report that he committed a patch to MariaDB based on ours, and with his precious help on IRC we were able to have a working patch for MySQL and MariaDB as well, with the MySQL one reported upstream again. Let’s hope that this time it will be accepted, we don’t want to go through this again MariaDB will have the shared library patch in their next release,
In Gentoo land, MySQL 5.1.51 and Amarok 2.3.2-r1 will be stabilized soon (because of security bug 339717). The only blocker is bug 335995. Gentoo users can normally put dev-db/mysql-5.1.51 and media-sound/amarok-2.3.2-r1 in their /etc/portage/package.keywords file and enjoy the default embedded USE flag (by popular demand).
- MySQL bug 39228
- Gentoo bug 306317: (Contains the patches)
- Gentoo bug 310897
- Gentoo bug 306155
- Gentoo bug 339717
- Gentoo bug 335995
Powered by Blogilo