Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 306315

Summary: dev-db/mysql-5.1.44[embedded] doesn't install libmysqld.so
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: [OLD] DevelopmentAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: b.brachaczek, gentoo, jmdroot-gentoobugzilla, knielsen, leonidp.lists, lifeissecret, lists, marco.dr, optiluca, patrizio.bassi, quazgar, tampakrap, zeekec
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://bugs.mysql.com/bug.php?id=39288
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 306155    
Bug Blocks: 306317, 310897, 335433, 338724    
Attachments: use libtool to build libmysqld

Description Martin von Gagern 2010-02-22 09:58:48 UTC
dev-db/mysql-5.1.44[embedded] installs libmysqld.a but no libmysqld.so. This is a regression from mysql 5.0.

I assume this is a known issue, related to bug #306155 and bug #238487 and the reason why dev-db/mysql-5.1.44 currently blocks media-sound/amarok[embedded]. Nevertheless, I believe it would be a good idea to track the core issue in a bug not entangled with packages like amarok, so that other bugs can depend on this one.
Comment 1 Martin von Gagern 2010-02-22 10:10:06 UTC
sci-geosciences/grass-6.4.0_rc5[mysql] affected as per bug #306317. Haven't marked that as depending on this one here, as there is more to fix in grass than this dependency, and as this here isn't exactly a tracker only but a bug in its own right that will be fixed as soon as libmysqld.so gets installed again.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-02-22 17:47:04 UTC
We know about it. This is entirely why we put
RDEPEND="!media-sound/amarok[embedded]"
into the MySQL ebuilds.

For now, we do not recommend use of the embedded server. Go and use a proper MySQL instance instead.

Status of the static->shared patch is in bug #306155.
Comment 3 Martin von Gagern 2010-02-23 17:59:13 UTC
(In reply to comment #2)
> Status of the static->shared patch is in bug #306155.

Did you perhaps get this bug number wrong? I see no reference to such a patch in that bug report, only discussion about proper dependency metadata. And that bug has been closed fixed. Maybe you meant bug #238487, which at least has patches, albeit against 5.0? Or maybe some other report which I failed to spot?
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-02-23 18:13:58 UTC
I was talking about the status of the patch in that bug, but I'll add further comments here.
Comment 5 Bartosz Brachaczek 2010-03-10 15:29:09 UTC
As written in upstream bug, a proper patch[1] is already in MySQL bzr sources.

[1] http://lists.mysql.com/commits/102373
Comment 6 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-03-10 17:35:00 UTC
(In reply to comment #5)
> As written in upstream bug, a proper patch[1] is already in MySQL bzr sources.
> 
> [1] http://lists.mysql.com/commits/102373

If the patch is supposed to be just what's listed in that commit, I can assure you it won't work. The issue is mysql-5.1 needs to be addressed in the autotools config as cmake is only used for a small subset of the source code (innobase / innodb_plugin).
In case you have any doubt, you can check the patch for 5.0.77 at http://git.overlays.gentoo.org/gitweb/?p=proj/mysql-extras.git;a=blob_plain;f=02040_all_embedded-library-shared-5.0.77.patch;hb=master
Comment 7 Maciej Mrozowski gentoo-dev 2010-09-02 20:18:01 UTC
Created attachment 245794 [details, diff]
use libtool to build libmysqld

Infamous 'shared libs' patch ported to 5.1.50.
But first I would like to know the history behind forcing/preferring InnoDB as shared plugin (instead of static one) - storage/innobase/plug.in part of the patch. It doesn't seem to cause any issues but defeats the purpose of 'embedded server' when innodb is to be used (I suppose it is possible?)
For instance I needed to revert similar change in storage/myisam in order to get libmysqld properly linked.
Comment 8 Patrizio Bassi 2010-09-03 11:58:50 UTC
good!!!!

can you add to portage and remove amarok block?
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-09-04 00:26:54 UTC
(In reply to comment #8)
> good!!!!
> 
> can you add to portage and remove amarok block?
His patch doesn't work.

We're trying to trace now, but the patch causes the mysql testsuite to fail completely ;-).
Comment 10 Kristian Nielsen 2010-09-17 06:58:35 UTC
In case it is useful to someone, here is a working patch for building
libmysqld.so using libtool. The patch is for MariaDB, but it should be fairly
easy to adapt it for MySQL 5.1.50 (I can probably be persuaded to help if
needed).

    http://bazaar.launchpad.net/~knielsen/maria/mariadb-5.1-mwl74-libmysqld.so/revision/2925

The patch follows similar lines as the one by Maciej Mrozowski, but with some
differences to handle extra trickery in the current MySQL makefiles. Most
important is probably handling MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS;
certain source files must be recompiled with different CXXFLAGS for libmysqld,
and this needs to be done differently when using libtool.
Comment 11 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-09-25 19:28:34 UTC
With great help from Kristian Nielsen, we now have 2 patches (one for mysql and the other for mariadb) that allow to build libmysqld.so.

mariadb - http://git.overlays.gentoo.org/gitweb/?p=proj/mysql-extras.git;a=blob;f=02040_all_embedded-library-shared-maria-5.1.50.patch;h=ff30d67b58ebd1eff3c6ce982cb6daa46210bcd9;hb=master

mysql - http://git.overlays.gentoo.org/gitweb/?p=proj/mysql-extras.git;a=blob;f=02040_all_embedded-library-shared-5.1.50.patch;h=3f98e8672542ee97bd64dca45b43bedea680a92b;hb=master

The mariadb ebuild is failing a few tests and I'm still testing mysql, so we may still need a few more updates to the patches.

The mariadb-5.1.50 and mysql-5.1.50-r3 ebuilds can be found in the mysql overlay - http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=summary
Comment 12 ScytheMan 2010-09-27 13:18:35 UTC
Can you add it to the tree? That would be great, because not everyone uses overlays and amarok-2.3.2-r1 depends on it. :)

Thanks for your work!
Comment 13 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-10-06 11:08:43 UTC
This has now been fixed on mysql-5.1.51 and mariadb-5.1.50.
Comment 14 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-10-06 19:27:58 UTC
Closing this since it's in tree now.