Bug #45440 configure option --with-plugins establishes the wrong library build
Submitted: 11 Jun 2009 3:21 Modified: 19 Jun 2009 0:15
Reporter: Gerry Narvaja Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to:
Tags: compiling, plugins
Triage: Needs Triage: D3 (Medium)

[11 Jun 2009 3:21] Gerry Narvaja
If only one "--with-plugins" is specified, the engine is linked statically. If 2 are specified, the first one is compiled as a plugin, the 2nd one as static.

How to repeat:
1st example:
./configure --prefix=/usr/local/mysql-5.1.33 --with-plugins=innobase --with-plugins=sphinx 

2nd example:
./configure --prefix=/usr/local/mysql-5.1.33 --with-plugins=sphinx --with-plugins=innobase    

gerry@maggie:~/src/mysql-5.1.33$ egrep "plugin_(innobase|sphinx)" config.log
[11 Jun 2009 7:22] Sveta Smirnova
Thank you for the report.

Verified as described.
[17 Jun 2009 19:42] Antony Curtis
All plugins, if not explicitly disabled, are built as dynamic plugins.

What you’re experiencing there is the way how the autoconf generated script has thrown away all repeat declarations instead of merging them together.

The with-plugins option iirc is meant to take a comma separated list.

Also available (but a little use feature) is to define ‘feature sets’ such as the ‘max’ or ‘max-no-ndb’ feature sets.

IMO, not really a bug: This is more like a ‘user’ error or lack of documentation about autoconf behaviour.
[19 Jun 2009 0:15] Gerry Narvaja
From: http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-buildopts.ht...
--with-plugin-PLUGIN 	Forces the named plugin to be linked into mysqld statically
--with-plugins 	Plugins to include in mysqld
Try "--with-plugins=innobase" and it will link InnoDB support statically. No need for repeat options. As a matter of fact, there is no other way to generate the "ha_*" libraries other than repeating the "--with-plugins=ENGINE" specification.

I would still call it a bug.
[6 Jul 2009 15:04] Sergei Golubchik
Gerry, you've mixed two options.

Either it's

  --with-plugin-innobase --with-plugin-sphinx

("plugin" is singular, plugin name is in the option name) or it's


("plugins" is plural, plugin names are in the option value) but it's not

  --with-plugins=innobase --with-plugins=sphinx